forked from OSchip/llvm-project
tests for struct/union as input operands to asm.
llvm-svn: 35976
This commit is contained in:
parent
b4c610fb89
commit
036cd14ecb
|
@ -0,0 +1,9 @@
|
|||
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
|
||||
|
||||
struct V { short X, Y; };
|
||||
int bar() {
|
||||
struct V bar;
|
||||
__asm__ volatile("foo %0\n" :: "r"(bar));
|
||||
return bar.X;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
|
||||
|
||||
union U { int x; char* p; };
|
||||
void foo() {
|
||||
union U bar;
|
||||
__asm__ volatile("foo %0\n" :: "r"(bar));
|
||||
}
|
Loading…
Reference in New Issue