Skip to content

Fix callNative.S clang error for linux/aarch64#4

Merged
guillerodriguez merged 1 commit intomasterfrom
fix/aarch64-callnative-clang-as-error
Feb 3, 2026
Merged

Fix callNative.S clang error for linux/aarch64#4
guillerodriguez merged 1 commit intomasterfrom
fix/aarch64-callnative-clang-as-error

Conversation

@guillerodriguez
Copy link
Copy Markdown
Contributor

The instruction 'sub sp, sp, w3' is invalid because sp is 64-bit but w3 is 32-bit. GCC/GAS accepts this (and implicitly adds the uxtw extend specifier), but clang rejects it:

error: too few operands for instruction
sub sp, sp, w3
^~~~~~~~~~~~~~

Fix this by making the zero-extend explicit, which works under both toolchains.

The instruction 'sub sp, sp, w3' is invalid because sp is 64-bit
but w3 is 32-bit. GCC/GAS accepts this (and implicitly adds the
uxtw extend specifier), but clang rejects it:

    error: too few operands for instruction
            sub sp, sp, w3
            ^~~~~~~~~~~~~~

Fix this by making the zero-extend explicit, which works under
both toolchains.

Signed-off-by: Guillermo Rodríguez <grodriguez@ingelabs.com>
@guillerodriguez guillerodriguez force-pushed the fix/aarch64-callnative-clang-as-error branch from f9cb701 to 59c7153 Compare February 3, 2026 08:46
@guillerodriguez guillerodriguez merged commit 4d47530 into master Feb 3, 2026
3 checks passed
@guillerodriguez guillerodriguez deleted the fix/aarch64-callnative-clang-as-error branch February 3, 2026 13:37
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.

2 participants