History log of /php-src/Zend/zend_portability.h (Results 1 – 25 of 149)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2f894389 08-Feb-2024 Ilija Tovilo

Revert "Use __attribute__((assume())) in ZEND_ASSUME when available"

This reverts commit bf4ec8bd9d9d30713a9d3294b946084a6e9e088a.

Partial revert, keep the phpdbg changes.


# e76f9e2b 07-Feb-2024 Peter Kokot

Remove DARWIN symbol (#13346)

When targeting Darwin systems (macOS, etc.), the compiler defines the
__APPLE__ symbol, which should be sufficient and a more established
detection meth

Remove DARWIN symbol (#13346)

When targeting Darwin systems (macOS, etc.), the compiler defines the
__APPLE__ symbol, which should be sufficient and a more established
detection method practice in these cases.

show more ...


# bf4ec8bd 16-Jan-2024 Ilija Tovilo

Use __attribute__((assume())) in ZEND_ASSUME when available

Closes GH-13171


# cc2bf119 13-Nov-2023 David CARLIER

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.

show more ...


# 80b4c730 18-Oct-2023 Ilija Tovilo

Implement diagnostic ignore macro for Clang

Newer versions of Clang now also complain about -Wscript-prototypes for included
headers.

Closes GH-12467


# 62e24025 22-Sep-2023 Ilija Tovilo

Use autoconf for recognizing __builtin_unreachable() (#12266)

Older versions of GCC don't support __has_builtin(), but do support
__builtin_unreachable().


# 37ce7199 20-Sep-2023 Ilija Tovilo

Use __builtin_unreachable() directly in ZEND_UNREACHABLE

ZEND_UNREACHABLE() currently expands to the following in GCC:

if (__builtin_expect(!(0), 0)) __builtin_unreachable();

Use __builtin_unreachable() directly in ZEND_UNREACHABLE

ZEND_UNREACHABLE() currently expands to the following in GCC:

if (__builtin_expect(!(0), 0)) __builtin_unreachable();

Even though the branch is always executed, GCC does not recognize the outer
branch as unreachable. Removing the if fixes some unexpected warnings.

Closes GH-12248

show more ...


# bf123da5 04-Apr-2023 Tony Su

[Zend]: Fix unnecessary alignment in ZEND_CALL_FRAME_SLOT macro (#10988)

Alignment is not necessary while calculating slots reserved for
zend_execute_data and _zend_vm_stack.

ZE

[Zend]: Fix unnecessary alignment in ZEND_CALL_FRAME_SLOT macro (#10988)

Alignment is not necessary while calculating slots reserved for
zend_execute_data and _zend_vm_stack.

ZEND_STATIC_ASSERT ensures the correct alignment while code
compilation. Credit is to Ilija Tovilo.

PR: https://github.com/php/php-src/pull/10988

Signed-off-by: Tony Su <tao.su@intel.com>
Reviewed-by : Ilija Tovilo
Reviewed-by : Dmitry Stogov
Reviewed-by : Niels Dossche

show more ...


# d98963a0 16-Sep-2022 Ilija Tovilo

Switch to Ubuntu 22.04 for GitHub actions jobs

Closes GH-10814


# 413844d6 18-Feb-2023 Max Kellermann

Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597)

These types are standard C99.

For compatibility with out-of-tree extensions, keep the typedefs
in

Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597)

These types are standard C99.

For compatibility with out-of-tree extensions, keep the typedefs
in main/php.h.

show more ...


# a9437ceb 13-Feb-2023 Frank Du

base64: add avx512 and vbmi version. (#6361)

1. Implementation based on https://github.com/WojciechMula/base64simd
2. Only runtime path is added to reduce the complexity of SIMD variants

base64: add avx512 and vbmi version. (#6361)

1. Implementation based on https://github.com/WojciechMula/base64simd
2. Only runtime path is added to reduce the complexity of SIMD variants.
3. Expand test case to cover SIMD implementation.

Signed-off-by: Frank Du <frank.du@intel.com>

show more ...


# 90b0e779 25-Jan-2023 David CARLIER

GNU compilers remove hot attribute proposal. (#8922)

While the cold attribute has its place, the hot one however
does one have real justification for use, even more so with
modern to

GNU compilers remove hot attribute proposal. (#8922)

While the cold attribute has its place, the hot one however
does one have real justification for use, even more so with
modern toolchains.

show more ...


# 2d3427c5 16-Jan-2023 Christoph M. Becker

Revert "#include cleanup (#10216)"

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit e628c66f9d4173e585081ddef358505433f9a288.


# 55514a11 10-Jan-2023 Kévin Dunglas

fix: indirect_return compilation warning

Closes GH-10274

Signed-off-by: George Peter Banyard <girgias@php.net>


# e628c66f 04-Jan-2023 Max Kellermann

#include cleanup (#10216)

Shift header include

In the C file, include the header first so missing #includes are
detected by the compiler, and use lighter header dependencies in

#include cleanup (#10216)

Shift header include

In the C file, include the header first so missing #includes are
detected by the compiler, and use lighter header dependencies in the
header, to speed up compile times.

show more ...


# cf503eb3 03-Oct-2022 David CARLIER

porting ZEND_ASSUME for clang for the optimiser with (#9651)

a given condition.

using `__builtin_assume` instead of the actual generic solution,
disable `-Wassume` warning for

porting ZEND_ASSUME for clang for the optimiser with (#9651)

a given condition.

using `__builtin_assume` instead of the actual generic solution,
disable `-Wassume` warning for the ZEND_ASSERT cases.

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3
# db64c1cb 13-Aug-2022 David Carlier

zend introduce const GNUC attribute. sub optimisation where there is no pointers, nor particular memory layout, thread local/volatile ... involved. usage concealed for now into little pack helpers.

zend introduce const GNUC attribute. sub optimisation where there is no pointers, nor particular memory layout, thread local/volatile ... involved. usage concealed for now into little pack helpers.
Closes #9326.

show more ...

# f51fbf9f 05-Aug-2022 David CARLIER

zend allocators adding __declspec allocator for windows. (#9253)

does not affect the performance, however making those custom calls more meaningful
for Event Tracing/Visual Studio.

Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22
# 53ae24e4 23-Jul-2022 David Carlier

zend defines attribute malloc for Win32 as returned pointer are not aliased
Closes #9118.

Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1
# 180557dd 01-Dec-2021 dixyes

Do not assert SSE/AVX resolvers at windows arm64

NEWS/UPGRADING are already handled by 745cf34ffc40a3eb9d5a9994445763f6fbf3cc6c.

Closes GH-7704.

# c1a06704 08-Jun-2022 Max Kellermann

Add ZEND_THREEWAY_COMPARE() macro to fix casting underflowed unsigned to signed (#8220)

Casting a huge unsigned value to signed is implementation-defined
behavior in C. By introducing t

Add ZEND_THREEWAY_COMPARE() macro to fix casting underflowed unsigned to signed (#8220)

Casting a huge unsigned value to signed is implementation-defined
behavior in C. By introducing the ZEND_THREEWAY_COMPARE() macro, we
can sidestep this integer overflow/underflow/casting problem.

show more ...

# 8685a7f0 27-May-2022 George Peter Banyard

Remove custom alloca() (#8513)

* Use arena in DCE instead of multiple alloca()
This requires passing the optimizer context

* Use our do_alloca() instead of alloca()

*

Remove custom alloca() (#8513)

* Use arena in DCE instead of multiple alloca()
This requires passing the optimizer context

* Use our do_alloca() instead of alloca()

* Use emalloc in DEBUG builds instead of stack allocations for do_alloca()
This helps detecting that we correctly free do_alloca()

show more ...

# 040a37d3 26-Apr-2022 Chen

Add IBT support for fiber

Indirect Branch Tracking (IBT) is part of Intel's Control-Flow
Enforcement Technology (CET). IBT is hardware based, forward edge
Control-Flow-Integrity mech

Add IBT support for fiber

Indirect Branch Tracking (IBT) is part of Intel's Control-Flow
Enforcement Technology (CET). IBT is hardware based, forward edge
Control-Flow-Integrity mechanism where any indirect CALL/JMP must target
an ENDBR instruction or suffer #CP.

This commit adds IBT support for fiber:
1. Add endbr32/64 in assembly
2. Inform compiler jump_fcontext may return via indirect branch

Furthermore:
gcc support CET since v8.1 and set it to default since gcc 11. That is,
the ELF header of sapi/cli/php has a property named IBT. However, such
property is lost since PHP8.1 because the assembly introduced by Fiber.
This commit also fixes this.

Closes GH-8339

Signed-off-by: Chen, Hu <hu1.chen@intel.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

show more ...

Revision tags: php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6
# 5d2f3d45 04-Nov-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Suppress unused label warnings in SWITCH VM


# ee377744 04-Nov-2021 Nikita Popov

Suppress unused label warnings in SWITCH VM

While we avoid emitting labels for handlers that are not referenced
from anywhere else, we do not perform a fine-grained analysis on
used

Suppress unused label warnings in SWITCH VM

While we avoid emitting labels for handlers that are not referenced
from anywhere else, we do not perform a fine-grained analysis on
used specializations, so some of the specialization labels may not
be used. Use ATTRIBUTE_UNUSED_LABEL to suppress the warning. Drop
"cold" from the definition of this attribute, as it is completely
unrelated.

show more ...

123456