diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-12 18:14:25 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-12 18:14:25 +0000 |
commit | 7f9678b513f926dae27234858ed2586a6eb03b7b (patch) | |
tree | a1a1f014eede4e90afb0267f5db3729681a193ef /test/CodeGen/ms-inline-asm.c | |
parent | 0841a07498af164a9702f943ab2f517e23eecc77 (diff) |
[ms-inline asm] If we have a single asm operand that maps to multiple
MCOperands then iterate over all of then when computing clobbers, inputs and
outputs.
On x86 the 1-to-many mapping is a memory operand that includes a BaseReg(reg),
MemScale(imm), MemIndexReg(reg), an Expr(MCExpr or imm) and a MemSegReg(reg).
Invalid register (Op.getReg() == 0) are not considered when computing clobber.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ms-inline-asm.c')
-rw-r--r-- | test/CodeGen/ms-inline-asm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c index 8f8d687902..67e0eb46b6 100644 --- a/test/CodeGen/ms-inline-asm.c +++ b/test/CodeGen/ms-inline-asm.c @@ -127,3 +127,15 @@ void t14(void) { // CHECK: t14 // CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind } + +void t15(void) { + __asm mov eax, DWORD PTR [eax] +// CHECK: t15 +// CHECK: call void asm sideeffect inteldialect "mov eax, DWORD PTR [eax]", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind +} + +void t16(unsigned long long V) { + __asm mov eax, DWORD PTR [V] +// CHECK: t16 +// CHECK: call void asm sideeffect inteldialect "mov eax, DWORD PTR [$0]", "r,~{eax},~{dirflag},~{fpsr},~{flags}"(i64 %0) nounwind +} |