OLD | NEW |
1 ; Test whether we don't mangle external, undefined, global names. This | 1 ; Test whether we don't mangle external, undefined, global names. This |
2 ; feature is needed for cross tests on global initializer relocations. | 2 ; feature is needed for cross tests on global initializer relocations. |
3 ; | 3 ; |
4 ; Note: This code was generated by compiling subzero/crosstest/test_global.cpp | 4 ; Note: This code was generated by compiling subzero/crosstest/test_global.cpp |
5 | 5 |
6 ; We use lc2i (rather than p2i) because PNaCl bitcode files do not | 6 ; We use lc2i (rather than p2i) because PNaCl bitcode files do not |
7 ; allow externally defined global variables. Hence, this test can only | 7 ; allow externally defined global variables. Hence, this test can only |
8 ; work if we read LLVM IR source, and convert to to ICE. | 8 ; work if we read LLVM IR source, and convert to to ICE. |
9 | 9 |
10 ; REQUIRES: allow_llvm_ir_as_input | 10 ; REQUIRES: allow_llvm_ir_as_input |
11 ; RUN: %lc2i -i %s --insts --args --allow-uninitialized-globals | FileCheck %s | 11 ; RUN: %lc2i -i %s --insts --args --allow-uninitialized-globals | FileCheck %s |
12 ; RUN: %lc2i -i %s --insts --args --allow-uninitialized-globals \ | 12 ; RUN: %lc2i -i %s --insts --args --allow-uninitialized-globals \ |
13 ; RUN: -prefix Subzero_ | FileCheck --check-prefix=CROSS %s | 13 ; RUN: -prefix Subzero_ | FileCheck --check-prefix=CROSS %s |
14 | 14 |
15 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64
:64:64-p:32:32:32-v128:32:32" | |
16 target triple = "i686-pc-linux-gnu" | |
17 | |
18 @ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\00\00\00Z\
00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00",
align 4 | 15 @ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\00\00\00Z\
00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00",
align 4 |
19 | 16 |
20 ; CHECK: @ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\0
0\00\00Z\00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0
0\00\00", align 4 | 17 ; CHECK: @ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\0
0\00\00Z\00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0
0\00\00", align 4 |
21 ; CROSS: @Subzero_ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\
00\00P\00\00\00Z\00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00", align 4 | 18 ; CROSS: @Subzero_ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\
00\00P\00\00\00Z\00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00", align 4 |
22 | 19 |
23 @ArrayInitFull = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1E\00\00\0
0(\00\00\002\00\00\00", align 4 | 20 @ArrayInitFull = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1E\00\00\0
0(\00\00\002\00\00\00", align 4 |
24 | 21 |
25 ; CHECK: @ArrayInitFull = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1
E\00\00\00(\00\00\002\00\00\00", align 4 | 22 ; CHECK: @ArrayInitFull = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1
E\00\00\00(\00\00\002\00\00\00", align 4 |
26 ; CROSS: @Subzero_ArrayInitFull = internal global [20 x i8] c"\0A\00\00\00\14\00
\00\00\1E\00\00\00(\00\00\002\00\00\00", align 4 | 23 ; CROSS: @Subzero_ArrayInitFull = internal global [20 x i8] c"\0A\00\00\00\14\00
\00\00\1E\00\00\00(\00\00\002\00\00\00", align 4 |
27 | 24 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 define i32 @nacl_tp_tdb_offset(i32) { | 259 define i32 @nacl_tp_tdb_offset(i32) { |
263 entry: | 260 entry: |
264 ret i32 0 | 261 ret i32 0 |
265 } | 262 } |
266 | 263 |
267 define i32 @nacl_tp_tls_offset(i32 %size) { | 264 define i32 @nacl_tp_tls_offset(i32 %size) { |
268 entry: | 265 entry: |
269 %result = sub i32 0, %size | 266 %result = sub i32 0, %size |
270 ret i32 %result | 267 ret i32 %result |
271 } | 268 } |
OLD | NEW |