basic-arm-instructions.s revision 8409f047312da0318af2a2fce162810ca3a95da3
1@ RUN: llvm-mc -triple=armv7-apple-darwin -show-encoding < %s | FileCheck %s 2 .syntax unified 3 .globl _func 4 5@ Check that the assembler can handle the documented syntax from the ARM ARM. 6@ For complex constructs like shifter operands, check more thoroughly for them 7@ once then spot check that following instructions accept the form generally. 8@ This gives us good coverage while keeping the overall size of the test 9@ more reasonable. 10 11_func: 12@ CHECK: _func 13 14@------------------------------------------------------------------------------ 15@ ADC (immediate) 16@------------------------------------------------------------------------------ 17 adc r1, r2, #0xf 18 adc r1, r2, #0xf0 19 adc r1, r2, #0xf00 20 adc r1, r2, #0xf000 21 adc r1, r2, #0xf0000 22 adc r1, r2, #0xf00000 23 adc r1, r2, #0xf000000 24 adc r1, r2, #0xf0000000 25 adc r1, r2, #0xf000000f 26 adcs r1, r2, #0xf00 27 adcseq r1, r2, #0xf00 28 adceq r1, r2, #0xf00 29 30@ CHECK: adc r1, r2, #15 @ encoding: [0x0f,0x10,0xa2,0xe2] 31@ CHECK: adc r1, r2, #240 @ encoding: [0xf0,0x10,0xa2,0xe2] 32@ CHECK: adc r1, r2, #3840 @ encoding: [0x0f,0x1c,0xa2,0xe2] 33@ CHECK: adc r1, r2, #61440 @ encoding: [0x0f,0x1a,0xa2,0xe2] 34@ CHECK: adc r1, r2, #983040 @ encoding: [0x0f,0x18,0xa2,0xe2] 35@ CHECK: adc r1, r2, #15728640 @ encoding: [0x0f,0x16,0xa2,0xe2] 36@ CHECK: adc r1, r2, #251658240 @ encoding: [0x0f,0x14,0xa2,0xe2] 37@ CHECK: adc r1, r2, #4026531840 @ encoding: [0x0f,0x12,0xa2,0xe2] 38@ CHECK: adc r1, r2, #4026531855 @ encoding: [0xff,0x12,0xa2,0xe2] 39 40@ CHECK: adcs r1, r2, #3840 @ encoding: [0x0f,0x1c,0xb2,0xe2] 41@ CHECK: adcseq r1, r2, #3840 @ encoding: [0x0f,0x1c,0xb2,0x02] 42@ CHECK: adceq r1, r2, #3840 @ encoding: [0x0f,0x1c,0xa2,0x02] 43 44@------------------------------------------------------------------------------ 45@ ADC (register) 46@ ADC (shifted register) 47@------------------------------------------------------------------------------ 48 adc r4, r5, r6 49 @ Constant shifts 50 adc r4, r5, r6, lsl #1 51 adc r4, r5, r6, lsl #31 52 adc r4, r5, r6, lsr #1 53 adc r4, r5, r6, lsr #31 54 adc r4, r5, r6, lsr #32 55 adc r4, r5, r6, asr #1 56 adc r4, r5, r6, asr #31 57 adc r4, r5, r6, asr #32 58 adc r4, r5, r6, ror #1 59 adc r4, r5, r6, ror #31 60 61 @ Register shifts 62 adc r6, r7, r8, lsl r9 63 adc r6, r7, r8, lsr r9 64 adc r6, r7, r8, asr r9 65 adc r6, r7, r8, ror r9 66 adc r4, r5, r6, rrx 67 68 @ Destination register is optional 69 adc r5, r6 70 adc r4, r5, lsl #1 71 adc r4, r5, lsl #31 72 adc r4, r5, lsr #1 73 adc r4, r5, lsr #31 74 adc r4, r5, lsr #32 75 adc r4, r5, asr #1 76 adc r4, r5, asr #31 77 adc r4, r5, asr #32 78 adc r4, r5, ror #1 79 adc r4, r5, ror #31 80 adc r4, r5, rrx 81 adc r6, r7, lsl r9 82 adc r6, r7, lsr r9 83 adc r6, r7, asr r9 84 adc r6, r7, ror r9 85 adc r4, r5, rrx 86 87@ CHECK: adc r4, r5, r6 @ encoding: [0x06,0x40,0xa5,0xe0] 88 89@ CHECK: adc r4, r5, r6, lsl #1 @ encoding: [0x86,0x40,0xa5,0xe0] 90@ CHECK: adc r4, r5, r6, lsl #31 @ encoding: [0x86,0x4f,0xa5,0xe0] 91@ CHECK: adc r4, r5, r6, lsr #1 @ encoding: [0xa6,0x40,0xa5,0xe0] 92@ CHECK: adc r4, r5, r6, lsr #31 @ encoding: [0xa6,0x4f,0xa5,0xe0] 93@ CHECK: adc r4, r5, r6, lsr #32 @ encoding: [0x26,0x40,0xa5,0xe0] 94@ CHECK: adc r4, r5, r6, asr #1 @ encoding: [0xc6,0x40,0xa5,0xe0] 95@ CHECK: adc r4, r5, r6, asr #31 @ encoding: [0xc6,0x4f,0xa5,0xe0] 96@ CHECK: adc r4, r5, r6, asr #32 @ encoding: [0x46,0x40,0xa5,0xe0] 97@ CHECK: adc r4, r5, r6, ror #1 @ encoding: [0xe6,0x40,0xa5,0xe0] 98@ CHECK: adc r4, r5, r6, ror #31 @ encoding: [0xe6,0x4f,0xa5,0xe0] 99 100@ CHECK: adc r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0xa7,0xe0] 101@ CHECK: adc r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0xa7,0xe0] 102@ CHECK: adc r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0xa7,0xe0] 103@ CHECK: adc r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0xa7,0xe0] 104@ CHECK: adc r4, r5, r6, rrx @ encoding: [0x66,0x40,0xa5,0xe0] 105 106@ CHECK: adc r5, r5, r6 @ encoding: [0x06,0x50,0xa5,0xe0] 107@ CHECK: adc r4, r4, r5, lsl #1 @ encoding: [0x85,0x40,0xa4,0xe0] 108@ CHECK: adc r4, r4, r5, lsl #31 @ encoding: [0x85,0x4f,0xa4,0xe0] 109@ CHECK: adc r4, r4, r5, lsr #1 @ encoding: [0xa5,0x40,0xa4,0xe0] 110@ CHECK: adc r4, r4, r5, lsr #31 @ encoding: [0xa5,0x4f,0xa4,0xe0] 111@ CHECK: adc r4, r4, r5, lsr #32 @ encoding: [0x25,0x40,0xa4,0xe0] 112@ CHECK: adc r4, r4, r5, asr #1 @ encoding: [0xc5,0x40,0xa4,0xe0] 113@ CHECK: adc r4, r4, r5, asr #31 @ encoding: [0xc5,0x4f,0xa4,0xe0] 114@ CHECK: adc r4, r4, r5, asr #32 @ encoding: [0x45,0x40,0xa4,0xe0] 115@ CHECK: adc r4, r4, r5, ror #1 @ encoding: [0xe5,0x40,0xa4,0xe0] 116@ CHECK: adc r4, r4, r5, ror #31 @ encoding: [0xe5,0x4f,0xa4,0xe0] 117@ CHECK: adc r4, r4, r5, rrx @ encoding: [0x65,0x40,0xa4,0xe0] 118@ CHECK: adc r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0xa6,0xe0] 119@ CHECK: adc r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0xa6,0xe0] 120@ CHECK: adc r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0xa6,0xe0] 121@ CHECK: adc r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0xa6,0xe0] 122@ CHECK: adc r4, r4, r5, rrx @ encoding: [0x65,0x40,0xa4,0xe0] 123 124 125@------------------------------------------------------------------------------ 126@ FIXME: ADR 127@------------------------------------------------------------------------------ 128 129@------------------------------------------------------------------------------ 130@ ADD 131@------------------------------------------------------------------------------ 132 add r4, r5, #0xf000 133 add r4, r5, r6 134 add r4, r5, r6, lsl #5 135 add r4, r5, r6, lsr #5 136 add r4, r5, r6, lsr #5 137 add r4, r5, r6, asr #5 138 add r4, r5, r6, ror #5 139 add r6, r7, r8, lsl r9 140 add r6, r7, r8, lsr r9 141 add r6, r7, r8, asr r9 142 add r6, r7, r8, ror r9 143 add r4, r5, r6, rrx 144 145 @ destination register is optional 146 add r5, #0xf000 147 add r4, r5 148 add r4, r5, lsl #5 149 add r4, r5, lsr #5 150 add r4, r5, lsr #5 151 add r4, r5, asr #5 152 add r4, r5, ror #5 153 add r6, r7, lsl r9 154 add r6, r7, lsr r9 155 add r6, r7, asr r9 156 add r6, r7, ror r9 157 add r4, r5, rrx 158 159@ CHECK: add r4, r5, #61440 @ encoding: [0x0f,0x4a,0x85,0xe2] 160@ CHECK: add r4, r5, r6 @ encoding: [0x06,0x40,0x85,0xe0] 161@ CHECK: add r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x85,0xe0] 162@ CHECK: add r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe0] 163@ CHECK: add r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe0] 164@ CHECK: add r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x85,0xe0] 165@ CHECK: add r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x85,0xe0] 166@ CHECK: add r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x87,0xe0] 167@ CHECK: add r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x87,0xe0] 168@ CHECK: add r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x87,0xe0] 169@ CHECK: add r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x87,0xe0] 170@ CHECK: add r4, r5, r6, rrx @ encoding: [0x66,0x40,0x85,0xe0] 171 172 173@ CHECK: add r5, r5, #61440 @ encoding: [0x0f,0x5a,0x85,0xe2] 174@ CHECK: add r4, r4, r5 @ encoding: [0x05,0x40,0x84,0xe0] 175@ CHECK: add r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x84,0xe0] 176@ CHECK: add r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe0] 177@ CHECK: add r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe0] 178@ CHECK: add r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x84,0xe0] 179@ CHECK: add r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x84,0xe0] 180@ CHECK: add r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x86,0xe0] 181@ CHECK: add r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x86,0xe0] 182@ CHECK: add r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x86,0xe0] 183@ CHECK: add r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x86,0xe0] 184@ CHECK: add r4, r4, r5, rrx @ encoding: [0x65,0x40,0x84,0xe0] 185 186 187@------------------------------------------------------------------------------ 188@ AND 189@------------------------------------------------------------------------------ 190 and r10, r1, #0xf 191 and r10, r1, r6 192 and r10, r1, r6, lsl #10 193 and r10, r1, r6, lsr #10 194 and r10, r1, r6, lsr #10 195 and r10, r1, r6, asr #10 196 and r10, r1, r6, ror #10 197 and r6, r7, r8, lsl r2 198 and r6, r7, r8, lsr r2 199 and r6, r7, r8, asr r2 200 and r6, r7, r8, ror r2 201 and r10, r1, r6, rrx 202 203 @ destination register is optional 204 and r1, #0xf 205 and r10, r1 206 and r10, r1, lsl #10 207 and r10, r1, lsr #10 208 and r10, r1, lsr #10 209 and r10, r1, asr #10 210 and r10, r1, ror #10 211 and r6, r7, lsl r2 212 and r6, r7, lsr r2 213 and r6, r7, asr r2 214 and r6, r7, ror r2 215 and r10, r1, rrx 216 217@ CHECK: and r10, r1, #15 @ encoding: [0x0f,0xa0,0x01,0xe2] 218@ CHECK: and r10, r1, r6 @ encoding: [0x06,0xa0,0x01,0xe0] 219@ CHECK: and r10, r1, r6, lsl #10 @ encoding: [0x06,0xa5,0x01,0xe0] 220@ CHECK: and r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0x01,0xe0] 221@ CHECK: and r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0x01,0xe0] 222@ CHECK: and r10, r1, r6, asr #10 @ encoding: [0x46,0xa5,0x01,0xe0] 223@ CHECK: and r10, r1, r6, ror #10 @ encoding: [0x66,0xa5,0x01,0xe0] 224@ CHECK: and r6, r7, r8, lsl r2 @ encoding: [0x18,0x62,0x07,0xe0] 225@ CHECK: and r6, r7, r8, lsr r2 @ encoding: [0x38,0x62,0x07,0xe0] 226@ CHECK: and r6, r7, r8, asr r2 @ encoding: [0x58,0x62,0x07,0xe0] 227@ CHECK: and r6, r7, r8, ror r2 @ encoding: [0x78,0x62,0x07,0xe0] 228@ CHECK: and r10, r1, r6, rrx @ encoding: [0x66,0xa0,0x01,0xe0] 229 230@ CHECK: and r1, r1, #15 @ encoding: [0x0f,0x10,0x01,0xe2] 231@ CHECK: and r10, r10, r1 @ encoding: [0x01,0xa0,0x0a,0xe0] 232@ CHECK: and r10, r10, r1, lsl #10 @ encoding: [0x01,0xa5,0x0a,0xe0] 233@ CHECK: and r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0x0a,0xe0] 234@ CHECK: and r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0x0a,0xe0] 235@ CHECK: and r10, r10, r1, asr #10 @ encoding: [0x41,0xa5,0x0a,0xe0] 236@ CHECK: and r10, r10, r1, ror #10 @ encoding: [0x61,0xa5,0x0a,0xe0] 237@ CHECK: and r6, r6, r7, lsl r2 @ encoding: [0x17,0x62,0x06,0xe0] 238@ CHECK: and r6, r6, r7, lsr r2 @ encoding: [0x37,0x62,0x06,0xe0] 239@ CHECK: and r6, r6, r7, asr r2 @ encoding: [0x57,0x62,0x06,0xe0] 240@ CHECK: and r6, r6, r7, ror r2 @ encoding: [0x77,0x62,0x06,0xe0] 241@ CHECK: and r10, r10, r1, rrx @ encoding: [0x61,0xa0,0x0a,0xe0] 242 243@------------------------------------------------------------------------------ 244@ FIXME: ASR 245@------------------------------------------------------------------------------ 246@------------------------------------------------------------------------------ 247@ FIXME: B 248@------------------------------------------------------------------------------ 249@------------------------------------------------------------------------------ 250@ FIXME: BFC 251@------------------------------------------------------------------------------ 252@------------------------------------------------------------------------------ 253@ FIXME: BFI 254@------------------------------------------------------------------------------ 255 256@------------------------------------------------------------------------------ 257@ BIC 258@------------------------------------------------------------------------------ 259 bic r10, r1, #0xf 260 bic r10, r1, r6 261 bic r10, r1, r6, lsl #10 262 bic r10, r1, r6, lsr #10 263 bic r10, r1, r6, lsr #10 264 bic r10, r1, r6, asr #10 265 bic r10, r1, r6, ror #10 266 bic r6, r7, r8, lsl r2 267 bic r6, r7, r8, lsr r2 268 bic r6, r7, r8, asr r2 269 bic r6, r7, r8, ror r2 270 bic r10, r1, r6, rrx 271 272 @ destination register is optional 273 bic r1, #0xf 274 bic r10, r1 275 bic r10, r1, lsl #10 276 bic r10, r1, lsr #10 277 bic r10, r1, lsr #10 278 bic r10, r1, asr #10 279 bic r10, r1, ror #10 280 bic r6, r7, lsl r2 281 bic r6, r7, lsr r2 282 bic r6, r7, asr r2 283 bic r6, r7, ror r2 284 bic r10, r1, rrx 285 286@ CHECK: bic r10, r1, #15 @ encoding: [0x0f,0xa0,0xc1,0xe3] 287@ CHECK: bic r10, r1, r6 @ encoding: [0x06,0xa0,0xc1,0xe1] 288@ CHECK: bic r10, r1, r6, lsl #10 @ encoding: [0x06,0xa5,0xc1,0xe1] 289@ CHECK: bic r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0xc1,0xe1] 290@ CHECK: bic r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0xc1,0xe1] 291@ CHECK: bic r10, r1, r6, asr #10 @ encoding: [0x46,0xa5,0xc1,0xe1] 292@ CHECK: bic r10, r1, r6, ror #10 @ encoding: [0x66,0xa5,0xc1,0xe1] 293@ CHECK: bic r6, r7, r8, lsl r2 @ encoding: [0x18,0x62,0xc7,0xe1] 294@ CHECK: bic r6, r7, r8, lsr r2 @ encoding: [0x38,0x62,0xc7,0xe1] 295@ CHECK: bic r6, r7, r8, asr r2 @ encoding: [0x58,0x62,0xc7,0xe1] 296@ CHECK: bic r6, r7, r8, ror r2 @ encoding: [0x78,0x62,0xc7,0xe1] 297@ CHECK: bic r10, r1, r6, rrx @ encoding: [0x66,0xa0,0xc1,0xe1] 298 299 300@ CHECK: bic r1, r1, #15 @ encoding: [0x0f,0x10,0xc1,0xe3] 301@ CHECK: bic r10, r10, r1 @ encoding: [0x01,0xa0,0xca,0xe1] 302@ CHECK: bic r10, r10, r1, lsl #10 @ encoding: [0x01,0xa5,0xca,0xe1] 303@ CHECK: bic r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0xca,0xe1] 304@ CHECK: bic r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0xca,0xe1] 305@ CHECK: bic r10, r10, r1, asr #10 @ encoding: [0x41,0xa5,0xca,0xe1] 306@ CHECK: bic r10, r10, r1, ror #10 @ encoding: [0x61,0xa5,0xca,0xe1] 307@ CHECK: bic r6, r6, r7, lsl r2 @ encoding: [0x17,0x62,0xc6,0xe1] 308@ CHECK: bic r6, r6, r7, lsr r2 @ encoding: [0x37,0x62,0xc6,0xe1] 309@ CHECK: bic r6, r6, r7, asr r2 @ encoding: [0x57,0x62,0xc6,0xe1] 310@ CHECK: bic r6, r6, r7, ror r2 @ encoding: [0x77,0x62,0xc6,0xe1] 311@ CHECK: bic r10, r10, r1, rrx @ encoding: [0x61,0xa0,0xca,0xe1] 312 313@------------------------------------------------------------------------------ 314@ BKPT 315@------------------------------------------------------------------------------ 316 bkpt #10 317 bkpt #65535 318 319@ CHECK: bkpt #10 @ encoding: [0x7a,0x00,0x20,0xe1] 320@ CHECK: bkpt #65535 @ encoding: [0x7f,0xff,0x2f,0xe1] 321 322@------------------------------------------------------------------------------ 323@ BL/BLX (immediate) 324@------------------------------------------------------------------------------ 325 326 bl _bar 327 @ FIXME: blx _bar 328 329@ CHECK: bl _bar @ encoding: [A,A,A,0xeb] 330@ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch 331 332@------------------------------------------------------------------------------ 333@ BLX (register) 334@------------------------------------------------------------------------------ 335 blx r2 336 blxne r2 337 338@ CHECK: blx r2 @ encoding: [0x32,0xff,0x2f,0xe1] 339@ CHECK: blxne r2 @ encoding: [0x32,0xff,0x2f,0x11] 340 341@------------------------------------------------------------------------------ 342@ BX 343@------------------------------------------------------------------------------ 344 345 bx r2 346 bxne r2 347 348@ CHECK: bx r2 @ encoding: [0x12,0xff,0x2f,0xe1] 349@ CHECK: bxne r2 @ encoding: [0x12,0xff,0x2f,0x11] 350 351@------------------------------------------------------------------------------ 352@ BXJ 353@------------------------------------------------------------------------------ 354 355 bxj r2 356 bxjne r2 357 358@ CHECK: bxj r2 @ encoding: [0x22,0xff,0x2f,0xe1] 359@ CHECK: bxjne r2 @ encoding: [0x22,0xff,0x2f,0x11] 360 361@------------------------------------------------------------------------------ 362@ FIXME: CBNZ/CBZ 363@------------------------------------------------------------------------------ 364 365 366@------------------------------------------------------------------------------ 367@ CDP/CDP2 368@------------------------------------------------------------------------------ 369 cdp p7, #1, c1, c1, c1, #4 370 cdp2 p7, #1, c1, c1, c1, #4 371 372@ CHECK: cdp p7, #1, c1, c1, c1, #4 @ encoding: [0x81,0x17,0x11,0xee] 373@ CHECK: cdp2 p7, #1, c1, c1, c1, #4 @ encoding: [0x81,0x17,0x11,0xfe] 374 375 376@------------------------------------------------------------------------------ 377@ CLREX 378@------------------------------------------------------------------------------ 379 clrex 380 381@ CHECK: clrex @ encoding: [0x1f,0xf0,0x7f,0xf5] 382 383 384@------------------------------------------------------------------------------ 385@ CLZ 386@------------------------------------------------------------------------------ 387 clz r1, r2 388 clzeq r1, r2 389 390@ CHECK: clz r1, r2 @ encoding: [0x12,0x1f,0x6f,0xe1] 391@ CHECK: clzeq r1, r2 @ encoding: [0x12,0x1f,0x6f,0x01] 392 393@------------------------------------------------------------------------------ 394@ CMN 395@------------------------------------------------------------------------------ 396 cmn r1, #0xf 397 cmn r1, r6 398 cmn r1, r6, lsl #10 399 cmn r1, r6, lsr #10 400 cmn sp, r6, lsr #10 401 cmn r1, r6, asr #10 402 cmn r1, r6, ror #10 403 cmn r7, r8, lsl r2 404 cmn sp, r8, lsr r2 405 cmn r7, r8, asr r2 406 cmn r7, r8, ror r2 407 cmn r1, r6, rrx 408 409@ CHECK: cmn r1, #15 @ encoding: [0x0f,0x00,0x71,0xe3] 410@ CHECK: cmn r1, r6 @ encoding: [0x06,0x00,0x71,0xe1] 411@ CHECK: cmn r1, r6, lsl #10 @ encoding: [0x06,0x05,0x71,0xe1] 412@ CHECK: cmn r1, r6, lsr #10 @ encoding: [0x26,0x05,0x71,0xe1] 413@ CHECK: cmn sp, r6, lsr #10 @ encoding: [0x26,0x05,0x7d,0xe1] 414@ CHECK: cmn r1, r6, asr #10 @ encoding: [0x46,0x05,0x71,0xe1] 415@ CHECK: cmn r1, r6, ror #10 @ encoding: [0x66,0x05,0x71,0xe1] 416@ CHECK: cmn r7, r8, lsl r2 @ encoding: [0x18,0x02,0x77,0xe1] 417@ CHECK: cmn sp, r8, lsr r2 @ encoding: [0x38,0x02,0x7d,0xe1] 418@ CHECK: cmn r7, r8, asr r2 @ encoding: [0x58,0x02,0x77,0xe1] 419@ CHECK: cmn r7, r8, ror r2 @ encoding: [0x78,0x02,0x77,0xe1] 420@ CHECK: cmn r1, r6, rrx @ encoding: [0x66,0x00,0x71,0xe1] 421 422@------------------------------------------------------------------------------ 423@ CMP 424@------------------------------------------------------------------------------ 425 cmp r1, #0xf 426 cmp r1, r6 427 cmp r1, r6, lsl #10 428 cmp r1, r6, lsr #10 429 cmp sp, r6, lsr #10 430 cmp r1, r6, asr #10 431 cmp r1, r6, ror #10 432 cmp r7, r8, lsl r2 433 cmp sp, r8, lsr r2 434 cmp r7, r8, asr r2 435 cmp r7, r8, ror r2 436 cmp r1, r6, rrx 437 438@ CHECK: cmp r1, #15 @ encoding: [0x0f,0x00,0x51,0xe3] 439@ CHECK: cmp r1, r6 @ encoding: [0x06,0x00,0x51,0xe1] 440@ CHECK: cmp r1, r6, lsl #10 @ encoding: [0x06,0x05,0x51,0xe1] 441@ CHECK: cmp r1, r6, lsr #10 @ encoding: [0x26,0x05,0x51,0xe1] 442@ CHECK: cmp sp, r6, lsr #10 @ encoding: [0x26,0x05,0x5d,0xe1] 443@ CHECK: cmp r1, r6, asr #10 @ encoding: [0x46,0x05,0x51,0xe1] 444@ CHECK: cmp r1, r6, ror #10 @ encoding: [0x66,0x05,0x51,0xe1] 445@ CHECK: cmp r7, r8, lsl r2 @ encoding: [0x18,0x02,0x57,0xe1] 446@ CHECK: cmp sp, r8, lsr r2 @ encoding: [0x38,0x02,0x5d,0xe1] 447@ CHECK: cmp r7, r8, asr r2 @ encoding: [0x58,0x02,0x57,0xe1] 448@ CHECK: cmp r7, r8, ror r2 @ encoding: [0x78,0x02,0x57,0xe1] 449@ CHECK: cmp r1, r6, rrx @ encoding: [0x66,0x00,0x51,0xe1] 450 451@------------------------------------------------------------------------------ 452@ DBG 453@------------------------------------------------------------------------------ 454 dbg #0 455 dbg #5 456 dbg #15 457 458@ CHECK: dbg #0 @ encoding: [0xf0,0xf0,0x20,0xe3] 459@ CHECK: dbg #5 @ encoding: [0xf5,0xf0,0x20,0xe3] 460@ CHECK: dbg #15 @ encoding: [0xff,0xf0,0x20,0xe3] 461 462 463@------------------------------------------------------------------------------ 464@ DMB 465@------------------------------------------------------------------------------ 466 dmb sy 467 dmb st 468 dmb sh 469 dmb ish 470 dmb shst 471 dmb ishst 472 dmb un 473 dmb nsh 474 dmb unst 475 dmb nshst 476 dmb osh 477 dmb oshst 478 dmb 479 480@ CHECK: dmb sy @ encoding: [0x5f,0xf0,0x7f,0xf5] 481@ CHECK: dmb st @ encoding: [0x5e,0xf0,0x7f,0xf5] 482@ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5] 483@ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5] 484@ CHECK: dmb ishst @ encoding: [0x5a,0xf0,0x7f,0xf5] 485@ CHECK: dmb ishst @ encoding: [0x5a,0xf0,0x7f,0xf5] 486@ CHECK: dmb nsh @ encoding: [0x57,0xf0,0x7f,0xf5] 487@ CHECK: dmb nsh @ encoding: [0x57,0xf0,0x7f,0xf5] 488@ CHECK: dmb nshst @ encoding: [0x56,0xf0,0x7f,0xf5] 489@ CHECK: dmb nshst @ encoding: [0x56,0xf0,0x7f,0xf5] 490@ CHECK: dmb osh @ encoding: [0x53,0xf0,0x7f,0xf5] 491@ CHECK: dmb oshst @ encoding: [0x52,0xf0,0x7f,0xf5] 492@ CHECK: dmb sy @ encoding: [0x5f,0xf0,0x7f,0xf5] 493 494@------------------------------------------------------------------------------ 495@ DSB 496@------------------------------------------------------------------------------ 497 dsb sy 498 dsb st 499 dsb sh 500 dsb ish 501 dsb shst 502 dsb ishst 503 dsb un 504 dsb nsh 505 dsb unst 506 dsb nshst 507 dsb osh 508 dsb oshst 509 dsb 510 511@ CHECK: dsb sy @ encoding: [0x4f,0xf0,0x7f,0xf5] 512@ CHECK: dsb st @ encoding: [0x4e,0xf0,0x7f,0xf5] 513@ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5] 514@ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5] 515@ CHECK: dsb ishst @ encoding: [0x4a,0xf0,0x7f,0xf5] 516@ CHECK: dsb ishst @ encoding: [0x4a,0xf0,0x7f,0xf5] 517@ CHECK: dsb nsh @ encoding: [0x47,0xf0,0x7f,0xf5] 518@ CHECK: dsb nsh @ encoding: [0x47,0xf0,0x7f,0xf5] 519@ CHECK: dsb nshst @ encoding: [0x46,0xf0,0x7f,0xf5] 520@ CHECK: dsb nshst @ encoding: [0x46,0xf0,0x7f,0xf5] 521@ CHECK: dsb osh @ encoding: [0x43,0xf0,0x7f,0xf5] 522@ CHECK: dsb oshst @ encoding: [0x42,0xf0,0x7f,0xf5] 523@ CHECK: dsb sy @ encoding: [0x4f,0xf0,0x7f,0xf5] 524 525@------------------------------------------------------------------------------ 526@ EOR 527@------------------------------------------------------------------------------ 528 eor r4, r5, #0xf000 529 eor r4, r5, r6 530 eor r4, r5, r6, lsl #5 531 eor r4, r5, r6, lsr #5 532 eor r4, r5, r6, lsr #5 533 eor r4, r5, r6, asr #5 534 eor r4, r5, r6, ror #5 535 eor r6, r7, r8, lsl r9 536 eor r6, r7, r8, lsr r9 537 eor r6, r7, r8, asr r9 538 eor r6, r7, r8, ror r9 539 eor r4, r5, r6, rrx 540 541 @ destination register is optional 542 eor r5, #0xf000 543 eor r4, r5 544 eor r4, r5, lsl #5 545 eor r4, r5, lsr #5 546 eor r4, r5, lsr #5 547 eor r4, r5, asr #5 548 eor r4, r5, ror #5 549 eor r6, r7, lsl r9 550 eor r6, r7, lsr r9 551 eor r6, r7, asr r9 552 eor r6, r7, ror r9 553 eor r4, r5, rrx 554 555@ CHECK: eor r4, r5, #61440 @ encoding: [0x0f,0x4a,0x25,0xe2] 556@ CHECK: eor r4, r5, r6 @ encoding: [0x06,0x40,0x25,0xe0] 557@ CHECK: eor r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x25,0xe0] 558@ CHECK: eor r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x25,0xe0] 559@ CHECK: eor r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x25,0xe0] 560@ CHECK: eor r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x25,0xe0] 561@ CHECK: eor r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x25,0xe0] 562@ CHECK: eor r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x27,0xe0] 563@ CHECK: eor r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x27,0xe0] 564@ CHECK: eor r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x27,0xe0] 565@ CHECK: eor r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x27,0xe0] 566@ CHECK: eor r4, r5, r6, rrx @ encoding: [0x66,0x40,0x25,0xe0] 567 568 569@ CHECK: eor r5, r5, #61440 @ encoding: [0x0f,0x5a,0x25,0xe2] 570@ CHECK: eor r4, r4, r5 @ encoding: [0x05,0x40,0x24,0xe0] 571@ CHECK: eor r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x24,0xe0] 572@ CHECK: eor r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x24,0xe0] 573@ CHECK: eor r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x24,0xe0] 574@ CHECK: eor r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x24,0xe0] 575@ CHECK: eor r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x24,0xe0] 576@ CHECK: eor r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x26,0xe0] 577@ CHECK: eor r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x26,0xe0] 578@ CHECK: eor r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x26,0xe0] 579@ CHECK: eor r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x26,0xe0] 580@ CHECK: eor r4, r4, r5, rrx @ encoding: [0x65,0x40,0x24,0xe0] 581 582 583@------------------------------------------------------------------------------ 584@ ISB 585@------------------------------------------------------------------------------ 586 isb sy 587 isb 588 589@ CHECK: isb sy @ encoding: [0x6f,0xf0,0x7f,0xf5] 590@ CHECK: isb sy @ encoding: [0x6f,0xf0,0x7f,0xf5] 591 592 593 594@------------------------------------------------------------------------------ 595@ LDM* 596@------------------------------------------------------------------------------ 597 ldm r2, {r1,r3-r6,sp} 598 ldmia r2, {r1,r3-r6,sp} 599 ldmib r2, {r1,r3-r6,sp} 600 ldmda r2, {r1,r3-r6,sp} 601 ldmdb r2, {r1,r3-r6,sp} 602 ldmfd r2, {r1,r3-r6,sp} 603 604 @ with update 605 ldm r2!, {r1,r3-r6,sp} 606 ldmib r2!, {r1,r3-r6,sp} 607 ldmda r2!, {r1,r3-r6,sp} 608 ldmdb r2!, {r1,r3-r6,sp} 609 610@ CHECK: ldm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8] 611@ CHECK: ldm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8] 612@ CHECK: ldmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe9] 613@ CHECK: ldmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe8] 614@ CHECK: ldmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe9] 615@ CHECK: ldm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8] 616 617@ CHECK: ldm r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe8] 618@ CHECK: ldmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe9] 619@ CHECK: ldmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe8] 620@ CHECK: ldmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe9] 621 622@------------------------------------------------------------------------------ 623@ FIXME: LDR* 624@------------------------------------------------------------------------------ 625@------------------------------------------------------------------------------ 626@ FIXME: LSL 627@------------------------------------------------------------------------------ 628@------------------------------------------------------------------------------ 629@ FIXME: LSR 630@------------------------------------------------------------------------------ 631 632@------------------------------------------------------------------------------ 633@ MCR/MCR2 634@------------------------------------------------------------------------------ 635 mcr p7, #1, r5, c1, c1, #4 636 mcr2 p7, #1, r5, c1, c1, #4 637 638@ CHECK: mcr p7, #1, r5, c1, c1, #4 @ encoding: [0x91,0x57,0x21,0xee] 639@ CHECK: mcr2 p7, #1, r5, c1, c1, #4 @ encoding: [0x91,0x57,0x21,0xfe] 640 641@------------------------------------------------------------------------------ 642@ MCRR/MCRR2 643@------------------------------------------------------------------------------ 644 mcrr p7, #15, r5, r4, c1 645 mcrr2 p7, #15, r5, r4, c1 646 647@ CHECK: mcrr p7, #15, r5, r4, c1 @ encoding: [0xf1,0x57,0x44,0xec] 648@ CHECK: mcrr2 p7, #15, r5, r4, c1 @ encoding: [0xf1,0x57,0x44,0xfc] 649 650 651@------------------------------------------------------------------------------ 652@ MLA 653@------------------------------------------------------------------------------ 654 mla r1,r2,r3,r4 655 mlas r1,r2,r3,r4 656 mlane r1,r2,r3,r4 657 mlasne r1,r2,r3,r4 658 659@ CHECK: mla r1, r2, r3, r4 @ encoding: [0x92,0x43,0x21,0xe0] 660@ CHECK: mlas r1, r2, r3, r4 @ encoding: [0x92,0x43,0x31,0xe0] 661@ CHECK: mlane r1, r2, r3, r4 @ encoding: [0x92,0x43,0x21,0x10] 662@ CHECK: mlasne r1, r2, r3, r4 @ encoding: [0x92,0x43,0x31,0x10] 663 664@------------------------------------------------------------------------------ 665@ MLS 666@------------------------------------------------------------------------------ 667 mls r2,r5,r6,r3 668 mlsne r2,r5,r6,r3 669 670@ CHECK: mls r2, r5, r6, r3 @ encoding: [0x95,0x36,0x62,0xe0] 671@ CHECK: mlsne r2, r5, r6, r3 @ encoding: [0x95,0x36,0x62,0x10] 672 673@------------------------------------------------------------------------------ 674@ MOV (immediate) 675@------------------------------------------------------------------------------ 676 mov r3, #7 677 mov r4, #0xff0 678 mov r5, #0xff0000 679 mov r6, #0xffff 680 movw r9, #0xffff 681 movs r3, #7 682 moveq r4, #0xff0 683 movseq r5, #0xff0000 684 685@ CHECK: mov r3, #7 @ encoding: [0x07,0x30,0xa0,0xe3] 686@ CHECK: mov r4, #4080 @ encoding: [0xff,0x4e,0xa0,0xe3] 687@ CHECK: mov r5, #16711680 @ encoding: [0xff,0x58,0xa0,0xe3] 688@ CHECK: movw r6, #65535 @ encoding: [0xff,0x6f,0x0f,0xe3] 689@ CHECK: movw r9, #65535 @ encoding: [0xff,0x9f,0x0f,0xe3] 690@ CHECK: movs r3, #7 @ encoding: [0x07,0x30,0xb0,0xe3] 691@ CHECK: moveq r4, #4080 @ encoding: [0xff,0x4e,0xa0,0x03] 692@ CHECK: movseq r5, #16711680 @ encoding: [0xff,0x58,0xb0,0x03] 693 694@------------------------------------------------------------------------------ 695@ MOV (register) 696@------------------------------------------------------------------------------ 697 mov r2, r3 698 movs r2, r3 699 moveq r2, r3 700 movseq r2, r3 701 702@ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1] 703@ CHECK: movs r2, r3 @ encoding: [0x03,0x20,0xb0,0xe1] 704@ CHECK: moveq r2, r3 @ encoding: [0x03,0x20,0xa0,0x01] 705@ CHECK: movseq r2, r3 @ encoding: [0x03,0x20,0xb0,0x01] 706 707@------------------------------------------------------------------------------ 708@ MOVT 709@------------------------------------------------------------------------------ 710 movt r3, #7 711 movt r6, #0xffff 712 movteq r4, #0xff0 713 714@ CHECK: movt r3, #7 @ encoding: [0x07,0x30,0x40,0xe3] 715@ CHECK: movt r6, #65535 @ encoding: [0xff,0x6f,0x4f,0xe3] 716@ CHECK: movteq r4, #4080 @ encoding: [0xf0,0x4f,0x40,0x03] 717 718 719@------------------------------------------------------------------------------ 720@ MRC/MRC2 721@------------------------------------------------------------------------------ 722 mrc p14, #0, r1, c1, c2, #4 723 mrc2 p14, #0, r1, c1, c2, #4 724 725@ CHECK: mrc p14, #0, r1, c1, c2, #4 @ encoding: [0x92,0x1e,0x11,0xee] 726@ CHECK: mrc2 p14, #0, r1, c1, c2, #4 @ encoding: [0x92,0x1e,0x11,0xfe] 727 728@------------------------------------------------------------------------------ 729@ MRRC/MRRC2 730@------------------------------------------------------------------------------ 731 mrrc p7, #1, r5, r4, c1 732 mrrc2 p7, #1, r5, r4, c1 733 734@ CHECK: mrrc p7, #1, r5, r4, c1 @ encoding: [0x11,0x57,0x54,0xec] 735@ CHECK: mrrc2 p7, #1, r5, r4, c1 @ encoding: [0x11,0x57,0x54,0xfc] 736 737 738@------------------------------------------------------------------------------ 739@ MRS 740@------------------------------------------------------------------------------ 741 mrs r8, apsr 742 mrs r8, cpsr 743 mrs r8, spsr 744@ CHECK: mrs r8, apsr @ encoding: [0x00,0x80,0x0f,0xe1] 745@ CHECK: mrs r8, apsr @ encoding: [0x00,0x80,0x0f,0xe1] 746@ CHECK: mrs r8, spsr @ encoding: [0x00,0x80,0x4f,0xe1] 747 748 749 750@------------------------------------------------------------------------------ 751@ MSR 752@------------------------------------------------------------------------------ 753 754 msr apsr, #5 755 msr apsr_g, #5 756 msr apsr_nzcvq, #5 757 msr APSR_nzcvq, #5 758 msr apsr_nzcvqg, #5 759 msr cpsr_fc, #5 760 msr cpsr_c, #5 761 msr cpsr_x, #5 762 msr cpsr_fc, #5 763 msr cpsr_all, #5 764 msr cpsr_fsx, #5 765 msr spsr_fc, #5 766 msr SPSR_fsxc, #5 767 msr cpsr_fsxc, #5 768 769@ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3] 770@ CHECK: msr APSR_g, #5 @ encoding: [0x05,0xf0,0x24,0xe3] 771@ CHECK: msr APSR_nzcvq, #5 @ encoding: [0x05,0xf0,0x28,0xe3] 772@ CHECK: msr APSR_nzcvq, #5 @ encoding: [0x05,0xf0,0x28,0xe3] 773@ CHECK: msr APSR_nzcvqg, #5 @ encoding: [0x05,0xf0,0x2c,0xe3] 774@ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3] 775@ CHECK: msr CPSR_c, #5 @ encoding: [0x05,0xf0,0x21,0xe3] 776@ CHECK: msr CPSR_x, #5 @ encoding: [0x05,0xf0,0x22,0xe3] 777@ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3] 778@ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3] 779@ CHECK: msr CPSR_fsx, #5 @ encoding: [0x05,0xf0,0x2e,0xe3] 780@ CHECK: msr SPSR_fc, #5 @ encoding: [0x05,0xf0,0x69,0xe3] 781@ CHECK: msr SPSR_fsxc, #5 @ encoding: [0x05,0xf0,0x6f,0xe3] 782@ CHECK: msr CPSR_fsxc, #5 @ encoding: [0x05,0xf0,0x2f,0xe3] 783 784 msr apsr, r0 785 msr apsr_g, r0 786 msr apsr_nzcvq, r0 787 msr APSR_nzcvq, r0 788 msr apsr_nzcvqg, r0 789 msr cpsr_fc, r0 790 msr cpsr_c, r0 791 msr cpsr_x, r0 792 msr cpsr_fc, r0 793 msr cpsr_all, r0 794 msr cpsr_fsx, r0 795 msr spsr_fc, r0 796 msr SPSR_fsxc, r0 797 msr cpsr_fsxc, r0 798 799@ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1] 800@ CHECK: msr APSR_g, r0 @ encoding: [0x00,0xf0,0x24,0xe1] 801@ CHECK: msr APSR_nzcvq, r0 @ encoding: [0x00,0xf0,0x28,0xe1] 802@ CHECK: msr APSR_nzcvq, r0 @ encoding: [0x00,0xf0,0x28,0xe1] 803@ CHECK: msr APSR_nzcvqg, r0 @ encoding: [0x00,0xf0,0x2c,0xe1] 804@ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1] 805@ CHECK: msr CPSR_c, r0 @ encoding: [0x00,0xf0,0x21,0xe1] 806@ CHECK: msr CPSR_x, r0 @ encoding: [0x00,0xf0,0x22,0xe1] 807@ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1] 808@ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1] 809@ CHECK: msr CPSR_fsx, r0 @ encoding: [0x00,0xf0,0x2e,0xe1] 810@ CHECK: msr SPSR_fc, r0 @ encoding: [0x00,0xf0,0x69,0xe1] 811@ CHECK: msr SPSR_fsxc, r0 @ encoding: [0x00,0xf0,0x6f,0xe1] 812@ CHECK: msr CPSR_fsxc, r0 @ encoding: [0x00,0xf0,0x2f,0xe1] 813 814@------------------------------------------------------------------------------ 815@ MUL 816@------------------------------------------------------------------------------ 817 818 mul r5, r6, r7 819 muls r5, r6, r7 820 mulgt r5, r6, r7 821 mulsle r5, r6, r7 822 823@ CHECK: mul r5, r6, r7 @ encoding: [0x96,0x07,0x05,0xe0] 824@ CHECK: muls r5, r6, r7 @ encoding: [0x96,0x07,0x15,0xe0] 825@ CHECK: mulgt r5, r6, r7 @ encoding: [0x96,0x07,0x05,0xc0] 826@ CHECK: mulsle r5, r6, r7 @ encoding: [0x96,0x07,0x15,0xd0] 827 828 829@------------------------------------------------------------------------------ 830@ MVN (immediate) 831@------------------------------------------------------------------------------ 832 mvn r3, #7 833 mvn r4, #0xff0 834 mvn r5, #0xff0000 835 mvns r3, #7 836 mvneq r4, #0xff0 837 mvnseq r5, #0xff0000 838 839@ CHECK: mvn r3, #7 @ encoding: [0x07,0x30,0xe0,0xe3] 840@ CHECK: mvn r4, #4080 @ encoding: [0xff,0x4e,0xe0,0xe3] 841@ CHECK: mvn r5, #16711680 @ encoding: [0xff,0x58,0xe0,0xe3] 842@ CHECK: mvns r3, #7 @ encoding: [0x07,0x30,0xf0,0xe3] 843@ CHECK: mvneq r4, #4080 @ encoding: [0xff,0x4e,0xe0,0x03] 844@ CHECK: mvnseq r5, #16711680 @ encoding: [0xff,0x58,0xf0,0x03] 845 846 847@------------------------------------------------------------------------------ 848@ MVN (register) 849@------------------------------------------------------------------------------ 850 mvn r2, r3 851 mvns r2, r3 852 mvn r5, r6, lsl #19 853 mvn r5, r6, lsr #9 854 mvn r5, r6, asr #4 855 mvn r5, r6, ror #6 856 mvn r5, r6, rrx 857 mvneq r2, r3 858 mvnseq r2, r3, lsl #10 859 860@ CHECK: mvn r2, r3 @ encoding: [0x03,0x20,0xe0,0xe1] 861@ CHECK: mvns r2, r3 @ encoding: [0x03,0x20,0xf0,0xe1] 862@ CHECK: mvn r5, r6, lsl #19 @ encoding: [0x86,0x59,0xe0,0xe1] 863@ CHECK: mvn r5, r6, lsr #9 @ encoding: [0xa6,0x54,0xe0,0xe1] 864@ CHECK: mvn r5, r6, asr #4 @ encoding: [0x46,0x52,0xe0,0xe1] 865@ CHECK: mvn r5, r6, ror #6 @ encoding: [0x66,0x53,0xe0,0xe1] 866@ CHECK: mvn r5, r6, rrx @ encoding: [0x66,0x50,0xe0,0xe1] 867@ CHECK: mvneq r2, r3 @ encoding: [0x03,0x20,0xe0,0x01] 868@ CHECK: mvnseq r2, r3, lsl #10 @ encoding: [0x03,0x25,0xf0,0x01] 869 870 871@------------------------------------------------------------------------------ 872@ MVN (shifted register) 873@------------------------------------------------------------------------------ 874 mvn r5, r6, lsl r7 875 mvns r5, r6, lsr r7 876 mvngt r5, r6, asr r7 877 mvnslt r5, r6, ror r7 878 879@ CHECK: mvn r5, r6, lsl r7 @ encoding: [0x16,0x57,0xe0,0xe1] 880@ CHECK: mvns r5, r6, lsr r7 @ encoding: [0x36,0x57,0xf0,0xe1] 881@ CHECK: mvngt r5, r6, asr r7 @ encoding: [0x56,0x57,0xe0,0xc1] 882@ CHECK: mvnslt r5, r6, ror r7 @ encoding: [0x76,0x57,0xf0,0xb1] 883 884@------------------------------------------------------------------------------ 885@ NOP 886@------------------------------------------------------------------------------ 887 nop 888 nopgt 889 890@ CHECK: nop @ encoding: [0x00,0xf0,0x20,0xe3] 891@ CHECK: nopgt @ encoding: [0x00,0xf0,0x20,0xc3] 892 893 894@------------------------------------------------------------------------------ 895@ ORR 896@------------------------------------------------------------------------------ 897 orr r4, r5, #0xf000 898 orr r4, r5, r6 899 orr r4, r5, r6, lsl #5 900 orr r4, r5, r6, lsr #5 901 orr r4, r5, r6, lsr #5 902 orr r4, r5, r6, asr #5 903 orr r4, r5, r6, ror #5 904 orr r6, r7, r8, lsl r9 905 orr r6, r7, r8, lsr r9 906 orr r6, r7, r8, asr r9 907 orr r6, r7, r8, ror r9 908 orr r4, r5, r6, rrx 909 910 @ destination register is optional 911 orr r5, #0xf000 912 orr r4, r5 913 orr r4, r5, lsl #5 914 orr r4, r5, lsr #5 915 orr r4, r5, lsr #5 916 orr r4, r5, asr #5 917 orr r4, r5, ror #5 918 orr r6, r7, lsl r9 919 orr r6, r7, lsr r9 920 orr r6, r7, asr r9 921 orr r6, r7, ror r9 922 orr r4, r5, rrx 923 924@ CHECK: orr r4, r5, #61440 @ encoding: [0x0f,0x4a,0x85,0xe3] 925@ CHECK: orr r4, r5, r6 @ encoding: [0x06,0x40,0x85,0xe1] 926@ CHECK: orr r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x85,0xe1] 927@ CHECK: orr r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe1] 928@ CHECK: orr r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe1] 929@ CHECK: orr r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x85,0xe1] 930@ CHECK: orr r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x85,0xe1] 931@ CHECK: orr r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x87,0xe1] 932@ CHECK: orr r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x87,0xe1] 933@ CHECK: orr r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x87,0xe1] 934@ CHECK: orr r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x87,0xe1] 935@ CHECK: orr r4, r5, r6, rrx @ encoding: [0x66,0x40,0x85,0xe1] 936 937@ CHECK: orr r5, r5, #61440 @ encoding: [0x0f,0x5a,0x85,0xe3] 938@ CHECK: orr r4, r4, r5 @ encoding: [0x05,0x40,0x84,0xe1] 939@ CHECK: orr r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x84,0xe1] 940@ CHECK: orr r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe1] 941@ CHECK: orr r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe1] 942@ CHECK: orr r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x84,0xe1] 943@ CHECK: orr r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x84,0xe1] 944@ CHECK: orr r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x86,0xe1] 945@ CHECK: orr r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x86,0xe1] 946@ CHECK: orr r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x86,0xe1] 947@ CHECK: orr r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x86,0xe1] 948@ CHECK: orr r4, r4, r5, rrx @ encoding: [0x65,0x40,0x84,0xe1] 949 950 orrseq r4, r5, #0xf000 951 orrne r4, r5, r6 952 orrseq r4, r5, r6, lsl #5 953 orrlo r6, r7, r8, ror r9 954 orrshi r4, r5, r6, rrx 955 orrcs r5, #0xf000 956 orrseq r4, r5 957 orrne r6, r7, asr r9 958 orrslt r6, r7, ror r9 959 orrsgt r4, r5, rrx 960 961@ CHECK: orrseq r4, r5, #61440 @ encoding: [0x0f,0x4a,0x95,0x03] 962@ CHECK: orrne r4, r5, r6 @ encoding: [0x06,0x40,0x85,0x11] 963@ CHECK: orrseq r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x95,0x01] 964@ CHECK: orrlo r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x87,0x31] 965@ CHECK: orrshi r4, r5, r6, rrx @ encoding: [0x66,0x40,0x95,0x81] 966@ CHECK: orrhs r5, r5, #61440 @ encoding: [0x0f,0x5a,0x85,0x23] 967@ CHECK: orrseq r4, r4, r5 @ encoding: [0x05,0x40,0x94,0x01] 968@ CHECK: orrne r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x86,0x11] 969@ CHECK: orrslt r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x96,0xb1] 970@ CHECK: orrsgt r4, r4, r5, rrx @ encoding: [0x65,0x40,0x94,0xc1] 971 972@------------------------------------------------------------------------------ 973@ PKH 974@------------------------------------------------------------------------------ 975 pkhbt r2, r2, r3 976 pkhbt r2, r2, r3, lsl #31 977 pkhbt r2, r2, r3, lsl #0 978 pkhbt r2, r2, r3, lsl #15 979 980 pkhtb r2, r2, r3 981 pkhtb r2, r2, r3, asr #31 982 pkhtb r2, r2, r3, asr #15 983 984@ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6] 985@ CHECK: pkhbt r2, r2, r3, lsl #31 @ encoding: [0x93,0x2f,0x82,0xe6] 986@ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6] 987@ CHECK: pkhbt r2, r2, r3, lsl #15 @ encoding: [0x93,0x27,0x82,0xe6] 988 989@ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6] 990@ CHECK: pkhtb r2, r2, r3, asr #31 @ encoding: [0xd3,0x2f,0x82,0xe6] 991@ CHECK: pkhtb r2, r2, r3, asr #15 @ encoding: [0xd3,0x27,0x82,0xe6] 992 993@------------------------------------------------------------------------------ 994@ FIXME: PLD 995@------------------------------------------------------------------------------ 996@------------------------------------------------------------------------------ 997@ FIXME: PLI 998@------------------------------------------------------------------------------ 999 1000 1001@------------------------------------------------------------------------------ 1002@ POP 1003@------------------------------------------------------------------------------ 1004 pop {r7} 1005 pop {r7, r8, r9, r10} 1006 1007@ FIXME: pop of a single register should encode as "ldr r7, [sp], #4" 1008@ CHECK-FIXME: pop {r7} @ encoding: [0x04,0x70,0x9d,0xe4] 1009@ CHECK: pop {r7, r8, r9, r10} @ encoding: [0x80,0x07,0xbd,0xe8] 1010 1011 1012@------------------------------------------------------------------------------ 1013@ PUSH 1014@------------------------------------------------------------------------------ 1015 push {r7} 1016 push {r7, r8, r9, r10} 1017 1018@ FIXME: push of a single register should encode as "str r7, [sp, #-4]!" 1019@ CHECK-FIXME: push {r7} @ encoding: [0x04,0x70,0x2d,0xe5] 1020@ CHECK: push {r7, r8, r9, r10} @ encoding: [0x80,0x07,0x2d,0xe9] 1021 1022 1023@------------------------------------------------------------------------------ 1024@ QADD/QADD16/QADD8 1025@------------------------------------------------------------------------------ 1026 qadd r1, r2, r3 1027 qaddne r1, r2, r3 1028 qadd16 r1, r2, r3 1029 qadd16gt r1, r2, r3 1030 qadd8 r1, r2, r3 1031 qadd8le r1, r2, r3 1032 1033@ CHECK: qadd r1, r2, r3 @ encoding: [0x52,0x10,0x03,0xe1] 1034@ CHECK: qaddne r1, r2, r3 @ encoding: [0x52,0x10,0x03,0x11] 1035@ CHECK: qadd16 r1, r2, r3 @ encoding: [0x13,0x1f,0x22,0xe6] 1036@ CHECK: qadd16gt r1, r2, r3 @ encoding: [0x13,0x1f,0x22,0xc6] 1037@ CHECK: qadd8 r1, r2, r3 @ encoding: [0x93,0x1f,0x22,0xe6] 1038@ CHECK: qadd8le r1, r2, r3 @ encoding: [0x93,0x1f,0x22,0xd6] 1039 1040 1041@------------------------------------------------------------------------------ 1042@ QDADD/QDSUB 1043@------------------------------------------------------------------------------ 1044 qdadd r6, r7, r8 1045 qdaddhi r6, r7, r8 1046 qdsub r6, r7, r8 1047 qdsubhi r6, r7, r8 1048 1049@ CHECK: qdadd r6, r7, r8 @ encoding: [0x57,0x60,0x48,0xe1] 1050@ CHECK: qdaddhi r6, r7, r8 @ encoding: [0x57,0x60,0x48,0x81] 1051@ CHECK: qdsub r6, r7, r8 @ encoding: [0x57,0x60,0x68,0xe1] 1052@ CHECK: qdsubhi r6, r7, r8 @ encoding: [0x57,0x60,0x68,0x81] 1053 1054 1055@------------------------------------------------------------------------------ 1056@ QSAX 1057@------------------------------------------------------------------------------ 1058 qsax r9, r12, r0 1059 qsaxeq r9, r12, r0 1060 1061@ CHECK: qsax r9, r12, r0 @ encoding: [0x50,0x9f,0x2c,0xe6] 1062@ CHECK: qsaxeq r9, r12, r0 @ encoding: [0x50,0x9f,0x2c,0x06] 1063 1064 1065@------------------------------------------------------------------------------ 1066@ QADD/QADD16/QADD8 1067@------------------------------------------------------------------------------ 1068 qsub r1, r2, r3 1069 qsubne r1, r2, r3 1070 qsub16 r1, r2, r3 1071 qsub16gt r1, r2, r3 1072 qsub8 r1, r2, r3 1073 qsub8le r1, r2, r3 1074 1075@ CHECK: qsub r1, r2, r3 @ encoding: [0x52,0x10,0x23,0xe1] 1076@ CHECK: qsubne r1, r2, r3 @ encoding: [0x52,0x10,0x23,0x11] 1077@ CHECK: qsub16 r1, r2, r3 @ encoding: [0x73,0x1f,0x22,0xe6] 1078@ CHECK: qsub16gt r1, r2, r3 @ encoding: [0x73,0x1f,0x22,0xc6] 1079@ CHECK: qsub8 r1, r2, r3 @ encoding: [0xf3,0x1f,0x22,0xe6] 1080@ CHECK: qsub8le r1, r2, r3 @ encoding: [0xf3,0x1f,0x22,0xd6] 1081 1082 1083@------------------------------------------------------------------------------ 1084@ RBIT 1085@------------------------------------------------------------------------------ 1086 rbit r1, r2 1087 rbitne r1, r2 1088 1089@ CHECK: rbit r1, r2 @ encoding: [0x32,0x1f,0xff,0xe6] 1090@ CHECK: rbitne r1, r2 @ encoding: [0x32,0x1f,0xff,0x16] 1091 1092 1093@------------------------------------------------------------------------------ 1094@ REV/REV16/REVSH 1095@------------------------------------------------------------------------------ 1096 rev r1, r9 1097 revne r1, r5 1098 rev16 r8, r3 1099 rev16ne r12, r4 1100 revsh r4, r9 1101 revshne r9, r1 1102 1103@ CHECK: rev r1, r9 @ encoding: [0x39,0x1f,0xbf,0xe6] 1104@ CHECK: revne r1, r5 @ encoding: [0x35,0x1f,0xbf,0x16] 1105@ CHECK: rev16 r8, r3 @ encoding: [0xb3,0x8f,0xbf,0xe6] 1106@ CHECK: rev16ne r12, r4 @ encoding: [0xb4,0xcf,0xbf,0x16] 1107@ CHECK: revsh r4, r9 @ encoding: [0xb9,0x4f,0xff,0xe6] 1108@ CHECK: revshne r9, r1 @ encoding: [0xb1,0x9f,0xff,0x16] 1109 1110 1111@------------------------------------------------------------------------------ 1112@ RSB 1113@------------------------------------------------------------------------------ 1114 rsb r4, r5, #0xf000 1115 rsb r4, r5, r6 1116 rsb r4, r5, r6, lsl #5 1117 rsblo r4, r5, r6, lsr #5 1118 rsb r4, r5, r6, lsr #5 1119 rsb r4, r5, r6, asr #5 1120 rsb r4, r5, r6, ror #5 1121 rsb r6, r7, r8, lsl r9 1122 rsb r6, r7, r8, lsr r9 1123 rsb r6, r7, r8, asr r9 1124 rsble r6, r7, r8, ror r9 1125 rsb r4, r5, r6, rrx 1126 1127 @ destination register is optional 1128 rsb r5, #0xf000 1129 rsb r4, r5 1130 rsb r4, r5, lsl #5 1131 rsb r4, r5, lsr #5 1132 rsbne r4, r5, lsr #5 1133 rsb r4, r5, asr #5 1134 rsb r4, r5, ror #5 1135 rsbgt r6, r7, lsl r9 1136 rsb r6, r7, lsr r9 1137 rsb r6, r7, asr r9 1138 rsb r6, r7, ror r9 1139 rsb r4, r5, rrx 1140 1141@ CHECK: rsb r4, r5, #61440 @ encoding: [0x0f,0x4a,0x65,0xe2] 1142@ CHECK: rsb r4, r5, r6 @ encoding: [0x06,0x40,0x65,0xe0] 1143@ CHECK: rsb r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x65,0xe0] 1144@ CHECK: rsblo r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x65,0x30] 1145@ CHECK: rsb r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x65,0xe0] 1146@ CHECK: rsb r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x65,0xe0] 1147@ CHECK: rsb r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x65,0xe0] 1148@ CHECK: rsb r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x67,0xe0] 1149@ CHECK: rsb r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x67,0xe0] 1150@ CHECK: rsb r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x67,0xe0] 1151@ CHECK: rsble r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x67,0xd0] 1152@ CHECK: rsb r4, r5, r6, rrx @ encoding: [0x66,0x40,0x65,0xe0] 1153 1154@ CHECK: rsb r5, r5, #61440 @ encoding: [0x0f,0x5a,0x65,0xe2] 1155@ CHECK: rsb r4, r4, r5 @ encoding: [0x05,0x40,0x64,0xe0] 1156@ CHECK: rsb r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x64,0xe0] 1157@ CHECK: rsb r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x64,0xe0] 1158@ CHECK: rsbne r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x64,0x10] 1159@ CHECK: rsb r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x64,0xe0] 1160@ CHECK: rsb r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x64,0xe0] 1161@ CHECK: rsbgt r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x66,0xc0] 1162@ CHECK: rsb r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x66,0xe0] 1163@ CHECK: rsb r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x66,0xe0] 1164@ CHECK: rsb r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x66,0xe0] 1165@ CHECK: rsb r4, r4, r5, rrx @ encoding: [0x65,0x40,0x64,0xe0] 1166 1167@------------------------------------------------------------------------------ 1168@ RSC 1169@------------------------------------------------------------------------------ 1170 rsc r4, r5, #0xf000 1171 rsc r4, r5, r6 1172 rsc r4, r5, r6, lsl #5 1173 rsclo r4, r5, r6, lsr #5 1174 rsc r4, r5, r6, lsr #5 1175 rsc r4, r5, r6, asr #5 1176 rsc r4, r5, r6, ror #5 1177 rsc r6, r7, r8, lsl r9 1178 rsc r6, r7, r8, lsr r9 1179 rsc r6, r7, r8, asr r9 1180 rscle r6, r7, r8, ror r9 1181 1182 @ destination register is optional 1183 rsc r5, #0xf000 1184 rsc r4, r5 1185 rsc r4, r5, lsl #5 1186 rsc r4, r5, lsr #5 1187 rscne r4, r5, lsr #5 1188 rsc r4, r5, asr #5 1189 rsc r4, r5, ror #5 1190 rscgt r6, r7, lsl r9 1191 rsc r6, r7, lsr r9 1192 rsc r6, r7, asr r9 1193 rsc r6, r7, ror r9 1194 1195@ CHECK: rsc r4, r5, #61440 @ encoding: [0x0f,0x4a,0xe5,0xe2] 1196@ CHECK: rsc r4, r5, r6 @ encoding: [0x06,0x40,0xe5,0xe0] 1197@ CHECK: rsc r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0xe5,0xe0] 1198@ CHECK: rsclo r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xe5,0x30] 1199@ CHECK: rsc r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xe5,0xe0] 1200@ CHECK: rsc r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0xe5,0xe0] 1201@ CHECK: rsc r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0xe5,0xe0] 1202@ CHECK: rsc r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0xe7,0xe0] 1203@ CHECK: rsc r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0xe7,0xe0] 1204@ CHECK: rsc r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0xe7,0xe0] 1205@ CHECK: rscle r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0xe7,0xd0] 1206 1207@ CHECK: rsc r5, r5, #61440 @ encoding: [0x0f,0x5a,0xe5,0xe2] 1208@ CHECK: rsc r4, r4, r5 @ encoding: [0x05,0x40,0xe4,0xe0] 1209@ CHECK: rsc r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0xe4,0xe0] 1210@ CHECK: rsc r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xe4,0xe0] 1211@ CHECK: rscne r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xe4,0x10] 1212@ CHECK: rsc r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0xe4,0xe0] 1213@ CHECK: rsc r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0xe4,0xe0] 1214@ CHECK: rscgt r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0xe6,0xc0] 1215@ CHECK: rsc r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0xe6,0xe0] 1216@ CHECK: rsc r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0xe6,0xe0] 1217@ CHECK: rsc r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0xe6,0xe0] 1218 1219@------------------------------------------------------------------------------ 1220@ SADD16/SADD8 1221@------------------------------------------------------------------------------ 1222 sadd16 r1, r2, r3 1223 sadd16gt r1, r2, r3 1224 sadd8 r1, r2, r3 1225 sadd8le r1, r2, r3 1226 1227@ CHECK: sadd16 r1, r2, r3 @ encoding: [0x13,0x1f,0x12,0xe6] 1228@ CHECK: sadd16gt r1, r2, r3 @ encoding: [0x13,0x1f,0x12,0xc6] 1229@ CHECK: sadd8 r1, r2, r3 @ encoding: [0x93,0x1f,0x12,0xe6] 1230@ CHECK: sadd8le r1, r2, r3 @ encoding: [0x93,0x1f,0x12,0xd6] 1231 1232 1233@------------------------------------------------------------------------------ 1234@ SASX 1235@------------------------------------------------------------------------------ 1236 sasx r9, r12, r0 1237 sasxeq r9, r12, r0 1238 1239@ CHECK: sasx r9, r12, r0 @ encoding: [0x30,0x9f,0x1c,0xe6] 1240@ CHECK: sasxeq r9, r12, r0 @ encoding: [0x30,0x9f,0x1c,0x06] 1241 1242 1243@------------------------------------------------------------------------------ 1244@ SBC 1245@------------------------------------------------------------------------------ 1246 sbc r4, r5, #0xf000 1247 sbc r4, r5, r6 1248 sbc r4, r5, r6, lsl #5 1249 sbc r4, r5, r6, lsr #5 1250 sbc r4, r5, r6, lsr #5 1251 sbc r4, r5, r6, asr #5 1252 sbc r4, r5, r6, ror #5 1253 sbc r6, r7, r8, lsl r9 1254 sbc r6, r7, r8, lsr r9 1255 sbc r6, r7, r8, asr r9 1256 sbc r6, r7, r8, ror r9 1257 1258 @ destination register is optional 1259 sbc r5, #0xf000 1260 sbc r4, r5 1261 sbc r4, r5, lsl #5 1262 sbc r4, r5, lsr #5 1263 sbc r4, r5, lsr #5 1264 sbc r4, r5, asr #5 1265 sbc r4, r5, ror #5 1266 sbc r6, r7, lsl r9 1267 sbc r6, r7, lsr r9 1268 sbc r6, r7, asr r9 1269 sbc r6, r7, ror r9 1270 1271@ CHECK: sbc r4, r5, #61440 @ encoding: [0x0f,0x4a,0xc5,0xe2] 1272@ CHECK: sbc r4, r5, r6 @ encoding: [0x06,0x40,0xc5,0xe0] 1273@ CHECK: sbc r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0xc5,0xe0] 1274@ CHECK: sbc r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xc5,0xe0] 1275@ CHECK: sbc r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xc5,0xe0] 1276@ CHECK: sbc r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0xc5,0xe0] 1277@ CHECK: sbc r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0xc5,0xe0] 1278@ CHECK: sbc r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0xc7,0xe0] 1279@ CHECK: sbc r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0xc7,0xe0] 1280@ CHECK: sbc r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0xc7,0xe0] 1281@ CHECK: sbc r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0xc7,0xe0] 1282 1283@ CHECK: sbc r5, r5, #61440 @ encoding: [0x0f,0x5a,0xc5,0xe2] 1284@ CHECK: sbc r4, r4, r5 @ encoding: [0x05,0x40,0xc4,0xe0] 1285@ CHECK: sbc r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0xc4,0xe0] 1286@ CHECK: sbc r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xc4,0xe0] 1287@ CHECK: sbc r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xc4,0xe0] 1288@ CHECK: sbc r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0xc4,0xe0] 1289@ CHECK: sbc r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0xc4,0xe0] 1290@ CHECK: sbc r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0xc6,0xe0] 1291@ CHECK: sbc r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0xc6,0xe0] 1292@ CHECK: sbc r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0xc6,0xe0] 1293@ CHECK: sbc r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0xc6,0xe0] 1294 1295 1296@------------------------------------------------------------------------------ 1297@ STM* 1298@------------------------------------------------------------------------------ 1299 stm r2, {r1,r3-r6,sp} 1300 stmia r2, {r1,r3-r6,sp} 1301 stmib r2, {r1,r3-r6,sp} 1302 stmda r2, {r1,r3-r6,sp} 1303 stmdb r2, {r1,r3-r6,sp} 1304 stmfd r2, {r1,r3-r6,sp} 1305 1306 @ with update 1307 stmia r2!, {r1,r3-r6,sp} 1308 stmib r2!, {r1,r3-r6,sp} 1309 stmda r2!, {r1,r3-r6,sp} 1310 stmdb r2!, {r1,r3-r6,sp} 1311@ CHECK: stm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8] 1312@ CHECK: stm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8] 1313@ CHECK: stmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe9] 1314@ CHECK: stmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe8] 1315@ CHECK: stmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe9] 1316@ CHECK: stmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe9] 1317 1318@ CHECK: stm r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa2,0xe8] 1319@ CHECK: stmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa2,0xe9] 1320@ CHECK: stmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x22,0xe8] 1321@ CHECK: stmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x22,0xe9] 1322