[Bug target/95652] GCC 8.3.1 generates syntactically incorrect assembly code with -masm=intel

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 12 19:16:43 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95652

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Teo Samarzija from comment #3)
> Besides, how does CLANG compile that same code fine, also under Linux and
> with "-masm=intel"? Maybe you can copy the way CLANG does that.

Clang outputs:

        mov     dword ptr [rip + eax], 1088421888

which gld does't understand:

pr95652.s: Assembler messages:
pr95652.s:17: Error: `dword ptr [rip+eax]' is not a valid base/index expression


More information about the Gcc-bugs mailing list