1 @ RUN
: llvm-mc
-mcpu
=cortex-a8
-triple thumb-unknown-unknown
-show-encoding
< %s | FileCheck
%s
5 @ CHECK
: adc
r1, r1, #171 @ encoding: [0xab,0x01,0x41,0xf1]
7 @ CHECK
: adc
r1, r1, #1179666 @ encoding: [0x12,0x11,0x41,0xf1]
9 @ CHECK
: adc
r1, r1, #872428544 @ encoding: [0x34,0x21,0x41,0xf1]
10 adc
r1, r1, #872428544
11 @ CHECK
: adc
r1, r1, #1448498774 @ encoding: [0x56,0x31,0x41,0xf1]
12 adc
r1, r1, #1448498774
13 @ CHECK
: adc
r1, r1, #66846720 @ encoding: [0x7f,0x71,0x41,0xf1]
16 @ CHECK
: mvn
r0, #187 @ encoding: [0xbb,0x00,0x6f,0xf0]
18 @ CHECK
: mvn
r0, #11141290 @ encoding: [0xaa,0x10,0x6f,0xf0]
20 @ CHECK
: mvn
r0, #-872363008 @ encoding: [0xcc,0x20,0x6f,0xf0]
22 @ CHECK
: mvn
r0, #1114112 @ encoding: [0x88,0x10,0x6f,0xf4]
25 @ CHECK
: cmp.w
r0, #11141290 @ encoding: [0xaa,0x1f,0xb0,0xf1]
27 @ CHECK
: cmp.w
r0, #-872363008 @ encoding: [0xcc,0x2f,0xb0,0xf1]
29 @ CHECK
: cmp.w
r0, #-572662307 @ encoding: [0xdd,0x3f,0xb0,0xf1]
31 @ CHECK
: cmp.w
r0, #1114112 @ encoding: [0x88,0x1f,0xb0,0xf5]
33 @ CHECK
: cmp.w
r0, r1, lsl
#5 @ encoding: [0x41,0x1f,0xb0,0xeb]
36 @ CHECK
: sxtab
r0, r1, r0 @ encoding
: [0x80,0xf0,0x41,0xfa]
37 sxtab
r0, r1, r0 @ encoding
: [0x80,0xf0,0x41,0xfa]
39 @ CHECK
: movw
r0, #65535 @ encoding: [0xff,0x70,0x4f,0xf6]
41 @ CHECK
: movw
r1, #43777 @ encoding: [0x01,0x31,0x4a,0xf6]
43 @ CHECK
: movt
r1, #427 @ encoding: [0xab,0x11,0xc0,0xf2]
45 @ CHECK
: movw
r1, #43792 @ encoding: [0x10,0x31,0x4a,0xf6]
47 @ CHECK
: movt
r1, #4267 @ encoding: [0xab,0x01,0xc0,0xf2]
49 @ CHECK
: mov.w
r0, #66846720 @ encoding: [0x7f,0x70,0x4f,0xf0]
52 @ CHECK
: rrx
r0, r0 @ encoding
: [0x30,0x00,0x4f,0xea]
55 @ CHECK
: bfc
r0, #4, #20 @ encoding: [0x17,0x10,0x6f,0xf3]
57 @ CHECK
: bfc
r0, #0, #23 @ encoding: [0x16,0x00,0x6f,0xf3]
59 @ CHECK
: bfc
r0, #12, #20 @ encoding: [0x1f,0x30,0x6f,0xf3]
62 @ CHECK
: sbfx
r0, r0, #7, #11 @ encoding: [0xca,0x10,0x40,0xf3]
64 @ CHECK
: ubfx
r0, r0, #7, #11 @ encoding: [0xca,0x10,0xc0,0xf3]
67 @ CHECK
: mla
r0, r0, r1, r2 @ encoding
: [0x01,0x20,0x00,0xfb]
69 @ CHECK
: mls
r0, r0, r1, r2 @ encoding
: [0x11,0x20,0x00,0xfb]
72 @ CHECK
: smlabt
r0, r1, r2, r0 @ encoding
: [0x12,0x00,0x11,0xfb]
75 @ CHECK
: clz
r0, r0 @ encoding
: [0x80,0xf0,0xb0,0xfa]
78 @ CHECK
: pkhbt
r0, r0, r1, lsl
#16 @ encoding: [0x01,0x40,0xc0,0xea]
79 pkhbt
r0, r0, r1, lsl
#16
80 @ CHECK
: pkhbt
r0, r0, r1, lsl
#12 @ encoding: [0x01,0x30,0xc0,0xea]
81 pkhbt
r0, r0, r1, lsl
#16
82 @ CHECK
: pkhbt
r0, r0, r1, lsl
#18 @ encoding: [0x81,0x40,0xc0,0xea]
83 pkhbt
r0, r0, r1, lsl
#18
84 @ CHECK
: pkhbt
r0, r0, r1 @ encoding
: [0x01,0x00,0xc0,0xea]
86 @ CHECK
: pkhtb
r0, r0, r1, asr
#16 @ encoding: [0x21,0x40,0xc0,0xea]
87 pkhtb
r0, r0, r1, asr
#16
88 @ CHECK
: pkhtb
r0, r0, r1, asr
#12 @ encoding: [0x21,0x30,0xc0,0xea]
89 pkhtb
r0, r0, r1, asr
#12
90 @ CHECK
: pkhtb
r0, r0, r1, asr
#18 @ encoding: [0xa1,0x40,0xc0,0xea]
91 pkhtb
r0, r0, r1, asr
#18
92 @ CHECK
: pkhtb
r0, r0, r1, asr
#22 @ encoding: [0xa1,0x50,0xc0,0xea]
93 pkhtb
r0, r0, r1, asr
#22
95 @ CHECK
: dmb
st @ encoding
: [0x5e,0x8f,0xbf,0xf3]
97 @ CHECK
: dmb sy @ encoding
: [0x5f,0x8f,0xbf,0xf3]
99 @ CHECK
: dmb ishst @ encoding
: [0x5a,0x8f,0xbf,0xf3]
101 @ CHECK
: dmb ish @ encoding
: [0x5b,0x8f,0xbf,0xf3]
104 @ CHECK
: str.w
r0, [r1, #4092] @ encoding: [0xfc,0x0f,0xc1,0xf8]
105 str.w
r0, [r1, #4092]
106 @ CHECK
: str
r0, [r1, #-128] @ encoding: [0x80,0x0c,0x41,0xf8]
108 @ CHECK
: str.w
r0, [r1, r2, lsl
#2] @ encoding: [0x22,0x00,0x41,0xf8
109 str.w
r0, [r1, r2, lsl
#2]
111 @ CHECK
: ldr.w
r0, [r0, #4092] @ encoding: [0xfc,0x0f,0xd0,0xf8]
112 ldr.w
r0, [r0, #4092]
113 @ CHECK
: ldr
r0, [r0, #-128] @ encoding: [0x80,0x0c,0x50,0xf8]
115 @ CHECK
: ldr.w
r0, [r0, r1, lsl
#2] @ encoding: [0x21,0x00,0x50,0xf8]
116 ldr.w
r0, [r0, r1, lsl
#2]
118 @ CHECK
: str
r1, [r0, #16]! @ encoding: [0x10,0x1f,0x40,0xf8]
120 @ CHECK
: strh
r1, [r0, #8]! @ encoding: [0x08,0x1f,0x20,0xf8]
122 @ CHECK
: strh
r2, [r0], #-4 @ encoding: [0x04,0x29,0x20,0xf8]
124 @ CHECK
: str
r2, [r0], #-4 @ encoding: [0x04,0x29,0x40,0xf8]
127 @ CHECK
: ldr
r2, [r0, #16]! @ encoding: [0x10,0x2f,0x50,0xf8]
129 @ CHECK
: ldr
r2, [r0, #-64]! @ encoding: [0x40,0x2d,0x50,0xf8]
131 @ CHECK
: ldrsb
r2, [r0, #4]! @ encoding: [0x04,0x2f,0x10,0xf9]
134 @ CHECK
: strb.w
r0, [r1, #4092] @ encoding: [0xfc,0x0f,0x81,0xf8]
135 strb.w
r0, [r1, #4092]
136 @ CHECK
: strb
r0, [r1, #-128] @ encoding: [0x80,0x0c,0x01,0xf8]
138 @ CHECK
: strb.w
r0, [r1, r2, lsl
#2] @ encoding: [0x22,0x00,0x01,0xf8]
139 strb.w
r0, [r1, r2, lsl
#2]
140 @ CHECK
: strh.w
r0, [r1, #4092] @ encoding: [0xfc,0x0f,0xa1,0xf8]
141 strh.w
r0, [r1, #4092]
142 @ CHECK
: strh
r0, [r1, #-128] @ encoding: [0x80,0x0c,0x21,0xf8]
144 @ CHECK
: strh
r0, [r1, #-128] @ encoding: [0x80,0x0c,0x21,0xf8]
146 @ CHECK
: strh.w
r0, [r1, r2, lsl
#2] @ encoding: [0x22,0x00,0x21,0xf8]
147 strh.w
r0, [r1, r2, lsl
#2]
149 @ CHECK
: ldrb
r0, [r0, #-1] @ encoding: [0x01,0x0c,0x10,0xf8]
151 @ CHECK
: ldrb
r0, [r0, #-128] @ encoding: [0x80,0x0c,0x10,0xf8]
153 @ CHECK
: ldrb.w
r0, [r0, r1, lsl
#2] @ encoding: [0x21,0x00,0x10,0xf8]
154 ldrb.w
r0, [r0, r1, lsl
#2]
155 @ CHECK
: ldrh.w
r0, [r0, #2046] @ encoding: [0xfe,0x07,0xb0,0xf8]
156 ldrh.w
r0, [r0, #2046]
157 @ CHECK
: ldrh
r0, [r0, #-128] @ encoding: [0x80,0x0c,0x30,0xf8]
159 @ CHECK
: ldrh.w
r0, [r0, r1, lsl
#2] @ encoding: [0x21,0x00,0x30,0xf8]
160 ldrh.w
r0, [r0, r1, lsl
#2]
161 @ CHECK
: ldrsb.w
r0, [r0] @ encoding
: [0x00,0x00,0x90,0xf9]
163 @ CHECK
: ldrsh.w
r0, [r0] @ encoding
: [0x00,0x00,0xb0,0xf9]
165 @ CHECK
: bfi
r0, r0, #5, #7 @ encoding: [0x60,0xf3,0x4b,0x10]
167 @ CHECK
: isb @ encoding
: [0xbf,0xf3,0x6f,0x8f]
169 @ CHECK
: mrs
r0, cpsr @ encoding
: [0xef,0xf3,0x00,0x80]
171 @ CHECK
: vmrs
r0, fpscr @ encoding
: [0xf1,0xee,0x10,0x0a]
173 @ CHECK
: vmrs
r0, fpexc @ encoding
: [0xf8,0xee,0x10,0x0a]
175 @ CHECK
: vmrs
r0, fpsid @ encoding
: [0xf0,0xee,0x10,0x0a]
178 @ CHECK
: vmsr
fpscr, r0 @ encoding
: [0xe1,0xee,0x10,0x0a]
180 @ CHECK
: vmsr fpexc
, r0 @ encoding
: [0xe8,0xee,0x10,0x0a]
182 @ CHECK
: vmsr fpsid
, r0 @ encoding
: [0xe0,0xee,0x10,0x0a]
185 @ CHECK
: mcr2 p7
, #1, r5, c1, c1, #4 @ encoding: [0x21,0xfe,0x91,0x57]
186 mcr2 p7
, #1, r5, c1, c1, #4
188 @ CHECK
: mrc2 p14
, #0, r1, c1, c2, #4 @ encoding: [0x11,0xfe,0x92,0x1e]
189 mrc2 p14
, #0, r1, c1, c2, #4
191 @ CHECK
: mcrr2 p7
, #1, r5, r4, c1 @ encoding: [0x44,0xfc,0x11,0x57]
192 mcrr2 p7
, #1, r5, r4, c1
194 @ CHECK
: mrrc2 p7
, #1, r5, r4, c1 @ encoding: [0x54,0xfc,0x11,0x57]
195 mrrc2 p7
, #1, r5, r4, c1
197 @ CHECK
: cdp2 p7
, #1, c1, c1, c1, #4 @ encoding: [0x11,0xfe,0x81,0x17]
198 cdp2 p7
, #1, c1, c1, c1, #4
200 @ CHECK
: clrex @ encoding
: [0xbf,0xf3,0x2f,0x8f]
203 @ CHECK
: clz
r9, r0 @ encoding
: [0xb0,0xfa,0x80,0xf9]
206 @ CHECK
: qadd
r1, r2, r3 @ encoding
: [0x83,0xfa,0x82,0xf1]
209 @ CHECK
: qsub
r1, r2, r3 @ encoding
: [0x83,0xfa,0xa2,0xf1]
212 @ CHECK
: qdadd
r1, r2, r3 @ encoding
: [0x83,0xfa,0x92,0xf1]
215 @ CHECK
: qdsub
r1, r2, r3 @ encoding
: [0x83,0xfa,0xb2,0xf1]