diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-14 16:27:53 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-14 16:27:53 +0000 |
commit | ade4bee7618a7697292991e060577968532e6bd0 (patch) | |
tree | d6fe670ca16e89a3237c900dc279c378f270753a /clang/test/CodeGen/asm.c | |
parent | 8f6b04cb57c5fa127c1d50cb87078852f25ae5c2 (diff) | |
download | bcm5719-llvm-ade4bee7618a7697292991e060577968532e6bd0.tar.gz bcm5719-llvm-ade4bee7618a7697292991e060577968532e6bd0.zip |
CodeGen: Let arrays be inputs to inline asm
An array showing up in an inline assembly input is accepted in ICC and
GCC 4.8
This fixes PR20201.
Differential Revision: http://reviews.llvm.org/D4382
llvm-svn: 212954
Diffstat (limited to 'clang/test/CodeGen/asm.c')
-rw-r--r-- | clang/test/CodeGen/asm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c index 670c24405d3..5dbc01b1211 100644 --- a/clang/test/CodeGen/asm.c +++ b/clang/test/CodeGen/asm.c @@ -239,3 +239,12 @@ void t28(void) // CHECK: call void asm sideeffect "/* $0 */", "i|r,~{dirflag},~{fpsr},~{flags}"(i32 1) } +static unsigned t29_var[1]; + +void t29(void) { + asm volatile("movl %%eax, %0" + : + : "m"(t29_var)); + // CHECK: @t29 + // CHECK: call void asm sideeffect "movl %eax, $0", "*m,~{dirflag},~{fpsr},~{flags}"([1 x i32]* @t29_var) +} |