Skip to content

Simplify ZEND_SIGNED_MULTIPLY_LONG() on Windows #17477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jan 15, 2025

For Clang, we just need to define the respective macros, since these built-ins are available in all supported Clang versions (>= 4.0.0, currently)[1].

For MSVC (and possibly other compilers) we use the respective APIs of intsafe.h[2] which are available as of Windows 7/Server 2008 R2.

For x86 (and to a lesser extend for ARM64) that should also notably improve performance.

[1] https://releases.llvm.org/4.0.0/tools/clang/docs/LanguageExtensions.html
[2] https://learn.microsoft.com/en-us/windows/win32/api/intsafe/

For Clang, we just need to define the respective macros, since these
built-ins are available in all supported Clang versions (>= 4.0.0,
currently)[1].

For MSVC (and possibly other compilers) we use the respective APIs of
intsafe.h[2] which are available as of Windows 7/Server 2008 R2.

For x86 (and to a lesser extend for ARM64) that should also notably
improve performance.

[1] <https://releases.llvm.org/4.0.0/tools/clang/docs/LanguageExtensions.html>
[2] <https://learn.microsoft.com/en-us/windows/win32/api/intsafe/>
@cmb69 cmb69 merged commit 6967de5 into php:master Jan 16, 2025
10 checks passed
@cmb69 cmb69 deleted the cmb/ZEND_SIGNED_MULTIPLY_LONG branch January 16, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants