diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/arm-apcs-arguments.c | 59 | ||||
-rw-r--r-- | clang/test/CodeGen/arm-arguments.c | 72 |
2 files changed, 72 insertions, 59 deletions
diff --git a/clang/test/CodeGen/arm-apcs-arguments.c b/clang/test/CodeGen/arm-apcs-arguments.c deleted file mode 100644 index db985d7a202..00000000000 --- a/clang/test/CodeGen/arm-apcs-arguments.c +++ /dev/null @@ -1,59 +0,0 @@ -// RUX: iphone-llvm-gcc -arch armv7 -flto -S -o - %s | FileCheck %s -// RUN: clang-cc -triple armv7-apple-darwin9 -target-abi=apcs-gnu -emit-llvm -w -o - %s | FileCheck %s - -// CHECK: define arm_apcscc signext i8 @f0() -char f0(void) { - return 0; -} - -// CHECK: define arm_apcscc i8 @f1() -struct s1 { char f0; }; -struct s1 f1(void) {} - -// CHECK: define arm_apcscc i16 @f2() -struct s2 { short f0; }; -struct s2 f2(void) {} - -// CHECK: define arm_apcscc i32 @f3() -struct s3 { int f0; }; -struct s3 f3(void) {} - -// CHECK: define arm_apcscc i32 @f4() -struct s4 { struct s4_0 { int f0; } f0; }; -struct s4 f4(void) {} - -// CHECK: define arm_apcscc void @f5( -// CHECK: struct.s5* noalias sret -struct s5 { struct { } f0; int f1; }; -struct s5 f5(void) {} - -// CHECK: define arm_apcscc void @f6( -// CHECK: struct.s6* noalias sret -struct s6 { int f0[1]; }; -struct s6 f6(void) {} - -// CHECK: define arm_apcscc void @f7() -struct s7 { struct { int : 0; } f0; }; -struct s7 f7(void) {} - -// CHECK: define arm_apcscc void @f8( -// CHECK: struct.s8* noalias sret -struct s8 { struct { int : 0; } f0[1]; }; -struct s8 f8(void) {} - -// CHECK: define arm_apcscc i32 @f9() -struct s9 { int f0; int : 0; }; -struct s9 f9(void) {} - -// CHECK: define arm_apcscc i32 @f10() -struct s10 { int f0; int : 0; int : 0; }; -struct s10 f10(void) {} - -// CHECK: define arm_apcscc void @f11( -// CHECK: struct.s10* noalias sret -struct s11 { int : 0; int f0; }; -struct s11 f11(void) {} - -// CHECK: define arm_apcscc i32 @f12() -union u12 { char f0; short f1; int f2; }; -union u12 f12(void) {} diff --git a/clang/test/CodeGen/arm-arguments.c b/clang/test/CodeGen/arm-arguments.c new file mode 100644 index 00000000000..0448f92aa41 --- /dev/null +++ b/clang/test/CodeGen/arm-arguments.c @@ -0,0 +1,72 @@ +// RUN: clang-cc -triple armv7-apple-darwin9 -target-abi=apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s && +// RUN: clang-cc -triple armv7-apple-darwin9 -target-abi=aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s + +// APCS-GNU: define arm_apcscc signext i8 @f0() +// AAPCS: define arm_aapcscc signext i8 @f0() +char f0(void) { + return 0; +} + +// APCS-GNU: define arm_apcscc i8 @f1() +// AAPCS: define arm_aapcscc i8 @f1() +struct s1 { char f0; }; +struct s1 f1(void) {} + +// APCS-GNU: define arm_apcscc i16 @f2() +// AAPCS: define arm_aapcscc i16 @f2() +struct s2 { short f0; }; +struct s2 f2(void) {} + +// APCS-GNU: define arm_apcscc i32 @f3() +// AAPCS: define arm_aapcscc i32 @f3() +struct s3 { int f0; }; +struct s3 f3(void) {} + +// APCS-GNU: define arm_apcscc i32 @f4() +// AAPCS: define arm_aapcscc i32 @f4() +struct s4 { struct s4_0 { int f0; } f0; }; +struct s4 f4(void) {} + +// APCS-GNU: define arm_apcscc void @f5( +// APCS-GNU: struct.s5* noalias sret +// AAPCS: define arm_aapcscc i32 @f5() +struct s5 { struct { } f0; int f1; }; +struct s5 f5(void) {} + +// APCS-GNU: define arm_apcscc void @f6( +// APCS-GNU: struct.s6* noalias sret +// AAPCS: define arm_aapcscc i32 @f6() +struct s6 { int f0[1]; }; +struct s6 f6(void) {} + +// APCS-GNU: define arm_apcscc void @f7() +// AAPCS: define arm_aapcscc void @f7() +struct s7 { struct { int : 0; } f0; }; +struct s7 f7(void) {} + +// APCS-GNU: define arm_apcscc void @f8( +// APCS-GNU: struct.s8* noalias sret +// AAPCS: define arm_aapcscc void @f8() +struct s8 { struct { int : 0; } f0[1]; }; +struct s8 f8(void) {} + +// APCS-GNU: define arm_apcscc i32 @f9() +// AAPCS: define arm_aapcscc i32 @f9() +struct s9 { int f0; int : 0; }; +struct s9 f9(void) {} + +// APCS-GNU: define arm_apcscc i32 @f10() +// AAPCS: define arm_aapcscc i32 @f10() +struct s10 { int f0; int : 0; int : 0; }; +struct s10 f10(void) {} + +// APCS-GNU: define arm_apcscc void @f11( +// APCS-GNU: struct.s10* noalias sret +// AAPCS: define arm_aapcscc i32 @f11() +struct s11 { int : 0; int f0; }; +struct s11 f11(void) {} + +// APCS-GNU: define arm_apcscc i32 @f12() +// AAPCS: define arm_aapcscc i32 @f12() +union u12 { char f0; short f1; int f2; }; +union u12 f12(void) {} |