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

Side by Side Diff: tests_lit/assembler/arm32/mvn.ll

Issue 1460523005: Add MVN (register, immediate) to ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Tests MVN instruction.
2
3 ; REQUIRES: allow_dump
4
5 ; Compile using standalone assembler.
6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
7 ; RUN: | FileCheck %s --check-prefix=ASM
8
9 ; Show bytes in assembled standalone code.
10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
11 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
12
13 ; Compile using integrated assembler.
14 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
15 ; RUN: | FileCheck %s --check-prefix=IASM
16
17 ; Show bytes in assembled integrated code.
18 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
19 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
20
21 define internal void @mvmEx(i32 %a, i32 %b) {
Jim Stichnoth 2015/11/22 04:15:38 Should this be named mvnEx instead?
Karl 2015/11/30 16:54:11 Done.
22 ; ASM-LABEL:mvmEx:
23 ; DIS-LABEL:00000000 <mvmEx>:
24 ; IASM-LABEL:mvmEx:
25
26 entry:
27 ; ASM-NEXT:.LmvmEx$entry:
28 ; IASM-NEXT:.LmvmEx$entry:
29
30 ; ASM-NEXT: sub sp, sp, #24
31 ; DIS-NEXT: 0: e24dd018
32 ; IASM-NEXT: .byte 0x18
33 ; IASM-NEXT: .byte 0xd0
34 ; IASM-NEXT: .byte 0x4d
35 ; IASM-NEXT: .byte 0xe2
36
37 ; ASM-NEXT: str r0, [sp, #20]
38 ; ASM-NEXT: # [sp, #20] = def.pseudo
39 ; DIS-NEXT: 4: e58d0014
40 ; IASM-NEXT: .byte 0x14
41 ; IASM-NEXT: .byte 0x0
42 ; IASM-NEXT: .byte 0x8d
43 ; IASM-NEXT: .byte 0xe5
44
45 ; ASM-NEXT: str r1, [sp, #16]
46 ; ASM-NEXT: # [sp, #16] = def.pseudo
47 ; DIS-NEXT: 8: e58d1010
48 ; IASM-NEXT: .byte 0x10
49 ; IASM-NEXT: .byte 0x10
50 ; IASM-NEXT: .byte 0x8d
51 ; IASM-NEXT: .byte 0xe5
52
53 %b.arg_trunc = trunc i32 %b to i1
54
55 ; ASM-NEXT: ldr r0, [sp, #16]
56 ; DIS-NEXT: c: e59d0010
57 ; IASM-NEXT: .byte 0x10
58 ; IASM-NEXT: .byte 0x0
59 ; IASM-NEXT: .byte 0x9d
60 ; IASM-NEXT: .byte 0xe5
61
62 ; ASM-NEXT: and r0, r0, #1
63 ; DIS-NEXT: 10: e2000001
64 ; IASM-NEXT: .byte 0x1
65 ; IASM-NEXT: .byte 0x0
66 ; IASM-NEXT: .byte 0x0
67 ; IASM-NEXT: .byte 0xe2
68
69 ; ASM-NEXT: strb r0, [sp, #12]
70 ; ASM-NEXT: # [sp, #12] = def.pseudo
71 ; DIS-NEXT: 14: e5cd000c
72 ; IASM-NEXT: strb r0, [sp, #12]
73
74 %a.arg_trunc = trunc i32 %a to i1
75
76 ; ASM-NEXT: ldr r0, [sp, #20]
77 ; DIS-NEXT: 18: e59d0014
78 ; IASM-NEXT: .byte 0x14
79 ; IASM-NEXT: .byte 0x0
80 ; IASM-NEXT: .byte 0x9d
81 ; IASM-NEXT: .byte 0xe5
82
83 ; ASM-NEXT: and r0, r0, #1
84 ; DIS-NEXT: 1c: e2000001
85 ; IASM-NEXT: .byte 0x1
86 ; IASM-NEXT: .byte 0x0
87 ; IASM-NEXT: .byte 0x0
88 ; IASM-NEXT: .byte 0xe2
89
90 ; ASM-NEXT: strb r0, [sp, #8]
91 ; ASM-NEXT: # [sp, #8] = def.pseudo
92 ; DIS-NEXT: 20: e5cd0008
93 ; IASM-NEXT: strb r0, [sp, #8]
94
95 %conv = zext i1 %a.arg_trunc to i32
96
97 ; ASM-NEXT: ldrb r0, [sp, #8]
98 ; DIS-NEXT: 24: e5dd0008
99 ; IASM-NEXT: ldrb r0, [sp, #8]
100
101 ; ASM-NEXT: str r0, [sp, #4]
102 ; ASM-NEXT: # [sp, #4] = def.pseudo
103 ; DIS-NEXT: 28: e58d0004
104 ; IASM-NEXT: .byte 0x4
105 ; IASM-NEXT: .byte 0x0
106 ; IASM-NEXT: .byte 0x8d
107 ; IASM-NEXT: .byte 0xe5
108
109 %ignore = sext i1 %b.arg_trunc to i32
110
111 ; ASM-NEXT: mov r0, #0
112 ; DIS-NEXT: 2c: e3a00000
113 ; IASM-NEXT: .byte 0x0
114 ; IASM-NEXT: .byte 0x0
115 ; IASM-NEXT: .byte 0xa0
116 ; IASM-NEXT: .byte 0xe3
117
118 ; ASM-NEXT: ldrb r1, [sp, #12]
119 ; DIS-NEXT: 30: e5dd100c
120 ; IASM-NEXT: ldrb r1, [sp, #12]
121
122 ; ASM-NEXT: tst r1, #1
123 ; DIS-NEXT: 34: e3110001
124 ; IASM-NEXT: .byte 0x1
125 ; IASM-NEXT: .byte 0x0
126 ; IASM-NEXT: .byte 0x11
127 ; IASM-NEXT: .byte 0xe3
128
129 ; ********* Use of MVN ********
130 ; ASM-NEXT: mvn r1, #0
131 ; DIS-NEXT: 38: e3e01000
132 ; IASM-NEXT: .byte 0x0
133 ; IASM-NEXT: .byte 0x10
134 ; IASM-NEXT: .byte 0xe0
135 ; IASM-NEXT: .byte 0xe3
136
137 ; ASM-NEXT: movne r0, r1
138 ; DIS-NEXT: 3c: 11a00001
139 ; IASM-NEXT: .byte 0x1
140 ; IASM-NEXT: .byte 0x0
141 ; IASM-NEXT: .byte 0xa0
142 ; IASM-NEXT: .byte 0x11
143
144 ret void
145 }
OLDNEW
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698