1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
# RUN: llvm-mc -triple hexagon -disassemble < %s | FileCheck %s
# Hexagon Programmer's Reference Manual 11.4 J
# Call subroutine
0x22 0xc0 0x00 0x5a
# CHECK: call
0x22 0xc3 0x00 0x5d
# CHECK: if (p3) call
0x22 0xc3 0x20 0x5d
# CHECK: if (!p3) call
# Compare and jump
0x00 0xc0 0x89 0x11
# CHECK: p0 = cmp.eq(r9,#-1); if (p0.new) jump:nt
0x00 0xc1 0x89 0x11
# CHECK: p0 = cmp.gt(r9,#-1); if (p0.new) jump:nt
0x00 0xc3 0x89 0x11
# CHECK: p0 = tstbit(r9, #0); if (p0.new) jump:nt
0x00 0xe0 0x89 0x11
# CHECK: p0 = cmp.eq(r9,#-1); if (p0.new) jump:t
0x00 0xe1 0x89 0x11
# CHECK: p0 = cmp.gt(r9,#-1); if (p0.new) jump:t
0x00 0xe3 0x89 0x11
# CHECK: p0 = tstbit(r9, #0); if (p0.new) jump:t
0x00 0xc0 0xc9 0x11
# CHECK: p0 = cmp.eq(r9,#-1); if (!p0.new) jump:nt
0x00 0xc1 0xc9 0x11
# CHECK: p0 = cmp.gt(r9,#-1); if (!p0.new) jump:nt
0x00 0xc3 0xc9 0x11
# CHECK: p0 = tstbit(r9, #0); if (!p0.new) jump:nt
0x00 0xe0 0xc9 0x11
# CHECK: p0 = cmp.eq(r9,#-1); if (!p0.new) jump:t
0x00 0xe1 0xc9 0x11
# CHECK: p0 = cmp.gt(r9,#-1); if (!p0.new) jump:t
0x00 0xe3 0xc9 0x11
# CHECK: p0 = tstbit(r9, #0); if (!p0.new) jump:t
0x00 0xd5 0x09 0x10
# CHECK: p0 = cmp.eq(r9, #21); if (p0.new) jump:nt
0x00 0xf5 0x09 0x10
# CHECK: p0 = cmp.eq(r9, #21); if (p0.new) jump:t
0x00 0xd5 0x49 0x10
# CHECK: p0 = cmp.eq(r9, #21); if (!p0.new) jump:nt
0x00 0xf5 0x49 0x10
# CHECK: p0 = cmp.eq(r9, #21); if (!p0.new) jump:t
0x00 0xd5 0x89 0x10
# CHECK: p0 = cmp.gt(r9, #21); if (p0.new) jump:nt
0x00 0xf5 0x89 0x10
# CHECK: p0 = cmp.gt(r9, #21); if (p0.new) jump:t
0x00 0xd5 0xc9 0x10
# CHECK: p0 = cmp.gt(r9, #21); if (!p0.new) jump:nt
0x00 0xf5 0xc9 0x10
# CHECK: p0 = cmp.gt(r9, #21); if (!p0.new) jump:t
0x00 0xd5 0x09 0x11
# CHECK: p0 = cmp.gtu(r9, #21); if (p0.new) jump:nt
0x00 0xf5 0x09 0x11
# CHECK: p0 = cmp.gtu(r9, #21); if (p0.new) jump:t
0x00 0xd5 0x49 0x11
# CHECK: p0 = cmp.gtu(r9, #21); if (!p0.new) jump:nt
0x00 0xf5 0x49 0x11
# CHECK: p0 = cmp.gtu(r9, #21); if (!p0.new) jump:t
0x00 0xc0 0x89 0x13
# CHECK: p1 = cmp.eq(r9,#-1); if (p1.new) jump:nt
0x00 0xc1 0x89 0x13
# CHECK: p1 = cmp.gt(r9,#-1); if (p1.new) jump:nt
0x00 0xc3 0x89 0x13
# CHECK: p1 = tstbit(r9, #0); if (p1.new) jump:nt
0x00 0xe0 0x89 0x13
# CHECK: p1 = cmp.eq(r9,#-1); if (p1.new) jump:t
0x00 0xe1 0x89 0x13
# CHECK: p1 = cmp.gt(r9,#-1); if (p1.new) jump:t
0x00 0xe3 0x89 0x13
# CHECK: p1 = tstbit(r9, #0); if (p1.new) jump:t
0x00 0xc0 0xc9 0x13
# CHECK: p1 = cmp.eq(r9,#-1); if (!p1.new) jump:nt
0x00 0xc1 0xc9 0x13
# CHECK: p1 = cmp.gt(r9,#-1); if (!p1.new) jump:nt
0x00 0xc3 0xc9 0x13
# CHECK: p1 = tstbit(r9, #0); if (!p1.new) jump:nt
0x00 0xe0 0xc9 0x13
# CHECK: p1 = cmp.eq(r9,#-1); if (!p1.new) jump:t
0x00 0xe1 0xc9 0x13
# CHECK: p1 = cmp.gt(r9,#-1); if (!p1.new) jump:t
0x00 0xe3 0xc9 0x13
# CHECK: p1 = tstbit(r9, #0); if (!p1.new) jump:t
0x00 0xd5 0x09 0x12
# CHECK: p1 = cmp.eq(r9, #21); if (p1.new) jump:nt
0x00 0xf5 0x09 0x12
# CHECK: p1 = cmp.eq(r9, #21); if (p1.new) jump:t
0x00 0xd5 0x49 0x12
# CHECK: p1 = cmp.eq(r9, #21); if (!p1.new) jump:nt
0x00 0xf5 0x49 0x12
# CHECK: p1 = cmp.eq(r9, #21); if (!p1.new) jump:t
0x00 0xd5 0x89 0x12
# CHECK: p1 = cmp.gt(r9, #21); if (p1.new) jump:nt
0x00 0xf5 0x89 0x12
# CHECK: p1 = cmp.gt(r9, #21); if (p1.new) jump:t
0x00 0xd5 0xc9 0x12
# CHECK: p1 = cmp.gt(r9, #21); if (!p1.new) jump:nt
0x00 0xf5 0xc9 0x12
# CHECK: p1 = cmp.gt(r9, #21); if (!p1.new) jump:t
0x00 0xd5 0x09 0x13
# CHECK: p1 = cmp.gtu(r9, #21); if (p1.new) jump:nt
0x00 0xf5 0x09 0x13
# CHECK: p1 = cmp.gtu(r9, #21); if (p1.new) jump:t
0x00 0xd5 0x49 0x13
# CHECK: p1 = cmp.gtu(r9, #21); if (!p1.new) jump:nt
0x00 0xf5 0x49 0x13
# CHECK: p1 = cmp.gtu(r9, #21); if (!p1.new) jump:t
0x00 0xcd 0x09 0x14
# CHECK: p0 = cmp.eq(r9, r13); if (p0.new) jump:nt
0x00 0xdd 0x09 0x14
# CHECK: p1 = cmp.eq(r9, r13); if (p1.new) jump:nt
0x00 0xed 0x09 0x14
# CHECK: p0 = cmp.eq(r9, r13); if (p0.new) jump:t
0x00 0xfd 0x09 0x14
# CHECK: p1 = cmp.eq(r9, r13); if (p1.new) jump:t
0x00 0xcd 0x49 0x14
# CHECK: p0 = cmp.eq(r9, r13); if (!p0.new) jump:nt
0x00 0xdd 0x49 0x14
# CHECK: p1 = cmp.eq(r9, r13); if (!p1.new) jump:nt
0x00 0xed 0x49 0x14
# CHECK: p0 = cmp.eq(r9, r13); if (!p0.new) jump:t
0x00 0xfd 0x49 0x14
# CHECK: p1 = cmp.eq(r9, r13); if (!p1.new) jump:t
0x00 0xcd 0x89 0x14
# CHECK: p0 = cmp.gt(r9, r13); if (p0.new) jump:nt
0x00 0xdd 0x89 0x14
# CHECK: p1 = cmp.gt(r9, r13); if (p1.new) jump:nt
0x00 0xed 0x89 0x14
# CHECK: p0 = cmp.gt(r9, r13); if (p0.new) jump:t
0x00 0xfd 0x89 0x14
# CHECK: p1 = cmp.gt(r9, r13); if (p1.new) jump:t
0x00 0xcd 0xc9 0x14
# CHECK: p0 = cmp.gt(r9, r13); if (!p0.new) jump:nt
0x00 0xdd 0xc9 0x14
# CHECK: p1 = cmp.gt(r9, r13); if (!p1.new) jump:nt
0x00 0xed 0xc9 0x14
# CHECK: p0 = cmp.gt(r9, r13); if (!p0.new) jump:t
0x00 0xfd 0xc9 0x14
# CHECK: p1 = cmp.gt(r9, r13); if (!p1.new) jump:t
0x00 0xcd 0x09 0x15
# CHECK: p0 = cmp.gtu(r9, r13); if (p0.new) jump:nt
0x00 0xdd 0x09 0x15
# CHECK: p1 = cmp.gtu(r9, r13); if (p1.new) jump:nt
0x00 0xed 0x09 0x15
# CHECK: p0 = cmp.gtu(r9, r13); if (p0.new) jump:t
0x00 0xfd 0x09 0x15
# CHECK: p1 = cmp.gtu(r9, r13); if (p1.new) jump:t
0x00 0xcd 0x49 0x15
# CHECK: p0 = cmp.gtu(r9, r13); if (!p0.new) jump:nt
0x00 0xdd 0x49 0x15
# CHECK: p1 = cmp.gtu(r9, r13); if (!p1.new) jump:nt
0x00 0xed 0x49 0x15
# CHECK: p0 = cmp.gtu(r9, r13); if (!p0.new) jump:t
0x00 0xfd 0x49 0x15
# CHECK: p1 = cmp.gtu(r9, r13); if (!p1.new) jump:t
# Jump to address
0x22 0xc0 0x00 0x58
# CHECK: jump
0x22 0xc3 0x00 0x5c
# CHECK: if (p3) jump
0x22 0xc3 0x20 0x5c
# CHECK: if (!p3) jump
# Jump to address conditioned on new predicate
0x03 0x40 0x45 0x85 0x00 0xcb 0x00 0x5c
# CHECK: p3 = r5
# CHECK-NEXT: if (p3.new) jump:nt
0x03 0x40 0x45 0x85 0x00 0xdb 0x00 0x5c
# CHECK: p3 = r5
# CHECK-NEXT: if (p3.new) jump:t
0x03 0x40 0x45 0x85 0x00 0xcb 0x20 0x5c
# CHECK: p3 = r5
# CHECK-NEXT: if (!p3.new) jump:nt
0x03 0x40 0x45 0x85 0x00 0xdb 0x20 0x5c
# CHECK: p3 = r5
# CHECK-NEXT: if (!p3.new) jump:t
# Jump to address conditioned on register value
0x00 0xc0 0x11 0x61
# CHECK: if (r17!=#0) jump:nt
0x00 0xd0 0x11 0x61
# CHECK: if (r17!=#0) jump:t
0x00 0xc0 0x51 0x61
# CHECK: if (r17>=#0) jump:nt
0x00 0xd0 0x51 0x61
# CHECK: if (r17>=#0) jump:t
0x00 0xc0 0x91 0x61
# CHECK: if (r17==#0) jump:nt
0x00 0xd0 0x91 0x61
# CHECK: if (r17==#0) jump:t
0x00 0xc0 0xd1 0x61
# CHECK: if (r17<=#0) jump:nt
0x00 0xd0 0xd1 0x61
# CHECK: if (r17<=#0) jump:t
# Transfer and jump
0x00 0xd5 0x09 0x16
# CHECK: r9 = #21 ; jump
0x00 0xc9 0x0d 0x17
# CHECK: r9 = r13 ; jump
|