-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[iA] LOCAL label .altmacro syntax unsupported #44396
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
Comments
assigned to @jcai19 |
This looks like a general problem with LLVM's assembler support for |
I can confirm this issue is target-independent. I wrote a small piece piece of code to help myself understand the exact meaning of LOCAL. I'm putting it down for future reference. $ cat foo.s .macro write arg .macro read write 16 $ as foo.s -o gas.o gas.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <.text>: Without LOCAL, the value of symbol "x" defined in the expansion of foo got read in the macro expansion of bar. If I make "x" local in foo, then it's renamed uniquely for each expansion of foo, and as a result bar would read its initial value 0 instead. $ cat foo.s .macro write arg .macro read write 16 $ as foo.s -o gas.o gas.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <.text>: |
Sent https://reviews.llvm.org/D105720 for review. |
Is issue #48543 a duplicate of this here? |
@llvm/issue-subscribers-backend-x86 Author: Nick Desaulniers (nickdesaulniers)
| | |
| --- | --- |
| Bugzilla Link | [45051](https://llvm.org/bz45051) |
| Version | unspecified |
| OS | Linux |
| Blocks | llvm/llvm-project#4440 |
| CC | @jcai19,@echristo,@MaskRay,@isanbard,@zygoloid,@lenary,@stephenhines |
Extended DescriptionBuiding the RISC-V Linux kernel w/ Clang, we hit this error, ex:
<instantiation>:1:1: error: invalid instruction mnemonic 'local' We can work around this via local labels, ie:
https://sourceware.org/binutils/docs/as/Macro.html#Macro documents https://sourceware.org/binutils/docs/as/Altmacro.html#Altmacro |
Extended Description
Buiding the RISC-V Linux kernel w/ Clang, we hit this error, ex:
:1:1: error: invalid instruction mnemonic 'local'
We can work around this via local labels, ie:
https://sourceware.org/binutils/docs/as/Macro.html#Macro documents
LOCAL
:Warning: LOCAL is only available if you select “alternate macro syntax” with ‘--alternate’ or .altmacro. See .altmacro.
https://sourceware.org/binutils/docs/as/Altmacro.html#Altmacro
The text was updated successfully, but these errors were encountered: