2010-03-31 04:24:48 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
|
2009-04-04 08:49:38 +08:00
|
|
|
|
|
|
|
#define FASTCALL __attribute__((regparm(2)))
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int aaa;
|
|
|
|
double bbbb;
|
|
|
|
int ccc[200];
|
|
|
|
} foo;
|
|
|
|
|
2010-03-31 06:15:11 +08:00
|
|
|
typedef void (*FType)(int, int) __attribute ((regparm (3), stdcall));
|
|
|
|
FType bar;
|
|
|
|
|
2011-02-19 10:53:41 +08:00
|
|
|
extern void FASTCALL reduced(char b, double c, foo* d, double e, int f);
|
2009-04-04 08:49:38 +08:00
|
|
|
|
2010-06-19 05:30:25 +08:00
|
|
|
// PR7025
|
|
|
|
void FASTCALL f1(int i, int j, int k);
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @f1(i32 inreg %i, i32 inreg %j, i32 %k)
|
2010-06-19 05:30:25 +08:00
|
|
|
void f1(int i, int j, int k) { }
|
|
|
|
|
2009-04-04 08:49:38 +08:00
|
|
|
int
|
|
|
|
main(void) {
|
2013-02-01 07:17:12 +08:00
|
|
|
// CHECK: call void @reduced(i8 inreg signext 0, {{.*}} %struct.foo* inreg null
|
2009-09-09 23:08:12 +08:00
|
|
|
reduced(0, 0.0, 0, 0.0, 0);
|
2010-03-31 07:50:00 +08:00
|
|
|
// CHECK: call x86_stdcallcc void {{.*}}(i32 inreg 1, i32 inreg 2)
|
2010-03-31 06:15:11 +08:00
|
|
|
bar(1,2);
|
2009-04-04 08:49:38 +08:00
|
|
|
}
|