fix for incorrect code generation when x86-asm-syntax=intel
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
suggested change will work fine if one is to solely consider masm / gas, as llvm's (x86) integrated assembler is yet to be introduced to the 'offset' keyword (handle it partially and falsely as part of inline-asm only).
for example, the following (dumb) snippet:
void *f() { return ""; }
under clang -cc1 -S -mllvm -x86-asm-syntax=intel -mrelocation-model static will produce the following asm (amongst other boilerplate):
movabs rax, offset .L.str
which in turn, under clang -cc1as will yield:
error: cannot use more than one symbol in memory operand
see D37461 for a comprehensive proposal, which answers PR34617 as well