[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / PowerPC / ppc64-dwarf.c
blob30db8b18c9c92f6e201ca20c320c92ce75be8239
1 // RUN: %clang_cc1 -triple powerpc64-unknown-aix -emit-llvm %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,PPC64
3 static unsigned char dwarf_reg_size_table[1024];
5 int test(void) {
6 __builtin_init_dwarf_reg_size_table(dwarf_reg_size_table);
8 return __builtin_dwarf_sp_column();
11 // CHECK-LABEL: define{{.*}} signext i32 @test()
12 // CHECK: store i8 8, ptr @dwarf_reg_size_table, align 1
13 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 1), align 1
14 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 2), align 1
15 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 3), align 1
16 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 4), align 1
17 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 5), align 1
18 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 6), align 1
19 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 7), align 1
20 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 8), align 1
21 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 9), align 1
22 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 10), align 1
23 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 11), align 1
24 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 12), align 1
25 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 13), align 1
26 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 14), align 1
27 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 15), align 1
28 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 16), align 1
29 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 17), align 1
30 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 18), align 1
31 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 19), align 1
32 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 20), align 1
33 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 21), align 1
34 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 22), align 1
35 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 23), align 1
36 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 24), align 1
37 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 25), align 1
38 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 26), align 1
39 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 27), align 1
40 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 28), align 1
41 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 29), align 1
42 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 30), align 1
43 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 31), align 1
44 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 32), align 1
45 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 33), align 1
46 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 34), align 1
47 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 35), align 1
48 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 36), align 1
49 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 37), align 1
50 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 38), align 1
51 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 39), align 1
52 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 40), align 1
53 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 41), align 1
54 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 42), align 1
55 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 43), align 1
56 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 44), align 1
57 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 45), align 1
58 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 46), align 1
59 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 47), align 1
60 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 48), align 1
61 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 49), align 1
62 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 50), align 1
63 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 51), align 1
64 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 52), align 1
65 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 53), align 1
66 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 54), align 1
67 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 55), align 1
68 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 56), align 1
69 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 57), align 1
70 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 58), align 1
71 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 59), align 1
72 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 60), align 1
73 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 61), align 1
74 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 62), align 1
75 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 63), align 1
76 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 64), align 1
77 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 65), align 1
78 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 66), align 1
79 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 67), align 1
80 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 68), align 1
81 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 69), align 1
82 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 70), align 1
83 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 71), align 1
84 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 72), align 1
85 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 73), align 1
86 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 74), align 1
87 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 75), align 1
88 // CHECK-NEXT: store i8 4, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 76), align 1
89 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 77), align 1
90 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 78), align 1
91 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 79), align 1
92 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 80), align 1
93 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 81), align 1
94 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 82), align 1
95 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 83), align 1
96 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 84), align 1
97 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 85), align 1
98 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 86), align 1
99 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 87), align 1
100 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 88), align 1
101 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 89), align 1
102 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 90), align 1
103 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 91), align 1
104 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 92), align 1
105 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 93), align 1
106 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 94), align 1
107 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 95), align 1
108 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 96), align 1
109 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 97), align 1
110 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 98), align 1
111 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 99), align 1
112 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 100), align 1
113 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 101), align 1
114 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 102), align 1
115 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 103), align 1
116 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 104), align 1
117 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 105), align 1
118 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 106), align 1
119 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 107), align 1
120 // CHECK-NEXT: store i8 16, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 108), align 1
121 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 109), align 1
122 // CHECK-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 110), align 1
123 // PPC64-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 111), align 1
124 // PPC64-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 112), align 1
125 // PPC64-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 113), align 1
126 // PPC64-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 114), align 1
127 // PPC64-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 115), align 1
128 // PPC64-NEXT: store i8 8, ptr getelementptr inbounds (i8, ptr @dwarf_reg_size_table, i32 116), align 1
129 // CHECK-NEXT: ret i32 1