[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This contained a bug in that I didn't change CompilerInvocation::GenerateCodeGenArgs() to serialize the new flag correctly, so in build configs that do roundtripping the test failed. I fixed the marshalling in

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. https://reviews.llvm.org/rGb1ad813b474a Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113707/new/ https://reviews.llvm.org/D113707 ___ cfe-commits mailing list

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-17 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 3 inline comments as done. thakis added a comment. Derp, I landed this without replying to the comments. I'll do a follow-up commit for them right now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113707/new/

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-17 Thread Nico Weber via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGae98182cf734: [clang] Make -masm=intel affect inline asm style (authored by thakis). Herald added a project: clang. Repository: rG LLVM Github

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-17 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Headers/x86gprintrin.h:29 #define __SSC_MARK(Tag) \ - __asm__ __volatile__("movl %%ebx,

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. (Here are a few revisions I read through while researching this patch: da081a8e1f295ffdd670f87dba19f470a9a5acaa and fc416faaa07c5 (and 4f2791617e2fa) and aa23fa9f435d2 1778831a3d1d2 split the "ms" inline asm out isSimple added in 19fe116fc0b35, meaningfully used in

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D113707#3132812 , @thakis wrote: > Fairly big update. I'd like to punt on the pragma for now since this became a > lot more involved than expected already (see dependent patches; several of > them have already landed). No

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-15 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 387399. thakis added a comment. minor test expectations update CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113707/new/ https://reviews.llvm.org/D113707 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Fairly big update. I'd like to punt on the pragma for now since this became a lot more involved than expected already (see dependent patches; several of them have already landed). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113707/new/

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-15 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 387381. thakis added a comment. - rebase on top of recent (partially still pending) llvm patches - use `{...|...}` in intrinsic headers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113707/new/ https://reviews.llvm.org/D113707 Files:

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. One alternative would be to control this setting with a pragma stack, like we do for warnings, struct packing, etc. Something like: // foo.h #pragma clang asm_dialect push "att" static inline ... foo { asm("..."); } #pragma clang asm_dialect pop The pragma really

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks for pointing out built-in headers, that's a great point. I started adding .att_syntax lines where needed, but the I realized that that doens't work: it's too late for things taking memory, since %0 replacement is done with asm writer setting before getting to

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-11 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This seems reasonable, but I worry about headers that contain AT style inline asm blobs, such as clang's own intrinsic headers. As you say, the directive is local. I would hate to end up in a place where we have to prefix every asm blob in clang/lib/Headers/*mmintrin.h

[PATCH] D113707: [clang] Make -masm=intel affect inline asm style

2021-11-11 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. Herald added subscribers: dexonsmith, dang. thakis requested review of this revision. With this, void f() { __asm__("mov eax, ebx"); } now compiles with clang with -masm=intel. This matches gcc. The flag is not accepted in