1# RUN: llvm-mc --disassemble --show-encoding %s -triple=thumbv7-apple-darwin9 -mcpu=cortex-a9 | FileCheck %s 2 3# CHECK: add r5, sp, #68 40x11 0xad 5 6# CHECK: adcs r0, r0, #1 70x50 0xf1 0x01 0x00 8 9# CHECK: b #30 100x0f 0xe0 11 12# CHECK: bgt.w #-16 130x3f 0xf7 0xf8 0xaf 14 15# CHECK: bfc r0, #10, #10 160x6f 0xf3 0x93 0x20 17 18# CHECK: bfi r2, r10, #0, #1 190x6a 0xf3 0x00 0x02 20 21# CHECK: cbnz r7, #20 220x57 0xb9 23 24# CHECK: cmp r3, r4 250xa3 0x42 26 27# CHECK: cmn.w r0, #31 280x10 0xf1 0x1f 0x0f 29 30# CHECK: ldm r0!, {r1} 310x02 0xc8 32 33# CHECK: ldr r5, [pc, #432] 340x6c 0x4d 35 36# CHECK: str r0, [r3] 370x18 0x60 38 39# CHECK: str r0, [r3, #4] 400x58 0x60 41 42# CHECK: str r2, [r5, r3] 430xea 0x50 44 45# CHECK: ldrb.w r8, [pc, #-24] 460x1f 0xf8 0x18 0x80 47 48# CHECK: ldrd r0, r1, [r7, #64]! 490xf7 0xe9 0x10 0x01 50 51# CHECK: lsls.w r0, r5, #1 520x5f 0xea 0x45 0x00 53 54# CHECK: mov r11, r7 550xbb 0x46 56 57# CHECK: pkhtb r2, r4, r6, asr #16 580xc4 0xea 0x26 0x42 59 60# CHECK-NOT: pkhbt r2, r4, r6, lsl #0 61# CHECK: pkhbt r2, r4, r6 620xc4 0xea 0x06 0x02 63 64# CHECK: pop.w {r2, r4, r6, r8, r10, r12} 650xbd 0xe8 0x54 0x15 66 67# CHECK: push.w {r2, r4, r6, r8, r10, r12} 680x2d 0xe9 0x54 0x15 69 70# CHECK: rsbs r0, r0, #0 710x40 0x42 72 73# CHECK-NOT: rsb r0, r2, r0, lsl #0 74# CHECK: rsb r0, r2, r0 750xc2 0xeb 0x00 0x00 76 77# CHECK-NOT: ssat r0, #17, r12, lsl #0 78# CHECK: ssat r0, #17, r12 790x0c 0xf3 0x10 0x00 80 81# CHECK: strd r0, r1, [r7, #64] 820xc7 0xe9 0x10 0x01 83 84# CHECK: sub sp, #60 850x8f 0xb0 86 87# CHECK: adr.w r0, #-1 880xaf 0xf2 0x01 0x00 89 90# CHECK: subw r0, pc, #0 910xaf 0xf2 0x00 0x00 92 93# CHECK: subw r0, sp, #835 940xad 0xf2 0x43 0x30 95 96# CHECK: uqadd16 r3, r4, r5 970x94 0xfa 0x55 0xf3 98 99# CHECK: usada8 r5, r4, r3, r2 1000x74 0xfb 0x03 0x25 101 102# CHECK: uxtab16 r1, r2, r3, ror #8 1030x32 0xfa 0x93 0xf1 104 105# IT block begin 106# CHECK: ittte eq 1070x03 0xbf 108 109# CHECK: moveq r3, #3 1100x03 0x23 111 112# CHECK: asreq r1, r0, #5 1130x41 0x11 114 115# CHECK: lsleq r1, r0, #28 1160x01 0x07 117 118# CHECK: stmne r0!, {r1, r2, r3} 1190x0e 0xc0 120 121# IT block end 122# CHECK: rsbs r1, r2, #0 1230x51 0x42 124 125# CHECK: cpsid.w f 1260xaf 0xf3 0x20 0x86 127 128# CHECK: cps #15 1290xaf 0xf3 0x0f 0x81 130 131# CHECK: cpsie if, #10 1320xaf 0xf3 0x6a 0x85 133 134# CHECK: cpsie aif 1350x67 0xb6 136 137# CHECK: msr CPSR_fc, r0 1380x80 0xf3 0x00 0x89 139 140# CHECK: blx #-4 1410xff 0xf7 0xfe 0xef 142 143# CHECK: vpush {d8, d9, d10} 1440x2d 0xed 0x06 0x8b 145 146# CHECK: vcmpe.f64 d8, #0 1470xb5 0xee 0xc0 0x8b 148 149# CHECK: stmdb sp, {r0, r2, r3, r8, r11, lr} 1500x0d 0xe9 0x0d 0x49 151 152# CHECK: stm r5!, {r0, r1, r2, r3, r4} 1530x1f 0xc5 154 155# CHECK: ldm r5, {r0, r1, r2, r3, r4, r5} 1560x3f 0xcd 157 158# CHECK: ldm r5!, {r0, r1, r2, r3, r4} 1590x1f 0xcd 160 161# CHECK: adr.w r0, #1050 1620x0f 0xf2 0x1a 0x40 163 164# CHECK: ldrd r3, r8, [r11, #-60] 1650x5b 0xe9 0x0f 0x38 166 167# CHECK: ldrex r8, [r2] 1680x52 0xe8 0x00 0x8f 169 170# CHECK: ldrexd r8, r9, [r2] 1710xd2 0xe8 0x7f 0x89 172 173# CHECK: strexd r1, r7, r8, [r2] 1740xc2 0xe8 0x71 0x78 175 176# CHECK: tbh [r5, r4, lsl #1] 1770xd5 0xe8 0x14 0xf0 178 179# CHECK: tbb [r5, r4] 1800xd5 0xe8 0x04 0xf0 181 182# CHECK: ldr.w r4, [sp, r4, lsl #3] 1830x5d 0xf8 0x34 0x40 184 185# CHECK: ldr.w r5, [r6, #30] 1860xd6 0xf8 0x1e 0x50 187 188# CHECK: ldrh.w r5, [r6, #30] 1890xb6 0xf8 0x1e 0x50 190 191# CHECK: ldrt r5, [r6, #30] 1920x56 0xf8 0x1e 0x5e 193 194# CHECK: ldr r5, [r6, #-30] 1950x56 0xf8 0x1e 0x5c 196 197# CHECK: sel r7, r3, r5 1980xa3 0xfa 0x85 0xf7 199 200# CHECK: lsl.w r7, r3, r5 2010x03 0xfa 0x05 0xf7 202 203# CHECK: adds.w r7, r3, r5 2040x13 0xeb 0x05 0x07 205 206# CHECK: smlabt r4, r3, r2, r1 2070x13 0xfb 0x12 0x14 208 209# CHECK: smmulr r7, r8, r9 2100x58 0xfb 0x19 0xf7 211 212# CHECK: umull r1, r2, r3, r4 2130xa3 0xfb 0x04 0x12 214 215# CHECK: pld [r5, r0, lsl #1] 2160x15 0xf8 0x10 0xf0 217 218# CHECK: pld [pc, #-16] 2190x1f 0xf8 0x10 0xf0 220 221# CHECK: pld [r5, #30] 2220x95 0xf8 0x1e 0xf0 223 224# CHECK: stc2 p12, c15, [r9], {137} 2250x89 0xfc 0x89 0xfc 226 227# CHECK: stc2 p0, c0, [r0, #0]! 2280xa0 0xfd 0x00 0x00 229 230# CHECK: vmov r1, r0, d11 2310x50 0xec 0x1b 0x1b 232 233# CHECK: dsb nsh 2340xbf 0xf3 0x47 0x8f 235 236# CHECK: isb 2370xbf 0xf3 0x6f 0x8f 238 239# CHECK: asrs r1, r0, #32 2400x1 0x10 241 242# CHECK: lsr.w r10, r0, #32 2430x4f 0xea 0x10 0x0a 244 245# CHECK: blx sp 2460xe8 0x47 247 248# CHECK: bx lr 2490x70 0x47 250 251# CHECK: bx pc 2520x78 0x47 253 254# CHECK: svc #230 2550xe6 0xdf 256 257# CHECK: rfedb lr 2580x1e 0xe8 0x00 0xc0 259 260# CHECK: mov.w r3, #4294967295 2610x4f 0xf0 0xff 0x33 262 263# CHECK: mov pc, sp 2640xef 0x46 265 266# CHECK: nop 2670x00 0xbf 268 269# CHECK: nop.w 2700xaf 0xf3 0x00 0x80 271 272# CHECK: bne #24 2730x0c 0xd1 274 275# CHECK: vadd.f32 q0, q1, q2 2760x02 0xef 0x44 0x0d 277 278# CHECK: ldrsb r1, [r0, r0] 2790x01 0x56 280 281# CHECK: ldrsh r1, [r0, r0] 2820x01 0x5E 283 284# CHECK: and.w r5, r1, r10, ror #7 2850x1 0xea 0xfa 0x95 286 287# CHECK: ldrsh r6, [sp], #81 2880x3d 0xf9 0x51 0x6b 289 290# CHECK: usat16 r4, #10, r1 2910xa1 0xf3 0x0a 0x04 292 293# CHECK: smlad r5, r12, r8, r11 2940x2c 0xfb 0x8 0xb5 295 296# CHECK: teq.w r0, r11 2970x90 0xea 0xb 0x8f 298 299# CHECK: uxtb16 r9, r12, ror #16 3000x3f 0xfa 0xec 0xf9 301 302# CHECK: pldw [r11, r12, lsl #2] 3030x3b 0xf8 0x2c 0xf0 304 305# CHECK: msr CPSR_fc, r0 3060x80 0xf3 0x00 0x89 307 308# CHECK: mrs r0, apsr 3090xef 0xf3 0x00 0x80 310 311# rdar://11313994 312# CHECK: blx #2313244 3130x34 0xf2 0x0e 0xee 314 315# rdar://11324693 316# CHECK: bl #-12303196 3170x44 0xf4 0x52 0xda 318