]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/regparm.c
Update clang to r100181.
[FreeBSD/FreeBSD.git] / test / CodeGen / regparm.c
1 // RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
2
3 #define FASTCALL __attribute__((regparm(2)))
4
5 typedef struct {
6   int aaa;
7   double bbbb;
8   int ccc[200];
9 } foo;
10
11 typedef void (*FType)(int, int)      __attribute ((regparm (3), stdcall));
12 FType bar;
13
14 static void FASTCALL
15 reduced(char b, double c, foo* d, double e, int f);
16
17 int
18 main(void) {
19   // CHECK: call void @reduced(i8 signext inreg 0, {{.*}} %struct.anon* inreg null
20   reduced(0, 0.0, 0, 0.0, 0);
21   // CHECK: call x86_stdcallcc void {{.*}}(i32 inreg 1, i32 inreg 2)
22   bar(1,2);
23 }