Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: tests_lit/llvm2ice_tests/globalinit.pnacl.ll

Issue 649463002: Handle "Mov" which is mov, movss, movsd, and used for nacl.read.tp. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fixups Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/convert.ll ('k') | tests_lit/llvm2ice_tests/nacl-atomic-fence-all.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Test of global initializers. 1 ; Test of global initializers.
2 2
3 ; RUN: %p2i -i %s --args --verbose inst | FileCheck %s 3 ; Test -ias=0 to test the lea "hack" until we are fully confident in -ias=1
4 ; RUN: %p2i -i %s --args --verbose none -ias=0 | FileCheck %s
5
6 ; Test -ias=1 and try to cross reference instructions w/ the symbol table.
4 ; RUN: %p2i -i %s --args --verbose none \ 7 ; RUN: %p2i -i %s --args --verbose none \
5 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj 8 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
9 ; RUN: | llvm-objdump -d -r --symbolize -x86-asm-syntax=intel - \
10 ; RUN: | FileCheck --check-prefix=IAS %s
11 ; RUN: %p2i -i %s --args --verbose none \
12 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
13 ; RUN: | llvm-objdump -d -t --symbolize -x86-asm-syntax=intel - \
14 ; RUN: | FileCheck --check-prefix=SYMTAB %s
15
6 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s 16 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
7 17
8 @PrimitiveInit = internal global [4 x i8] c"\1B\00\00\00", align 4 18 @PrimitiveInit = internal global [4 x i8] c"\1B\00\00\00", align 4
9 ; CHECK: .type PrimitiveInit,@object 19 ; CHECK: .type PrimitiveInit,@object
10 ; CHECK-NEXT: .section .data,"aw",@progbits 20 ; CHECK-NEXT: .section .data,"aw",@progbits
11 ; CHECK-NEXT: .align 4 21 ; CHECK-NEXT: .align 4
12 ; CHECK-NEXT: PrimitiveInit: 22 ; CHECK-NEXT: PrimitiveInit:
13 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .byte
14 ; CHECK: .size PrimitiveInit, 4 24 ; CHECK: .size PrimitiveInit, 4
15 25
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ; CHECK: .att_syntax 117 ; CHECK: .att_syntax
108 ; CHECK: leal ArrayInit, 118 ; CHECK: leal ArrayInit,
109 ; CHECK: .intel_syntax 119 ; CHECK: .intel_syntax
110 ; CHECK: .att_syntax 120 ; CHECK: .att_syntax
111 ; CHECK: leal ArrayInitPartial, 121 ; CHECK: leal ArrayInitPartial,
112 ; CHECK: .intel_syntax 122 ; CHECK: .intel_syntax
113 ; CHECK: .att_syntax 123 ; CHECK: .att_syntax
114 ; CHECK: leal ArrayUninit, 124 ; CHECK: leal ArrayUninit,
115 ; CHECK: .intel_syntax 125 ; CHECK: .intel_syntax
116 126
127 ; llvm-objdump does not indicate what symbol the mov/relocation applies to
128 ; so we grep for "mov {{.*}}, OFFSET", along with "OFFSET {{.*}} symbol" in
129 ; the symbol table as a sanity check. NOTE: The symbol table sorting has no
130 ; relation to the code's references.
131 ; IAS-LABEL: main
132 ; SYMTAB-LABEL: SYMBOL TABLE
133
134 ; SYMTAB-DAG: 00000000 {{.*}} .data {{.*}} PrimitiveInit
135 ; IAS: mov {{.*}}, 0
136 ; IAS-NEXT: R_386_32
137 ; IAS: call
138
139 ; SYMTAB-DAG: 00000000 {{.*}} .rodata {{.*}} PrimitiveInitConst
140 ; IAS: mov {{.*}}, 0
141 ; IAS-NEXT: R_386_32
142 ; IAS: call
143
144 ; SYMTAB-DAG: 00000000 {{.*}} .bss {{.*}} PrimitiveInitStatic
145 ; IAS: mov {{.*}}, 0
146 ; IAS-NEXT: R_386_32
147 ; IAS: call
148
149 ; SYMTAB-DAG: 00000004 {{.*}} .bss {{.*}} PrimitiveUninit
150 ; IAS: mov {{.*}}, 4
151 ; IAS-NEXT: R_386_32
152 ; IAS: call
153
154 ; SYMTAB-DAG: 00000004{{.*}}.data{{.*}}ArrayInit
155 ; IAS: mov {{.*}}, 4
156 ; IAS-NEXT: R_386_32
157 ; IAS: call
158
159 ; SYMTAB-DAG: 00000018 {{.*}} .data {{.*}} ArrayInitPartial
160 ; IAS: mov {{.*}}, 24
161 ; IAS-NEXT: R_386_32
162 ; IAS: call
163
164 ; SYMTAB-DAG: 00000008 {{.*}} .bss {{.*}} ArrayUninit
165 ; IAS: mov {{.*}}, 8
166 ; IAS-NEXT: R_386_32
167 ; IAS: call
168
169
117 declare void @use(i32) 170 declare void @use(i32)
118 171
119 define internal i32 @nacl_tp_tdb_offset(i32 %__0) { 172 define internal i32 @nacl_tp_tdb_offset(i32 %__0) {
120 entry: 173 entry:
121 ret i32 0 174 ret i32 0
122 } 175 }
123 176
124 define internal i32 @nacl_tp_tls_offset(i32 %size) { 177 define internal i32 @nacl_tp_tls_offset(i32 %size) {
125 entry: 178 entry:
126 %result = sub i32 0, %size 179 %result = sub i32 0, %size
127 ret i32 %result 180 ret i32 %result
128 } 181 }
129 182
130 ; ERRORS-NOT: ICE translation error 183 ; ERRORS-NOT: ICE translation error
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/convert.ll ('k') | tests_lit/llvm2ice_tests/nacl-atomic-fence-all.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698