llvm-project
d926ec35 - [X86] Asm modifier %a: add (%rip) for 64-bit static relocation model

Commit
126 days ago
[X86] Asm modifier %a: add (%rip) for 64-bit static relocation model In GCC, ``` static int a; int foo() { asm("# %a0" : : "i"(&a)); } ``` lowers to `# a(%rip)` regardless of the PIC mode. This PR follow suits for ELF -fno-pic, matching ELF -fpic (asm-modifier-pic.ll) and Mach-O (which defaults to PIC). Close https://github.com/llvm/llvm-project/issues/139001 Pull Request: https://github.com/llvm/llvm-project/pull/139040
Author
Parents
Loading