fix: detect Arm NEON with alternative predefined macro#84
Merged
indutny merged 1 commit intonodejs:mainfrom Feb 14, 2026
Merged
fix: detect Arm NEON with alternative predefined macro#84indutny merged 1 commit intonodejs:mainfrom
indutny merged 1 commit intonodejs:mainfrom
Conversation
Currently Arm NEON availability is detected using only the __ARM_NEON__ predefined macro. However this is not used by all modern compilers, it seems it was superseded by __ARM_NEON. The "Arm C Language Extensions" guide[1] refers to __ARM_NEON macro aswell. To be able to detect NEON availability more reliably, check for both macro names. [1]: https://developer.arm.com/documentation/ihi0053/d/ - pdf, section 6.9 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Feb 13, 2026
The llhttp vendored dependency of nodejs takes advantage of Arm NEON instructions when they are available, however they are detected by checking for an outdated CPU feature macro: it checks for __ARM_NEON__, however it is not defined by new compilers for aarch64, rather they set __ARM_NEON. The Arm C extension guide[1] refers to __ARM_NEON macro aswell. This patch changes the detection to check for both macros when detecting the availability of NEON instructions. The code this patch modifies is generated, so the patch itself isn't suitable for upstream submission, as the root cause of the error is in the generator itself. A PR has been submitted[2] to the generator project to rectify this issue. [1]: https://developer.arm.com/documentation/ihi0053/d/ - pdf, section 6.9 [2]: nodejs/llparse#84 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently Arm NEON availability is detected using only the ARM_NEON predefined macro. However this is not defined by all modern compilers, it seems it was superseded by __ARM_NEON. The "Arm C Language Extensions" guide[1] refers to __ARM_NEON macro aswell.
To be able to detect NEON availability more reliably, check for both macro names.
[1]: https://developer.arm.com/documentation/ihi0053/d/ - pdf, section 6.9