OLD | NEW |
1 ; RUN: pnacl-abicheck < %s | FileCheck %s | 1 ; RUN: pnacl-abicheck < %s | FileCheck %s |
2 ; RUN: pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check
-prefix=DEBUG | 2 ; RUN: pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check
-prefix=DEBUG |
3 ; Test types allowed by PNaCl ABI | 3 ; Test types allowed by PNaCl ABI |
4 | 4 |
5 ; Basic global types | 5 ; Basic global types |
6 | 6 |
7 ; TODO(mseaborn): Re-enable integer size checking. | 7 ; TODO(dschuff): expand or disable generation of types >i64 |
8 ; See https://code.google.com/p/nativeclient/issues/detail?id=3360 | 8 ; See https://code.google.com/p/nativeclient/issues/detail?id=3360 |
9 ; C;HECK: Variable i4 has disallowed type: i4 | 9 ; CHECK: Variable i4 has disallowed type: i4 |
10 ;@i4 = private global i4 0 | 10 @i4 = private global i4 0 |
11 ; C;HECK: Variable i33 has disallowed type: i33 | 11 ; CHECK: Variable i33 has disallowed type: i33 |
12 ;@i33 = private global i33 0 | 12 @i33 = private global i33 0 |
13 ; C;HECK: Variable i128 has disallowed type: i128 | 13 ; CHECK: Variable i128 has disallowed type: i128 |
14 ;@i128 = private global i128 0 | 14 @i128 = private global i128 0 |
15 | 15 |
16 ; CHECK: Variable hlf has disallowed type: half | 16 ; CHECK: Variable hlf has disallowed type: half |
17 @hlf = private global half 0.0 | 17 @hlf = private global half 0.0 |
18 ; CHECK: Variable fp80 has disallowed type: x86_fp80 | 18 ; CHECK: Variable fp80 has disallowed type: x86_fp80 |
19 @fp80 = private global x86_fp80 undef | 19 @fp80 = private global x86_fp80 undef |
20 ; CHECK: Variable f128 has disallowed type: fp128 | 20 ; CHECK: Variable f128 has disallowed type: fp128 |
21 @f128 = private global fp128 undef | 21 @f128 = private global fp128 undef |
22 ; CHECK: Variable ppc128 has disallowed type: ppc_fp128 | 22 ; CHECK: Variable ppc128 has disallowed type: ppc_fp128 |
23 @ppc128 = private global ppc_fp128 undef | 23 @ppc128 = private global ppc_fp128 undef |
24 ; CHECK: Variable mmx has disallowed type: x86_mmx | 24 ; CHECK: Variable mmx has disallowed type: x86_mmx |
(...skipping 26 matching lines...) Expand all Loading... |
51 ; CHECK: Variable s11 has disallowed type: %struct.s1 = type { half, float } | 51 ; CHECK: Variable s11 has disallowed type: %struct.s1 = type { half, float } |
52 @s11 = private global %struct.s1 undef | 52 @s11 = private global %struct.s1 undef |
53 ; CHECK-NOT: disallowed | 53 ; CHECK-NOT: disallowed |
54 %struct.s2 = type { i32, i32} | 54 %struct.s2 = type { i32, i32} |
55 @s12 = private global %struct.s2 undef | 55 @s12 = private global %struct.s2 undef |
56 | 56 |
57 | 57 |
58 ; types in arrays, structs, etc | 58 ; types in arrays, structs, etc |
59 ; CHECK: Variable p2 has disallowed type: half* | 59 ; CHECK: Variable p2 has disallowed type: half* |
60 @p2 = private global half* undef | 60 @p2 = private global half* undef |
61 ; TODO(mseaborn): Re-enable integer size checking. | 61 ; CHECK: Variable a2 has disallowed type: [2 x i33] |
62 ; C;HECK: Variable a2 has disallowed type: [2 x i33] | 62 @a2 = private global [ 2 x i33 ] undef |
63 ;@a2 = private global [ 2 x i33 ] undef | |
64 ; CHECK: Variable s2 has disallowed type: { half, i32 } | 63 ; CHECK: Variable s2 has disallowed type: { half, i32 } |
65 @s2 = private global { half, i32 } undef | 64 @s2 = private global { half, i32 } undef |
66 ; C;HECK: Variable s3 has disallowed type: { float, i33 } | 65 ; CHECK: Variable s3 has disallowed type: { float, i33 } |
67 ;@s3 = private global { float, i33 } undef | 66 @s3 = private global { float, i33 } undef |
68 ; CHECK: Variable s4 has disallowed type: { i32, { i32, half }, float } | 67 ; CHECK: Variable s4 has disallowed type: { i32, { i32, half }, float } |
69 @s4 = private global { i32, { i32, half }, float } undef | 68 @s4 = private global { i32, { i32, half }, float } undef |
70 ; CHECK-NOT: disallowed | 69 ; CHECK-NOT: disallowed |
71 @s5 = private global { i32, { i32, double }, float } undef | 70 @s5 = private global { i32, { i32, double }, float } undef |
72 | 71 |
73 ; Initializers with constexprs | 72 ; Initializers with constexprs |
74 ; CHECK: Variable cc1 has disallowed type: half | 73 ; CHECK: Variable cc1 has disallowed type: half |
75 @cc1 = private global half 0.0 | 74 @cc1 = private global half 0.0 |
76 ; CHECK: Initializer for ce1 has disallowed type: half* | 75 ; CHECK: Initializer for ce1 has disallowed type: half* |
77 @ce1 = private global i8 * bitcast (half* @cc1 to i8*) | 76 @ce1 = private global i8 * bitcast (half* @cc1 to i8*) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 ; DEBUG-NOT: Named metadata node llvm.dbg.cu is disallowed | 119 ; DEBUG-NOT: Named metadata node llvm.dbg.cu is disallowed |
121 ; DEBUG: Named metadata node llvm.dbg.cu refers to disallowed type: half | 120 ; DEBUG: Named metadata node llvm.dbg.cu refers to disallowed type: half |
122 ; CHECK: Named metadata node llvm.dbg.cu is disallowed | 121 ; CHECK: Named metadata node llvm.dbg.cu is disallowed |
123 !llvm.dbg.cu = !{!0} | 122 !llvm.dbg.cu = !{!0} |
124 !0 = metadata !{ half 0.0} | 123 !0 = metadata !{ half 0.0} |
125 | 124 |
126 ; CHECK: Named metadata node madeup is disallowed | 125 ; CHECK: Named metadata node madeup is disallowed |
127 ; DEBUG: Named metadata node madeup is disallowed | 126 ; DEBUG: Named metadata node madeup is disallowed |
128 !madeup = !{!1} | 127 !madeup = !{!1} |
129 !1 = metadata !{ half 1.0} | 128 !1 = metadata !{ half 1.0} |
OLD | NEW |