[PATCH] D79804: [x86] prevent 64b operands to "r" constrained inline asm for -m32

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 12 13:28:19 PDT 2020


nickdesaulniers created this revision.
nickdesaulniers added reviewers: ahatanak, craig.topper.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.
nickdesaulniers added a subscriber: dwmw2.

As pointed out by David Woodhouse and Akira Hatanaka in
https://bugs.llvm.org/show_bug.cgi?id=33587, Clang was inconsistent with
GCC validating inline asm constraints for -m32.  For -m32 Clang was
disallowing 64b inputs/outputs to inline asm with "q" constraints, but
not for "r" constraints.  This change improves Clang's validations to
match GCC's.

Adds a test case in x86_32-inline-asm.c, and fixes up previous tests
that used "r"+64b operands+32b x86 targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79804

Files:
  clang/lib/Basic/Targets/X86.h
  clang/test/CodeGen/mult-alt-generic.c
  clang/test/CodeGen/mult-alt-x86.c
  clang/test/CodeGen/x86_32-inline-asm.c
  clang/test/Parser/no-gnu-inline-asm.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79804.263507.patch
Type: text/x-patch
Size: 6731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200512/92f93c27/attachment-0001.bin>


More information about the cfe-commits mailing list