Issue 161550
Summary x86 Assembly: cannot use more than one symbol in memory operand
Labels new issue
Assignees
Reporter chorman0773
    Example code: https://godbolt.org/z/1TY9qrK3f

I am attempting to write a code sequence for getting the pc-relative offset on 32-bit x86. On GNU AS, it is correct to write `OFFSET foo-bar` (where `bar` is a symbol with a known offset - the result is emitting an `R_386_PC32` relocation, of which I can see no other way to coerce an assembler into generating). On llvm-mc and the llvm internal assembler (when used for inline assembly), you get the error "cannot use more than one symbol in memory operand", which is both a wierd diagnostic (given that its an OFFSET operand, not a memory operand) and an incompatibility with GNU AS, which makes the assembly language less expressive.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to