[PATCH] D32636: [x86][inline-asm][llvm]Amend size directive deduction mechanism of unsized memory operands

coby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 23:24:13 PDT 2017


coby added a comment.

@rnk

consider the following code:

//**char c;**
**void foo() {**
**__asm("mov rax, [c]");**
**}**//

similarly - you can achieve the same effect by using the following directive (and the 'noprefix' option) - ".**intel_syntax noprefix**"

compiled with **-masm=intel, using GCC 7.1**
is lowered to (intel style disassembly):
**mov rax, qword ptr c_address**

Now, as GCC merely pass the bucket to AS, you may say it is AS we are matching
Equivalently, you may say we actually match GCC, as inline-asm is (also) a high-level-source-code entity - i.e. we temper inline-asm here only - we do not affect actions being carried at an assembly level.
I'm more keen to support the second statement, but it's hardly matters.


Repository:
  rL LLVM

https://reviews.llvm.org/D32636





More information about the llvm-commits mailing list