-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[AArch64] Error when assembling call to function named ror
#79729
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
Labels
Comments
You can also reproduce it with a C testcase with just
|
@llvm/issue-subscribers-backend-aarch64 Author: Zachary Yedidia (zyedidia)
The following AArch64 assembly file fails to compile with Clang even though it is valid:
|
MaskRay
added a commit
that referenced
this issue
Feb 12, 2024
…modifier name (#80571) Shift and extend modifiers are parsed as separate operands. When a symbol operand of a branch instruction has such a "bad" name, AArch64AsmParser will report an error. ``` % cat a.c void lsl(); void lsr(); void asr(); void ror(); void uxtb(); void sxtx(); void foo() { lsl(); asr(); asr(); ror(); uxtb(); sxtx(); } % clang --target=aarch64 -c -save-temps a.c a.s:15:8: error: expected #imm after shift specifier bl lsl ^ a.s:16:8: error: expected #imm after shift specifier bl asr ^ a.s:17:8: error: expected #imm after shift specifier bl asr ^ a.s:18:8: error: expected #imm after shift specifier bl ror ^ a.s:19:5: error: expected label or encodable integer pc offset bl uxtb ^ a.s:20:5: error: expected label or encodable integer pc offset bl sxtx ^ ``` In contrast, gas correctly parses these instructions. Fix #79729 by parsing shift/extend modifier after an immediate value/register
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following AArch64 assembly file fails to compile with Clang even though it is valid:
ror
or any other aarch64 shift operation should be a valid function/label name. Tested with the latest version of LLVM.The text was updated successfully, but these errors were encountered: