Skip to content

Conversation

@OldManYellsAtCloud
Copy link

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

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 <[email protected]>
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 <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant