806 lines · plain
1@ RUN: not llvm-mc -triple=armv7-apple-darwin < %s 2> %t2@ RUN: FileCheck --check-prefix=CHECK-ERRORS --check-prefix=CHECK-ERRORS-V7 < %t %s3@ RUN: not llvm-mc -triple=armv8 < %s 2> %t4@ RUN: FileCheck --check-prefix=CHECK-ERRORS --check-prefix=CHECK-ERRORS-V8 < %t %s5 6@ Check for various assembly diagnostic messages on invalid input.7 8@ 's' bit on an instruction that can't accept it.9 mlss r1, r2, r3, r410@ CHECK-ERRORS: error: instruction 'mls' can not set flags,11@ CHECK-ERRORS: but 's' suffix specified12 13 14 @ Out of range shift immediate values.15 adc r1, r2, r3, lsl #invalid16 adc r4, r5, r6, lsl #-117 adc r4, r5, r6, lsl #3218 adc r4, r5, r6, lsr #-119 adc r4, r5, r6, lsr #3320 adc r4, r5, r6, asr #-121 adc r4, r5, r6, asr #3322 adc r4, r5, r6, ror #-123 adc r4, r5, r6, ror #3224 25@ CHECK-ERRORS: error: invalid immediate shift value26@ CHECK-ERRORS: adc r1, r2, r3, lsl #invalid27@ CHECK-ERRORS: ^28@ CHECK-ERRORS: error: immediate shift value out of range29@ CHECK-ERRORS: adc r4, r5, r6, lsl #-130@ CHECK-ERRORS: ^31@ CHECK-ERRORS: error: immediate shift value out of range32@ CHECK-ERRORS: adc r4, r5, r6, lsl #3233@ CHECK-ERRORS: ^34@ CHECK-ERRORS: error: immediate shift value out of range35@ CHECK-ERRORS: adc r4, r5, r6, lsr #-136@ CHECK-ERRORS: ^37@ CHECK-ERRORS: error: immediate shift value out of range38@ CHECK-ERRORS: adc r4, r5, r6, lsr #3339@ CHECK-ERRORS: ^40@ CHECK-ERRORS: error: immediate shift value out of range41@ CHECK-ERRORS: adc r4, r5, r6, asr #-142@ CHECK-ERRORS: ^43@ CHECK-ERRORS: error: immediate shift value out of range44@ CHECK-ERRORS: adc r4, r5, r6, asr #3345@ CHECK-ERRORS: ^46@ CHECK-ERRORS: error: immediate shift value out of range47@ CHECK-ERRORS: adc r4, r5, r6, ror #-148@ CHECK-ERRORS: ^49@ CHECK-ERRORS: error: immediate shift value out of range50@ CHECK-ERRORS: adc r4, r5, r6, ror #3251 52 @ Out of range shift immediate values for load/store.53 str r1, [r2, r3, lsl #invalid]54 ldr r4, [r5], r6, lsl #-155 pld r4, [r5, r6, lsl #32]56 str r4, [r5], r6, lsr #-157 ldr r4, [r5, r6, lsr #33]58 pld r4, [r5, r6, asr #-1]59 str r4, [r5, r6, asr #33]60 ldr r4, [r5, r6, ror #-1]61 pld r4, [r5, r6, ror #32]62 pld r4, [r5, r6, rrx #0]63 ldr r4, [r5, r6, not_a_shift]64 65@ CHECK-ERRORS: error: shift amount must be an immediate66@ CHECK-ERRORS: str r1, [r2, r3, lsl #invalid]67@ CHECK-ERRORS: ^68@ CHECK-ERRORS: error: immediate shift value out of range69@ CHECK-ERRORS: ldr r4, [r5], r6, lsl #-170@ CHECK-ERRORS: ^71@ CHECK-ERRORS: error: immediate shift value out of range72@ CHECK-ERRORS: pld r4, [r5, r6, lsl #32]73@ CHECK-ERRORS: ^74@ CHECK-ERRORS: error: immediate shift value out of range75@ CHECK-ERRORS: str r4, [r5], r6, lsr #-176@ CHECK-ERRORS: ^77@ CHECK-ERRORS: error: immediate shift value out of range78@ CHECK-ERRORS: ldr r4, [r5, r6, lsr #33]79@ CHECK-ERRORS: ^80@ CHECK-ERRORS: error: immediate shift value out of range81@ CHECK-ERRORS: pld r4, [r5, r6, asr #-1]82@ CHECK-ERRORS: ^83@ CHECK-ERRORS: error: immediate shift value out of range84@ CHECK-ERRORS: str r4, [r5, r6, asr #33]85@ CHECK-ERRORS: ^86@ CHECK-ERRORS: error: immediate shift value out of range87@ CHECK-ERRORS: ldr r4, [r5, r6, ror #-1]88@ CHECK-ERRORS: ^89@ CHECK-ERRORS: error: immediate shift value out of range90@ CHECK-ERRORS: pld r4, [r5, r6, ror #32]91@ CHECK-ERRORS: error: ']' expected92@ CHECK-ERRORS: pld r4, [r5, r6, rrx #0]93@ CHECK-ERRORS: error: illegal shift operator94@ CHECK-ERRORS: ldr r4, [r5, r6, not_a_shift]95 96 @ Out of range 16-bit immediate on BKPT97 bkpt #6553698 99@ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this:100@ CHECK-ERRORS: note: operand must be an immediate in the range [0,65535]101@ CHECK-ERRORS: note: too many operands for instruction102@ CHECK-ERRORS: bkpt #65536103@ CHECK-ERRORS: ^104 105 @ Out of range immediates for v8 HLT instruction.106 hlt #65536107 hlt #-1108@CHECK-ERRORS-V7: error: invalid instruction109@CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,65535]110@CHECK-ERRORS: hlt #65536111@CHECK-ERRORS: ^112@CHECK-ERRORS-V7: error: invalid instruction113@CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,65535]114@CHECK-ERRORS: hlt #-1115@CHECK-ERRORS: ^116 117 @ Illegal condition code for v8 HLT instruction.118 hlteq #2119 hltlt #23120@CHECK-ERRORS: error: instruction 'hlt' is not predicable, but condition code specified121@CHECK-ERRORS: hlteq #2122@CHECK-ERRORS: ^123@CHECK-ERRORS: error: instruction 'hlt' is not predicable, but condition code specified124@CHECK-ERRORS: hltlt #23125@CHECK-ERRORS: ^126 127 @ Out of range 4 and 3 bit immediates on CDP[2]128 129 @ Out of range immediates for CDP/CDP2130 cdp p14, #2, c1, c1, c1, #8131 cdp p14, #1, c1, c1, c1, #8132 cdp2 p14, #2, c1, c1, c1, #8133 cdp2 p14, #1, c1, c1, c1, #8134 135@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7]136@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7]137@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7]138@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7]139@ CHECK-ERRORS-V8: error: invalid instruction140@ CHECK-ERRORS-V8: error: invalid instruction141@ CHECK-ERRORS-V8: error: invalid instruction142@ CHECK-ERRORS-V8: error: invalid instruction143 144 @ Out of range immediates for DBG145 dbg #-1146 dbg #16147 148@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,15]149@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,15]150@ CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,15]151@ CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,15]152@ Double-check that we're synced up with the right diagnostics.153@ CHECK-ERRORS: dbg #16154@ CHECK-ERRORS: ^155 156 @ Out of range immediate for MCR/MCR2/MCRR/MCRR2157 mcr p14, #8, r5, c1, c1, #4158 mcr p14, #2, r5, c1, c1, #8159 mcr2 p14, #8, r5, c1, c1, #4160 mcr2 p14, #1, r5, c1, c1, #8161 mcrr p14, #16, r5, r4, c1162 mcrr2 p14, #16, r5, r4, c1163@ CHECK-ERRORS: operand must be an immediate in the range [0,7]164@ CHECK-ERRORS: operand must be an immediate in the range [0,7]165@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7]166@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7]167@ CHECK-ERRORS-V8: invalid instruction168@ CHECK-ERRORS-V8: too many operands for instruction169@ CHECK-ERRORS: operand must be an immediate in the range [0,15]170@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,15]171@ CHECK-ERRORS-V8: invalid instruction172 173 @ p10 and p11 are reserved for NEON174 mcr p10, #2, r5, c1, c1, #4175 mcr p11, #2, r5, c1, c1, #4176 mrc p10, #7, r5, c1, c1, #0177 mrc p11, #7, r5, c1, c1, #0178@ CHECK-ERROR-V7: warning: since v7, cp10 and cp11 are reserved for advanced SIMD or floating point instructions179@ CHECK-ERROR-V7: warning: since v7, cp10 and cp11 are reserved for advanced SIMD or floating point instructions180@ CHECK-ERROR-V7: warning: since v7, cp10 and cp11 are reserved for advanced SIMD or floating point instructions181@ CHECK-ERROR-V7: warning: since v7, cp10 and cp11 are reserved for advanced SIMD or floating point instructions182 183 @ Out of range immediate for MOV184 movw r9, 0x10000185@ CHECK-ERRORS: error: operand must be an immediate in the range [0,0xffff] or a relocatable expression186@ CHECK-ERRORS: movw r9, 0x10000187@ CHECK-ERRORS: ^188 189 @ Invalid 's' bit usage for MOVW190 movs r6, #0xffff191 movwseq r9, #0xffff192@ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this:193@ CHECK-ERRORS-NEXT: movs r6, #0xffff194@ CHECK-ERRORS: note: invalid operand for instruction195@ CHECK-ERRORS: note: operand must be a register in range [r0, r15]196@ CHECK-ERRORS: error: instruction 'movw' can not set flags, but 's' suffix specified197@ CHECK-ERRORS-NEXT: movwseq r9, #0xffff198 199 @ Out of range immediate for MOVT200 movt r9, 0x10000201@ CHECK-ERRORS: error: operand must be an immediate in the range [0,0xffff] or a relocatable expression202@ CHECK-ERRORS: movt r9, 0x10000203@ CHECK-ERRORS: ^204 205 @ Out of range immediates for MRC/MRC2/MRRC/MRRC2206 mrc p14, #8, r1, c1, c2, #4207 mrc p14, #1, r1, c1, c2, #8208 mrc2 p14, #8, r1, c1, c2, #4209 mrc2 p14, #0, r1, c1, c2, #9210 mrrc p14, #16, r5, r4, c1211 mrrc2 p14, #17, r5, r4, c1212@ CHECK-ERRORS: operand must be an immediate in the range [0,7]213@ CHECK-ERRORS: operand must be an immediate in the range [0,7]214@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7]215@ CHECK-ERRORS-V8: invalid instruction216@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7]217@ CHECK-ERRORS-V8: too many operands for instruction218@ CHECK-ERRORS: operand must be an immediate in the range [0,15]219@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,15]220@ CHECK-ERRORS-V8: invalid instruction221 222 @ Shifter operand validation for PKH instructions.223 pkhbt r2, r2, r3, lsl #-1224 pkhbt r2, r2, r3, lsl #32225 pkhtb r2, r2, r3, asr #0226 pkhtb r2, r2, r3, asr #33227 pkhbt r2, r2, r3, asr #3228 pkhtb r2, r2, r3, lsl #3229 230@ CHECK-ERRORS: error: immediate value out of range231@ CHECK-ERRORS: pkhbt r2, r2, r3, lsl #-1232@ CHECK-ERRORS: ^233@ CHECK-ERRORS: error: immediate value out of range234@ CHECK-ERRORS: pkhbt r2, r2, r3, lsl #32235@ CHECK-ERRORS: ^236@ CHECK-ERRORS: error: immediate value out of range237@ CHECK-ERRORS: pkhtb r2, r2, r3, asr #0238@ CHECK-ERRORS: ^239@ CHECK-ERRORS: error: immediate value out of range240@ CHECK-ERRORS: pkhtb r2, r2, r3, asr #33241@ CHECK-ERRORS: ^242@ CHECK-ERRORS: error: lsl operand expected.243@ CHECK-ERRORS: pkhbt r2, r2, r3, asr #3244@ CHECK-ERRORS: ^245@ CHECK-ERRORS: error: asr operand expected.246@ CHECK-ERRORS: pkhtb r2, r2, r3, lsl #3247@ CHECK-ERRORS: ^248 249 250 @ bad values for SETEND251 setendne be252 setend me253 setend 1254 255@ CHECK-ERRORS: error: instruction 'setend' is not predicable, but condition code specified256@ CHECK-ERRORS: setendne be257@ CHECK-ERRORS: ^258@ CHECK-ERRORS: error: 'be' or 'le' operand expected259@ CHECK-ERRORS: setend me260@ CHECK-ERRORS: ^261@ CHECK-ERRORS: error: 'be' or 'le' operand expected262@ CHECK-ERRORS: setend 1263@ CHECK-ERRORS: ^264 265 266 @ Out of range immediates and bad shift types for SSAT267 ssat r8, #0, r10, lsl #8268 ssat r8, #33, r10, lsl #8269 ssat r8, #1, r10, lsl #-1270 ssat r8, #1, r10, lsl #32271 ssat r8, #1, r10, asr #0272 ssat r8, #1, r10, asr #33273 ssat r8, #1, r10, lsr #5274 ssat r8, #1, r10, lsl fred275 ssat r8, #1, r10, lsl #fred276 277@ CHECK-ERRORS: error: operand must be an immediate in the range [1,32]278@ CHECK-ERRORS: ssat r8, #0, r10, lsl #8279@ CHECK-ERRORS: ^280@ CHECK-ERRORS: error: operand must be an immediate in the range [1,32]281@ CHECK-ERRORS: ssat r8, #33, r10, lsl #8282@ CHECK-ERRORS: ^283@ CHECK-ERRORS: error: 'lsr' shift amount must be in range [0,31]284@ CHECK-ERRORS: ssat r8, #1, r10, lsl #-1285@ CHECK-ERRORS: ^286@ CHECK-ERRORS: error: 'lsr' shift amount must be in range [0,31]287@ CHECK-ERRORS: ssat r8, #1, r10, lsl #32288@ CHECK-ERRORS: ^289@ CHECK-ERRORS: error: 'asr' shift amount must be in range [1,32]290@ CHECK-ERRORS: ssat r8, #1, r10, asr #0291@ CHECK-ERRORS: ^292@ CHECK-ERRORS: error: 'asr' shift amount must be in range [1,32]293@ CHECK-ERRORS: ssat r8, #1, r10, asr #33294@ CHECK-ERRORS: ^295@ CHECK-ERRORS: error: operand must be a register in range [r0, r14]296@ CHECK-ERRORS: ssat r8, #1, r10, lsr #5297@ CHECK-ERRORS: ^298@ CHECK-ERRORS: error: '#' expected299@ CHECK-ERRORS: ssat r8, #1, r10, lsl fred300@ CHECK-ERRORS: ^301@ CHECK-ERRORS: error: shift amount must be an immediate302@ CHECK-ERRORS: ssat r8, #1, r10, lsl #fred303@ CHECK-ERRORS: ^304 305 @ Out of range immediates for SSAT16306 ssat16 r2, #0, r7307 ssat16 r3, #17, r5308 309@ CHECK-ERRORS: error: operand must be an immediate in the range [1,16]310@ CHECK-ERRORS: ssat16 r2, #0, r7311@ CHECK-ERRORS: ^312@ CHECK-ERRORS: error: operand must be an immediate in the range [1,16]313@ CHECK-ERRORS: ssat16 r3, #17, r5314@ CHECK-ERRORS: ^315 316 317 @ Out of order STM registers318 stmda sp!, {r5, r2}319 320@ CHECK-ERRORS: warning: register list not in ascending order321@ CHECK-ERRORS: stmda sp!, {r5, r2}322@ CHECK-ERRORS: ^323 324 325 @ Out of range immediate on SVC326 svc #0x1000000327@ CHECK-ERRORS: error: operand must be an immediate in the range [0,0xffffff]328@ CHECK-ERRORS: svc #0x1000000329@ CHECK-ERRORS: ^330 331 332 @ Out of order Rt/Rt2 operands for ldrexd/strexd333 ldrexd r4, r3, [r8]334 strexd r6, r5, r3, [r8]335 336@ CHECK-ERRORS: error: destination operands must be sequential337@ CHECK-ERRORS: ldrexd r4, r3, [r8]338@ CHECK-ERRORS: ^339@ CHECK-ERRORS: error: source operands must be sequential340@ CHECK-ERRORS: strexd r6, r5, r3, [r8]341@ CHECK-ERRORS: ^342 343 @ Illegal rotate operators for extend instructions344 sxtb r8, r3, #8345 sxtb r8, r3, ror 24346 sxtb r8, r3, ror #8 -347 sxtab r3, r8, r3, ror #(fred - wilma)348 sxtab r7, r8, r3, ror #25349 sxtah r9, r3, r3, ror #-8350 sxtb16ge r2, r3, lsr #24351 352@ CHECK-ERRORS: error: invalid operand for instruction353@ CHECK-ERRORS: sxtb r8, r3, #8354@ CHECK-ERRORS: ^355@ CHECK-ERRORS: error: '#' expected356@ CHECK-ERRORS: sxtb r8, r3, ror 24357@ CHECK-ERRORS: ^358@ CHECK-ERRORS: error: unknown token in expression359@ CHECK-ERRORS: sxtb r8, r3, ror #8 -360@ CHECK-ERRORS: ^361@ CHECK-ERRORS: error: malformed rotate expression362@ CHECK-ERRORS: sxtb r8, r3, ror #8 -363@ CHECK-ERRORS: ^364@ CHECK-ERRORS: error: rotate amount must be an immediate365@ CHECK-ERRORS: sxtab r3, r8, r3, ror #(fred - wilma)366@ CHECK-ERRORS: ^367@ CHECK-ERRORS: error: 'ror' rotate amount must be 8, 16, or 24368@ CHECK-ERRORS: sxtab r7, r8, r3, ror #25369@ CHECK-ERRORS: ^370@ CHECK-ERRORS: error: 'ror' rotate amount must be 8, 16, or 24371@ CHECK-ERRORS: sxtah r9, r3, r3, ror #-8372@ CHECK-ERRORS: ^373@ CHECK-ERRORS: error: operand must be a register in range [r0, r14]374@ CHECK-ERRORS: sxtb16ge r2, r3, lsr #24375@ CHECK-ERRORS: ^376 377 @ Out of range width for SBFX/UBFX378 sbfx r4, r5, #31, #2379 ubfxgt r4, r5, #16, #17380 381@ CHECK-ERRORS: error: bitfield width must be in range [1,32-lsb]382@ CHECK-ERRORS: sbfx r4, r5, #31, #2383@ CHECK-ERRORS: ^384@ CHECK-ERRORS: error: bitfield width must be in range [1,32-lsb]385@ CHECK-ERRORS: ubfxgt r4, r5, #16, #17386@ CHECK-ERRORS: ^387 388 @ Using pc for SBFX/UBFX389 sbfx pc, r2, #1, #3390 sbfx sp, pc, #4, #5391 ubfx pc, r0, #0, #31392 ubfx r14, pc, #1, #2393@ CHECK-ERRORS: error: operand must be a register in range [r0, r14]394@ CHECK-ERRORS: sbfx pc, r2, #1, #3395@ CHECK-ERRORS: ^396@ CHECK-ERRORS: error: operand must be a register in range [r0, r14]397@ CHECK-ERRORS: sbfx sp, pc, #4, #5398@ CHECK-ERRORS: ^399@ CHECK-ERRORS: error: operand must be a register in range [r0, r14]400@ CHECK-ERRORS: ubfx pc, r0, #0, #31401@ CHECK-ERRORS: ^402@ CHECK-ERRORS: error: operand must be a register in range [r0, r14]403@ CHECK-ERRORS: ubfx r14, pc, #1, #2404@ CHECK-ERRORS: ^405 406 @ Out of order Rt/Rt2 operands for ldrd/strd407 ldrd r4, r3, [r8]408 ldrd r4, r3, [r8, #8]!409 ldrd r4, r3, [r8], #8410 strd r4, r3, [r8]411 strd r4, r3, [r8, #8]!412 strd r4, r3, [r8], #8413@ CHECK-ERRORS: error: destination operands must be sequential414@ CHECK-ERRORS: ldrd r4, r3, [r8]415@ CHECK-ERRORS: ^416@ CHECK-ERRORS: error: destination operands must be sequential417@ CHECK-ERRORS: ldrd r4, r3, [r8, #8]!418@ CHECK-ERRORS: ^419@ CHECK-ERRORS: error: destination operands must be sequential420@ CHECK-ERRORS: ldrd r4, r3, [r8], #8421@ CHECK-ERRORS: ^422@ CHECK-ERRORS: error: source operands must be sequential423@ CHECK-ERRORS: strd r4, r3, [r8]424@ CHECK-ERRORS: ^425@ CHECK-ERRORS: error: source operands must be sequential426@ CHECK-ERRORS: strd r4, r3, [r8, #8]!427@ CHECK-ERRORS: ^428@ CHECK-ERRORS: error: source operands must be sequential429@ CHECK-ERRORS: strd r4, r3, [r8], #8430@ CHECK-ERRORS: ^431 432 @ Odd first register for ldrd/strd433 ldrd r5, r6, [r8]434 strd r5, r6, [r8]435@ CHECK-ERRORS: error: Rt must be even-numbered436@ CHECK-ERRORS: ldrd r5, r6, [r8]437@ CHECK-ERRORS: ^438@ CHECK-ERRORS: error: Rt must be even-numbered439@ CHECK-ERRORS: strd r5, r6, [r8]440@ CHECK-ERRORS: ^441 442 @ Post-increment with base equal to source443 ldrd r6, r7, [r6]!444 ldrd r6, r7, [r7]!445 strd r6, r7, [r6]!446 strd r6, r7, [r7]!447@ CHECK-ERRORS: error: base register needs to be different from destination registers448@ CHECK-ERRORS: ldrd r6, r7, [r6]!449@ CHECK-ERRORS: ^450@ CHECK-ERRORS: error: base register needs to be different from destination registers451@ CHECK-ERRORS: ldrd r6, r7, [r7]!452@ CHECK-ERRORS: ^453@ CHECK-ERRORS: error: source register and base register can't be identical454@ CHECK-ERRORS: strd r6, r7, [r6]!455@ CHECK-ERRORS: ^456@ CHECK-ERRORS: error: source register and base register can't be identical457@ CHECK-ERRORS: strd r6, r7, [r7]!458@ CHECK-ERRORS: ^459 460 @ Paired load/store of pc461 ldrd lr, pc, [r6]!462 strd lr, pc, [r6]!463@ CHECK-ERRORS: error: Rt can't be R14464@ CHECK-ERRORS: ldrd lr, pc, [r6]!465@ CHECK-ERRORS: ^466@ CHECK-ERRORS: error: Rt can't be R14467@ CHECK-ERRORS: strd lr, pc, [r6]!468@ CHECK-ERRORS: ^469 470 471 @ Bad register lists for VFP.472 vpush {s0, s3}473@ CHECK-ERRORS: error: non-contiguous register range474@ CHECK-ERRORS: vpush {s0, s3}475@ CHECK-ERRORS: ^476 477 @ Out of range coprocessor option immediate.478 ldc2 p2, c8, [r1], { 256 }479 ldc2 p2, c8, [r1], { -1 }480 481@ CHECK-ERRORS-V7: error: coprocessor option must be an immediate in range [0, 255]482@ CHECK-ERRORS-V7: ldc2 p2, c8, [r1], { 256 }483@ CHECK-ERRORS-V7: ^484@ CHECK-ERRORS-V8: error: register expected485@ CHECK-ERRORS-V7: error: coprocessor option must be an immediate in range [0, 255]486@ CHECK-ERRORS-V7: ldc2 p2, c8, [r1], { -1 }487@ CHECK-ERRORS-V7: ^488@ CHECK-ERRORS-V8: error: register expected489 490 @ Bad CPS instruction format.491 cps f,#1492@ CHECK-ERRORS: error: invalid operand for instruction493@ CHECK-ERRORS: cps f,#1494@ CHECK-ERRORS: ^495 496 @ Bad operands for msr497 msr #0, #0498 msr foo, #0499@ CHECK-ERRORS: error: invalid operand for instruction500@ CHECK-ERRORS: msr #0, #0501@ CHECK-ERRORS: ^502@ CHECK-ERRORS: error: invalid operand for instruction503@ CHECK-ERRORS: msr foo, #0504@ CHECK-ERRORS: ^505 506 isb #-1507 isb #16508@ CHECK-ERRORS: error: immediate value out of range509@ CHECK-ERRORS: error: immediate value out of range510 511 nop.n512@ CHECK-ERRORS: error: instruction with .n (narrow) qualifier not allowed in arm mode513 514 dmbeq #5515 dsble #15516 isblo #7517@ CHECK-ERRORS: error: instruction 'dmb' is not predicable, but condition code specified518@ CHECK-ERRORS: error: instruction 'dsb' is not predicable, but condition code specified519@ CHECK-ERRORS: error: instruction 'isb' is not predicable, but condition code specified520 521 dmblt522 dsbne523 isbeq524@ CHECK-ERRORS: error: instruction 'dmb' is not predicable, but condition code specified525@ CHECK-ERRORS: error: instruction 'dsb' is not predicable, but condition code specified526@ CHECK-ERRORS: error: instruction 'isb' is not predicable, but condition code specified527 528 mcr2le p7, #1, r5, c1, c1, #4529 mcrr2ne p7, #15, r5, r4, c1530 mrc2lo p14, #0, r1, c1, c2, #4531 mrrc2lo p7, #1, r5, r4, c1532 cdp2hi p10, #0, c6, c12, c0, #7533@ CHECK-ERRORS: error: instruction 'mcr2' is not predicable, but condition code specified534@ CHECK-ERRORS: error: instruction 'mcrr2' is not predicable, but condition code specified535@ CHECK-ERRORS: error: instruction 'mrc2' is not predicable, but condition code specified536@ CHECK-ERRORS: error: instruction 'mrrc2' is not predicable, but condition code specified537@ CHECK-ERRORS: error: instruction 'cdp2' is not predicable, but condition code specified538 539 bkpteq #7540@ CHECK-ERRORS: error: instruction 'bkpt' is not predicable, but condition code specified541 542 ldm r2!, {r2, r3}543 ldmdb r2!, {r2, r3}544 ldmda r2!, {r2, r3}545 popeq {sp}546@ CHECK-ERRORS: error: writeback register not allowed in register list547@ CHECK-ERRORS: error: writeback register not allowed in register list548@ CHECK-ERRORS: error: writeback register not allowed in register list549@ CHECK-ERRORS: error: writeback register not allowed in register list550 551 vrintz.f32.f32 s0, s1552 vrintr.f32 s0, s1553 vrintx.f64.f64 d2, d5554 vrintz.f64 d10, d9555 vrinta.f32.f32 s6, s7556 vrintn.f32 s8, s9557 vrintp.f64.f64 d10, d11558 vrintm.f64 d12, d13559@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8560@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8561@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8562@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8563@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8564@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8565@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8566@ CHECK-ERRORS-V7: error: instruction requires: FPARMv8567 568 stm sp!, {r0, pc}^569 ldm sp!, {r0}^570@ CHECK-ERRORS: error: system STM cannot have writeback register571@ CHECK-ERRORS: error: writeback register only allowed on system LDM if PC in register-list572 573foo2:574 mov r0, foo2575 movw r0, foo2576 movt r0, foo2577@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16578@ CHECK-ERRORS: ^579@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16580@ CHECK-ERRORS: ^581@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16582@ CHECK-ERRORS: ^583 584 str r0, [r0, #4]!585 str r0, [r0, r1]!586 str r0, [r0], #4587 str r0, [r0], r1588 strh r0, [r0, #2]!589 strh r0, [r0, r1]!590 strh r0, [r0], #2591 strh r0, [r0], r1592 strb r0, [r0, #1]!593 strb r0, [r0, r1]!594 strb r0, [r0], #1595 strb r0, [r0], r1596@ CHECK-ERRORS: error: source register and base register can't be identical597@ CHECK-ERRORS: str r0, [r0, #4]!598@ CHECK-ERRORS: ^599@ CHECK-ERRORS: error: source register and base register can't be identical600@ CHECK-ERRORS: str r0, [r0, r1]!601@ CHECK-ERRORS: ^602@ CHECK-ERRORS: error: source register and base register can't be identical603@ CHECK-ERRORS: str r0, [r0], #4604@ CHECK-ERRORS: ^605@ CHECK-ERRORS: error: source register and base register can't be identical606@ CHECK-ERRORS: str r0, [r0], r1607@ CHECK-ERRORS: ^608@ CHECK-ERRORS: error: source register and base register can't be identical609@ CHECK-ERRORS: strh r0, [r0, #2]!610@ CHECK-ERRORS: ^611@ CHECK-ERRORS: error: source register and base register can't be identical612@ CHECK-ERRORS: strh r0, [r0, r1]!613@ CHECK-ERRORS: ^614@ CHECK-ERRORS: error: source register and base register can't be identical615@ CHECK-ERRORS: strh r0, [r0], #2616@ CHECK-ERRORS: ^617@ CHECK-ERRORS: error: source register and base register can't be identical618@ CHECK-ERRORS: strh r0, [r0], r1619@ CHECK-ERRORS: ^620@ CHECK-ERRORS: error: source register and base register can't be identical621@ CHECK-ERRORS: strb r0, [r0, #1]!622@ CHECK-ERRORS: ^623@ CHECK-ERRORS: error: source register and base register can't be identical624@ CHECK-ERRORS: strb r0, [r0, r1]!625@ CHECK-ERRORS: ^626@ CHECK-ERRORS: error: source register and base register can't be identical627@ CHECK-ERRORS: strb r0, [r0], #1628@ CHECK-ERRORS: ^629@ CHECK-ERRORS: error: source register and base register can't be identical630@ CHECK-ERRORS: strb r0, [r0], r1631@ CHECK-ERRORS: ^632 633 ldr r0, [r0, #4]!634 ldr r0, [r0, r1]!635 ldr r0, [r0], #4636 ldr r0, [r0], r1637 ldrh r0, [r0, #2]!638 ldrh r0, [r0, r1]!639 ldrh r0, [r0], #2640 ldrh r0, [r0], r1641 ldrsh r0, [r0, #2]!642 ldrsh r0, [r0, r1]!643 ldrsh r0, [r0], #2644 ldrsh r0, [r0], r1645 ldrb r0, [r0, #1]!646 ldrb r0, [r0, r1]!647 ldrb r0, [r0], #1648 ldrb r0, [r0], r1649 ldrsb r0, [r0, #1]!650 ldrsb r0, [r0, r1]!651 ldrsb r0, [r0], #1652 ldrsb r0, [r0], r1653@ CHECK-ERRORS: error: destination register and base register can't be identical654@ CHECK-ERRORS: ldr r0, [r0, #4]!655@ CHECK-ERRORS: ^656@ CHECK-ERRORS: error: destination register and base register can't be identical657@ CHECK-ERRORS: ldr r0, [r0, r1]!658@ CHECK-ERRORS: ^659@ CHECK-ERRORS: error: destination register and base register can't be identical660@ CHECK-ERRORS: ldr r0, [r0], #4661@ CHECK-ERRORS: ^662@ CHECK-ERRORS: error: destination register and base register can't be identical663@ CHECK-ERRORS: ldr r0, [r0], r1664@ CHECK-ERRORS: ^665@ CHECK-ERRORS: error: destination register and base register can't be identical666@ CHECK-ERRORS: ldrh r0, [r0, #2]!667@ CHECK-ERRORS: ^668@ CHECK-ERRORS: error: destination register and base register can't be identical669@ CHECK-ERRORS: ldrh r0, [r0, r1]!670@ CHECK-ERRORS: ^671@ CHECK-ERRORS: error: destination register and base register can't be identical672@ CHECK-ERRORS: ldrh r0, [r0], #2673@ CHECK-ERRORS: ^674@ CHECK-ERRORS: error: destination register and base register can't be identical675@ CHECK-ERRORS: ldrh r0, [r0], r1676@ CHECK-ERRORS: ^677@ CHECK-ERRORS: error: destination register and base register can't be identical678@ CHECK-ERRORS: ldrsh r0, [r0, #2]!679@ CHECK-ERRORS: ^680@ CHECK-ERRORS: error: destination register and base register can't be identical681@ CHECK-ERRORS: ldrsh r0, [r0, r1]!682@ CHECK-ERRORS: ^683@ CHECK-ERRORS: error: destination register and base register can't be identical684@ CHECK-ERRORS: ldrsh r0, [r0], #2685@ CHECK-ERRORS: ^686@ CHECK-ERRORS: error: destination register and base register can't be identical687@ CHECK-ERRORS: ldrsh r0, [r0], r1688@ CHECK-ERRORS: ^689@ CHECK-ERRORS: error: destination register and base register can't be identical690@ CHECK-ERRORS: ldrb r0, [r0, #1]!691@ CHECK-ERRORS: ^692@ CHECK-ERRORS: error: destination register and base register can't be identical693@ CHECK-ERRORS: ldrb r0, [r0, r1]!694@ CHECK-ERRORS: ^695@ CHECK-ERRORS: error: destination register and base register can't be identical696@ CHECK-ERRORS: ldrb r0, [r0], #1697@ CHECK-ERRORS: ^698@ CHECK-ERRORS: error: destination register and base register can't be identical699@ CHECK-ERRORS: ldrb r0, [r0], r1700@ CHECK-ERRORS: ^701@ CHECK-ERRORS: error: destination register and base register can't be identical702@ CHECK-ERRORS: ldrsb r0, [r0, #1]!703@ CHECK-ERRORS: ^704@ CHECK-ERRORS: error: destination register and base register can't be identical705@ CHECK-ERRORS: ldrsb r0, [r0, r1]!706@ CHECK-ERRORS: ^707@ CHECK-ERRORS: error: destination register and base register can't be identical708@ CHECK-ERRORS: ldrsb r0, [r0], #1709@ CHECK-ERRORS: ^710@ CHECK-ERRORS: error: destination register and base register can't be identical711@ CHECK-ERRORS: ldrsb r0, [r0], r1712@ CHECK-ERRORS: ^713 714 @ Out of range modified immediate values715 mov r5, #-256, #6716 mov r6, #42, #7717 mvn r5, #256, #6718 mvn r6, #42, #298719 cmp r5, #65535, #6720 cmp r6, #42, #31721 cmn r5, #-1, #6722 cmn r6, #42, #32723 msr APSR_nzcvq, #-128, #2724 msr apsr_nzcvqg, #0, #1725 adc r7, r8, #-256, #2726 adc r7, r8, #128, #1727 sbc r7, r8, #-256, #2728 sbc r7, r8, #128, #1729 add r7, r8, #-2149, #0730 add r7, r8, #100, #1731 sub r7, r8, #-2149, #0732 sub r7, r8, #100, #1733 and r7, r8, #-2149, #0734 and r7, r8, #100, #1735 orr r7, r8, #-2149, #0736 orr r7, r8, #100, #1737 eor r7, r8, #-2149, #0738 eor r7, r8, #100, #1739 bic r7, r8, #-2149, #0740 bic r7, r8, #100, #1741 rsb r7, r8, #-2149, #0742 rsb r7, r8, #100, #1743 adds r7, r8, #-2149, #0744 adds r7, r8, #100, #1745 subs r7, r8, #-2149, #0746 subs r7, r8, #100, #1747 rsbs r7, r8, #-2149, #0748 rsbs r7, r8, #100, #1749 rsc r7, r8, #-2149, #0750 rsc r7, r8, #100, #1751 TST r7, #-2149, #0752 TST r7, #100, #1753 TEQ r7, #-2149, #0754 TEQ r7, #100, #1755@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]756@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]757@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]758@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]759@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]760@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]761@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]762@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]763@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]764@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]765@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]766@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]767@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]768@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]769@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]770@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]771@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]772@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]773@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]774@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]775@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]776@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]777@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]778@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]779@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]780@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]781@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]782@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]783@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]784@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]785@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]786@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]787@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]788@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]789@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]790@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]791@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]792@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]793 794 @ Generic error for too few operands795 adds796 adds r0797@ CHECK-ERRORS: error: too few operands for instruction798@ CHECK-ERRORS: error: too few operands for instruction799 800 @ Using pc for MVN801 mvn pc, r6, lsl r7802@ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this:803@ CHECK-ERRORS: note: operand must be a register in range [r0, r14]804@ CHECK-ERRORS: mvn pc, r6, lsl r7805@ CHECK-ERRORS: ^806