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

Side by Side Diff: tests_lit/assembler/arm32/branch-mult-fwd.ll

Issue 1486263002: More coverage of load/stores in ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix remaining issue in patch set 2. Created 5 years 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 | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/ldr-shift.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 that we correctly fix multiple forward branches. 1 ; Test that we correctly fix multiple forward branches.
2 2
3 ; Compile using standalone assembler. 3 ; Compile using standalone assembler.
4 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ 4 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
5 ; RUN: | FileCheck %s --check-prefix=ASM 5 ; RUN: | FileCheck %s --check-prefix=ASM
6 6
7 ; Show bytes in assembled standalone code. 7 ; Show bytes in assembled standalone code.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ 8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
9 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS 9 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
10 10
11 ; Compile using integrated assembler. 11 ; Compile using integrated assembler.
12 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ 12 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
13 ; RUN: | FileCheck %s --check-prefix=IASM 13 ; RUN: | FileCheck %s --check-prefix=IASM
14 14
15 ; Show bytes in assembled integrated code. 15 ; Show bytes in assembled integrated code.
16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ 16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
17 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS 17 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
18 18
19 ; REQUIRES: allow_dump 19 ; REQUIRES: allow_dump
20 20
21 define internal void @mult_fwd_branches(i32 %a, i32 %b) { 21 define internal void @mult_fwd_branches(i32 %a, i32 %b) {
22 ; ASM-LABEL:mult_fwd_branches: 22 ; ASM-LABEL:mult_fwd_branches:
23 ; DIS-LABEL:00000000 <mult_fwd_branches>:
24 ; IASM-LABEL:mult_fwd_branches:
25
23 ; ASM-LABEL:.Lmult_fwd_branches$__0: 26 ; ASM-LABEL:.Lmult_fwd_branches$__0:
27 ; IASM-LABEL:.Lmult_fwd_branches$__0:
24 28
25 ; ASM-NEXT: sub sp, sp, #12 29 ; ASM-NEXT: sub sp, sp, #12
26 ; ASM-NEXT: str r0, [sp, #8]
27 ; ASM-NEXT: # [sp, #8] = def.pseudo
28 ; ASM-NEXT: str r1, [sp, #4]
29 ; ASM-NEXT: # [sp, #4] = def.pseudo
30
31 ; DIS-LABEL:00000000 <mult_fwd_branches>:
32
33 ; DIS-NEXT: 0: e24dd00c 30 ; DIS-NEXT: 0: e24dd00c
34 ; DIS-NEXT: 4: e58d0008
35 ; DIS-NEXT: 8: e58d1004
36
37 ; IASM-LABEL:mult_fwd_branches:
38 ; IASM-LABEL:.Lmult_fwd_branches$__0:
39
40 ; IASM-NEXT: .byte 0xc 31 ; IASM-NEXT: .byte 0xc
41 ; IASM-NEXT: .byte 0xd0 32 ; IASM-NEXT: .byte 0xd0
42 ; IASM-NEXT: .byte 0x4d 33 ; IASM-NEXT: .byte 0x4d
43 ; IASM-NEXT: .byte 0xe2 34 ; IASM-NEXT: .byte 0xe2
44 35
36 ; ASM-NEXT: str r0, [sp, #8]
37 ; ASM-NEXT: # [sp, #8] = def.pseudo
38 ; DIS-NEXT: 4: e58d0008
45 ; IASM-NEXT: .byte 0x8 39 ; IASM-NEXT: .byte 0x8
46 ; IASM-NEXT: .byte 0x0 40 ; IASM-NEXT: .byte 0x0
47 ; IASM-NEXT: .byte 0x8d 41 ; IASM-NEXT: .byte 0x8d
48 ; IASM-NEXT: .byte 0xe5 42 ; IASM-NEXT: .byte 0xe5
49 43
44 ; ASM-NEXT: str r1, [sp, #4]
45 ; ASM-NEXT: # [sp, #4] = def.pseudo
46 ; DIS-NEXT: 8: e58d1004
50 ; IASM-NEXT: .byte 0x4 47 ; IASM-NEXT: .byte 0x4
51 ; IASM-NEXT: .byte 0x10 48 ; IASM-NEXT: .byte 0x10
52 ; IASM-NEXT: .byte 0x8d 49 ; IASM-NEXT: .byte 0x8d
53 ; IASM-NEXT: .byte 0xe5 50 ; IASM-NEXT: .byte 0xe5
54 51
55 %cmp = icmp slt i32 %a, %b 52 %cmp = icmp slt i32 %a, %b
56 53
57 ; ASM-NEXT: mov r0, #0 54 ; ASM-NEXT: mov r0, #0
58 ; ASM-NEXT: ldr r1, [sp, #8]
59 ; ASM-NEXT: ldr r2, [sp, #4]
60 ; ASM-NEXT: cmp r1, r2
61 ; ASM-NEXT: movlt r0, #1
62 ; ASM-NEXT: strb r0, [sp]
63 ; ASM-NEXT: # [sp] = def.pseudo
64
65 ; DIS-NEXT: c: e3a00000 55 ; DIS-NEXT: c: e3a00000
66 ; DIS-NEXT: 10: e59d1008
67 ; DIS-NEXT: 14: e59d2004
68 ; DIS-NEXT: 18: e1510002
69 ; DIS-NEXT: 1c: b3a00001
70 ; DIS-NEXT: 20: e5cd0000
71
72 ; IASM-NEXT: .byte 0x0 56 ; IASM-NEXT: .byte 0x0
73 ; IASM-NEXT: .byte 0x0 57 ; IASM-NEXT: .byte 0x0
74 ; IASM-NEXT: .byte 0xa0 58 ; IASM-NEXT: .byte 0xa0
75 ; IASM-NEXT: .byte 0xe3 59 ; IASM-NEXT: .byte 0xe3
76 60
61 ; ASM-NEXT: ldr r1, [sp, #8]
62 ; DIS-NEXT: 10: e59d1008
77 ; IASM-NEXT: .byte 0x8 63 ; IASM-NEXT: .byte 0x8
78 ; IASM-NEXT: .byte 0x10 64 ; IASM-NEXT: .byte 0x10
79 ; IASM-NEXT: .byte 0x9d 65 ; IASM-NEXT: .byte 0x9d
80 ; IASM-NEXT: .byte 0xe5 66 ; IASM-NEXT: .byte 0xe5
81 67
68 ; ASM-NEXT: ldr r2, [sp, #4]
69 ; DIS-NEXT: 14: e59d2004
82 ; IASM-NEXT: .byte 0x4 70 ; IASM-NEXT: .byte 0x4
83 ; IASM-NEXT: .byte 0x20 71 ; IASM-NEXT: .byte 0x20
84 ; IASM-NEXT: .byte 0x9d 72 ; IASM-NEXT: .byte 0x9d
85 ; IASM-NEXT: .byte 0xe5 73 ; IASM-NEXT: .byte 0xe5
86 74
75 ; ASM-NEXT: cmp r1, r2
76 ; DIS-NEXT: 18: e1510002
87 ; IASM-NEXT: .byte 0x2 77 ; IASM-NEXT: .byte 0x2
88 ; IASM-NEXT: .byte 0x0 78 ; IASM-NEXT: .byte 0x0
89 ; IASM-NEXT: .byte 0x51 79 ; IASM-NEXT: .byte 0x51
90 ; IASM-NEXT: .byte 0xe1 80 ; IASM-NEXT: .byte 0xe1
91 81
82 ; ASM-NEXT: movlt r0, #1
83 ; DIS-NEXT: 1c: b3a00001
92 ; IASM-NEXT: .byte 0x1 84 ; IASM-NEXT: .byte 0x1
93 ; IASM-NEXT: .byte 0x0 85 ; IASM-NEXT: .byte 0x0
94 ; IASM-NEXT: .byte 0xa0 86 ; IASM-NEXT: .byte 0xa0
95 ; IASM-NEXT: .byte 0xb3 87 ; IASM-NEXT: .byte 0xb3
96 88
97 ; IASM-NEXT: strb r0, [sp] 89 ; ASM-NEXT: strb r0, [sp]
90 ; ASM-NEXT: # [sp] = def.pseudo
91 ; DIS-NEXT: 20: e5cd0000
92 ; IASM-NEXT: .byte 0x0
93 ; IASM-NEXT: .byte 0x0
94 ; IASM-NEXT: .byte 0xcd
95 ; IASM-NEXT: .byte 0xe5
98 96
99 br i1 %cmp, label %then, label %else 97 br i1 %cmp, label %then, label %else
100 98
101 ; ASM-NEXT: ldrb r0, [sp] 99 ; ASM-NEXT: ldrb r0, [sp]
100 ; DIS-NEXT: 24: e5dd0000
101 ; IASM-NEXT: .byte 0x0
102 ; IASM-NEXT: .byte 0x0
103 ; IASM-NEXT: .byte 0xdd
104 ; IASM-NEXT: .byte 0xe5
105
102 ; ASM-NEXT: tst r0, #1 106 ; ASM-NEXT: tst r0, #1
103 ; ASM-NEXT: bne .Lmult_fwd_branches$then
104 ; ASM-NEXT: b .Lmult_fwd_branches$else
105
106 ; DIS-NEXT: 24: e5dd0000
107 ; DIS-NEXT: 28: e3100001 107 ; DIS-NEXT: 28: e3100001
108 ; DIS-NEXT: 2c: 1a000000
109 ; DIS-NEXT: 30: ea000000
110
111 ; IASM-NEXT: ldrb r0, [sp]
112
113 ; IASM-NEXT: .byte 0x1 108 ; IASM-NEXT: .byte 0x1
114 ; IASM-NEXT: .byte 0x0 109 ; IASM-NEXT: .byte 0x0
115 ; IASM-NEXT: .byte 0x10 110 ; IASM-NEXT: .byte 0x10
116 ; IASM-NEXT: .byte 0xe3 111 ; IASM-NEXT: .byte 0xe3
117 112
113 ; ASM-NEXT: bne .Lmult_fwd_branches$then
114 ; DIS-NEXT: 2c: 1a000000
118 ; IASM-NEXT: .byte 0x0 115 ; IASM-NEXT: .byte 0x0
119 ; IASM-NEXT: .byte 0x0 116 ; IASM-NEXT: .byte 0x0
120 ; IASM-NEXT: .byte 0x0 117 ; IASM-NEXT: .byte 0x0
121 ; IASM-NEXT: .byte 0x1a 118 ; IASM-NEXT: .byte 0x1a
122 119
120 ; ASM-NEXT: b .Lmult_fwd_branches$else
121 ; DIS-NEXT: 30: ea000000
123 ; IASM-NEXT: .byte 0x0 122 ; IASM-NEXT: .byte 0x0
124 ; IASM-NEXT: .byte 0x0 123 ; IASM-NEXT: .byte 0x0
125 ; IASM-NEXT: .byte 0x0 124 ; IASM-NEXT: .byte 0x0
126 ; IASM-NEXT: .byte 0xea 125 ; IASM-NEXT: .byte 0xea
127 126
128 then: 127 then:
129 ; ASM-LABEL:.Lmult_fwd_branches$then: 128 ; ASM-LABEL:.Lmult_fwd_branches$then:
130 ; IASM-LABEL:.Lmult_fwd_branches$then: 129 ; IASM-LABEL:.Lmult_fwd_branches$then:
131 130
132 br label %end 131 br label %end
132
133 ; ASM-NEXT: b .Lmult_fwd_branches$end 133 ; ASM-NEXT: b .Lmult_fwd_branches$end
134
135 ; DIS-NEXT: 34: ea000000 134 ; DIS-NEXT: 34: ea000000
136
137 ; IASM-NEXT: .byte 0x0 135 ; IASM-NEXT: .byte 0x0
138 ; IASM-NEXT: .byte 0x0 136 ; IASM-NEXT: .byte 0x0
139 ; IASM-NEXT: .byte 0x0 137 ; IASM-NEXT: .byte 0x0
140 ; IASM-NEXT: .byte 0xea 138 ; IASM-NEXT: .byte 0xea
141 139
142 else: 140 else:
143 ; ASM-LABEL:.Lmult_fwd_branches$else: 141 ; ASM-LABEL:.Lmult_fwd_branches$else:
144 ; IASM-LABEL:.Lmult_fwd_branches$else: 142 ; IASM-LABEL:.Lmult_fwd_branches$else:
145 143
146 br label %end 144 br label %end
147 ; ASM-NEXT: b .Lmult_fwd_branches$end 145 ; ASM-NEXT: b .Lmult_fwd_branches$end
148
149 ; DIS-NEXT: 38: eaffffff 146 ; DIS-NEXT: 38: eaffffff
150
151 ; IASM-NEXT: .byte 0xff 147 ; IASM-NEXT: .byte 0xff
152 ; IASM-NEXT: .byte 0xff 148 ; IASM-NEXT: .byte 0xff
153 ; IASM-NEXT: .byte 0xff 149 ; IASM-NEXT: .byte 0xff
154 ; IASM-NEXT: .byte 0xea 150 ; IASM-NEXT: .byte 0xea
155 151
156 152
157 end: 153 end:
158 ; ASM-LABEL:.Lmult_fwd_branches$end: 154 ; ASM-LABEL:.Lmult_fwd_branches$end:
159 ; IASM-LABEL: .Lmult_fwd_branches$end: 155 ; IASM-LABEL: .Lmult_fwd_branches$end:
160 156
161 ret void 157 ret void
162 158
163 ; ASM-NEXT: add sp, sp, #12 159 ; ASM-NEXT: add sp, sp, #12
164 ; ASM-NEXT: bx lr
165
166 ; DIS-NEXT: 3c: e28dd00c 160 ; DIS-NEXT: 3c: e28dd00c
167 ; DIS-NEXT: 40: e12fff1e
168
169 ; IASM-NEXT: .byte 0xc 161 ; IASM-NEXT: .byte 0xc
170 ; IASM-NEXT: .byte 0xd0 162 ; IASM-NEXT: .byte 0xd0
171 ; IASM-NEXT: .byte 0x8d 163 ; IASM-NEXT: .byte 0x8d
172 ; IASM-NEXT: .byte 0xe2 164 ; IASM-NEXT: .byte 0xe2
173 165
166 ; ASM-NEXT: bx lr
167 ; DIS-NEXT: 40: e12fff1e
174 ; IASM-NEXT: .byte 0x1e 168 ; IASM-NEXT: .byte 0x1e
175 ; IASM-NEXT: .byte 0xff 169 ; IASM-NEXT: .byte 0xff
176 ; IASM-NEXT: .byte 0x2f 170 ; IASM-NEXT: .byte 0x2f
177 ; IASM-NEXT: .byte 0xe1 171 ; IASM-NEXT: .byte 0xe1
178 } 172 }
OLDNEW
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/ldr-shift.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698