https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92921
Bug ID: 92921 Summary: Feature request: Automatic transliteration of AT&T inline asm into Intel syntax Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: warp at iki dot fi Target Milestone: --- gcc defaults to using AT&T asm syntax for x86 targets, with Intel syntax being an option (with -masm=intel). As a consequence, any inline asm expression is expected to likewise use AT&T syntax by default, and provide the Intel syntax as an alternative (using the "{...|...}" syntax). If only the AT&T syntax is provided in the inline asm expression, then gcc will just blindly copy it as-is into the output even if the output is in Intel syntax, thus resulting in incorrect asm. clang, however, is able to transliterate inline asm written in AT&T syntax into Intel syntax, when -masm=intel is specified, and thus the inline asm expression doesn't need to provide both. It would be nice if gcc had this support as well, as it makes writing inline asm significantly more convenient (especially when large amounts of it need to be written). (It would also be a nice-to-have feature if one would be able to specify in the asm() statement which syntax it's using, so one could write in Intel syntax even when the compiler is outputting in AT&T syntax.)