1 # RUN: llvm-mc -triple hexagon -disassemble < %s | FileCheck %s
2 # Hexagon Programmer's Reference Manual 11.1.3 ALU32/PRED
6 # CHECK: if (p3) r17 = add(r21,#31)
7 0x03 0x40 0x45 0x85 0xf1 0xe3 0x75 0x74
9 # CHECK-NEXT: if (p3.new) r17 = add(r21,#31)
11 # CHECK: if (!p3) r17 = add(r21,#31)
12 0x03 0x40 0x45 0x85 0xf1 0xe3 0xf5 0x74
14 # CHECK-NEXT: if (!p3.new) r17 = add(r21,#31)
16 # CHECK: if (p3) r17 = add(r21,r31)
17 0x03 0x40 0x45 0x85 0x71 0xff 0x15 0xfb
19 # CHECK-NEXT: if (p3.new) r17 = add(r21,r31)
21 # CHECK: if (!p3) r17 = add(r21,r31)
22 0x03 0x40 0x45 0x85 0xf1 0xff 0x15 0xfb
24 # CHECK-NEXT: if (!p3.new) r17 = add(r21,r31)
26 # Conditional shift halfword
28 # CHECK: if (p3) r17 = aslh(r21)
29 0x03 0x40 0x45 0x85 0x11 0xe7 0x15 0x70
31 # CHECK-NEXT: if (p3.new) r17 = aslh(r21)
33 # CHECK: if (!p3) r17 = aslh(r21)
34 0x03 0x40 0x45 0x85 0x11 0xef 0x15 0x70
36 # CHECK-NEXT: if (!p3.new) r17 = aslh(r21)
38 # CHECK: if (p3) r17 = asrh(r21)
39 0x03 0x40 0x45 0x85 0x11 0xe7 0x35 0x70
41 # CHECK-NEXT: if (p3.new) r17 = asrh(r21)
43 # CHECK: if (!p3) r17 = asrh(r21)
44 0x03 0x40 0x45 0x85 0x11 0xef 0x35 0x70
46 # CHECK-NEXT: if (!p3.new) r17 = asrh(r21)
50 # CHECK: if (p3) r17:16 = combine(r21,r31)
52 # CHECK: if (!p3) r17:16 = combine(r21,r31)
53 0x03 0x40 0x45 0x85 0x70 0xff 0x15 0xfd
55 # CHECK-NEXT: if (p3.new) r17:16 = combine(r21,r31)
56 0x03 0x40 0x45 0x85 0xf0 0xff 0x15 0xfd
58 # CHECK-NEXT: if (!p3.new) r17:16 = combine(r21,r31)
60 # Conditional logical operations
62 # CHECK: if (p3) r17 = and(r21,r31)
64 # CHECK: if (!p3) r17 = and(r21,r31)
65 0x03 0x40 0x45 0x85 0x71 0xff 0x15 0xf9
67 # CHECK-NEXT: if (p3.new) r17 = and(r21,r31)
68 0x03 0x40 0x45 0x85 0xf1 0xff 0x15 0xf9
70 # CHECK-NEXT: if (!p3.new) r17 = and(r21,r31)
72 # CHECK: if (p3) r17 = or(r21,r31)
74 # CHECK: if (!p3) r17 = or(r21,r31)
75 0x03 0x40 0x45 0x85 0x71 0xff 0x35 0xf9
77 # CHECK-NEXT: if (p3.new) r17 = or(r21,r31)
78 0x03 0x40 0x45 0x85 0xf1 0xff 0x35 0xf9
80 # CHECK-NEXT: if (!p3.new) r17 = or(r21,r31)
82 # CHECK: if (p3) r17 = xor(r21,r31)
84 # CHECK: if (!p3) r17 = xor(r21,r31)
85 0x03 0x40 0x45 0x85 0x71 0xff 0x75 0xf9
87 # CHECK-NEXT: if (p3.new) r17 = xor(r21,r31)
88 0x03 0x40 0x45 0x85 0xf1 0xff 0x75 0xf9
90 # CHECK-NEXT: if (!p3.new) r17 = xor(r21,r31)
92 # Conditional subtract
94 # CHECK: if (p3) r17 = sub(r31,r21)
96 # CHECK: if (!p3) r17 = sub(r31,r21)
97 0x03 0x40 0x45 0x85 0x71 0xff 0x35 0xfb
99 # CHECK-NEXT: if (p3.new) r17 = sub(r31,r21)
100 0x03 0x40 0x45 0x85 0xf1 0xff 0x35 0xfb
102 # CHECK-NEXT: if (!p3.new) r17 = sub(r31,r21)
104 # Conditional sign extend
106 # CHECK: if (p3) r17 = sxtb(r21)
108 # CHECK: if (!p3) r17 = sxtb(r21)
109 0x03 0x40 0x45 0x85 0x11 0xe7 0xb5 0x70
111 # CHECK-NEXT: if (p3.new) r17 = sxtb(r21)
112 0x03 0x40 0x45 0x85 0x11 0xef 0xb5 0x70
114 # CHECK-NEXT: if (!p3.new) r17 = sxtb(r21)
116 # CHECK: if (p3) r17 = sxth(r21)
118 # CHECK: if (!p3) r17 = sxth(r21)
119 0x03 0x40 0x45 0x85 0x11 0xe7 0xf5 0x70
121 # CHECK-NEXT: if (p3.new) r17 = sxth(r21)
122 0x03 0x40 0x45 0x85 0x11 0xef 0xf5 0x70
124 # CHECK-NEXT: if (!p3.new) r17 = sxth(r21)
126 # Conditional transfer
128 # CHECK: if (p3) r17 = #21
130 # CHECK: if (!p3) r17 = #21
131 0x03 0x40 0x45 0x85 0xb1 0xe2 0x60 0x7e
133 # CHECK-NEXT: if (p3.new) r17 = #21
134 0x03 0x40 0x45 0x85 0xb1 0xe2 0xe0 0x7e
136 # CHECK-NEXT: if (!p3.new) r17 = #21
138 # Conditional zero extend
140 # CHECK: if (p3) r17 = zxtb(r21)
142 # CHECK: if (!p3) r17 = zxtb(r21)
143 0x03 0x40 0x45 0x85 0x11 0xe7 0x95 0x70
145 # CHECK-NEXT: if (p3.new) r17 = zxtb(r21)
146 0x03 0x40 0x45 0x85 0x11 0xef 0x95 0x70
148 # CHECK-NEXT: if (!p3.new) r17 = zxtb(r21)
150 # CHECK: if (p3) r17 = zxth(r21)
152 # CHECK: if (!p3) r17 = zxth(r21)
153 0x03 0x40 0x45 0x85 0x11 0xe7 0xd5 0x70
155 # CHECK-NEXT: if (p3.new) r17 = zxth(r21)
156 0x03 0x40 0x45 0x85 0x11 0xef 0xd5 0x70
158 # CHECK-NEXT: if (!p3.new) r17 = zxth(r21)
162 # CHECK: p3 = cmp.eq(r21,#31)
164 # CHECK: p3 = !cmp.eq(r21,#31)
166 # CHECK: p3 = cmp.gt(r21,#31)
168 # CHECK: p3 = !cmp.gt(r21,#31)
170 # CHECK: p3 = cmp.gtu(r21,#31)
172 # CHECK: p3 = !cmp.gtu(r21,#31)
174 # CHECK: p3 = cmp.eq(r21,r31)
176 # CHECK: p3 = !cmp.eq(r21,r31)
178 # CHECK: p3 = cmp.gt(r21,r31)
180 # CHECK: p3 = !cmp.gt(r21,r31)
182 # CHECK: p3 = cmp.gtu(r21,r31)
184 # CHECK: p3 = !cmp.gtu(r21,r31)
186 # Compare to general register
188 # CHECK: r17 = cmp.eq(r21,#31)
190 # CHECK: r17 = !cmp.eq(r21,#31)
192 # CHECK: r17 = cmp.eq(r21,r31)
194 # CHECK: r17 = !cmp.eq(r21,r31)