[PATCH] D113894: [x86] Make assembler variant selection work when outputting intel-style asm

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 08:56:54 PST 2021


uweigand added a comment.

Thanks @hans for the heads-up, I do indeed think this patch would break inline asm on z/OS.

This seems to be the same underlying problem I had raised earlier this year in this patch  (which never went anywhere): https://reviews.llvm.org/D95444 . To quote:

> LLVM has two notions of "assembler dialect" that are conceptually distinct, but are currently somewhat intermixed.
>
> The first notion corresponds to platform-specific syntactical differences in assembler text, e.g. the distinction between AT&T and Intel-style assembler for x86 (and similar differences on other architectures). The second notion corresponds to C/C++ source level differences in handling the inputs/outputs of *inline* assembler statements, specifically the difference between GNU inline asm and MS inline asm.
>
> These are conceptually different, but the current inline assembler handling always enforces AT&T style assembler with GNU inline asm and Intel-style assembler with MS inline asm. This is done even on non-Intel platforms, which may not even have AT&T vs. Intel assembler -- that's not an issue for MS inline asm, as this itself only exists on Intel, but it is a problem if a platform wants to use different assembler styles for *GNU* inline asm. (Specifically, we want to do this on SystemZ to distinguish between GAS and HLASM style assembler text.)

Maybe some of the ideas in the above patch can be re-activated to fix this particular Intel problem without breaking z/OS?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113894/new/

https://reviews.llvm.org/D113894



More information about the llvm-commits mailing list