Index: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td =================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td @@ -460,13 +460,13 @@ class ImmAsmOperand : AsmOperandClass { let RenderMethod = "addImmOperands"; let PredicateMethod = "isImmediate<" # Low # "," # High # ">"; - let DiagnosticString = "immediate operand must be in the range [" # Low # "," # High # "]"; + let DiagnosticString = "operand must be an immediate in the range [" # Low # "," # High # "]"; } class ImmAsmOperandMinusOne : AsmOperandClass { let PredicateMethod = "isImmediate<" # Low # "," # High # ">"; let DiagnosticType = "ImmRange" # Low # "_" # High; - let DiagnosticString = "immediate operand must be in the range [" # Low # "," # High # "]"; + let DiagnosticString = "operand must be an immediate in the range [" # Low # "," # High # "]"; } // Operands that are part of a memory addressing mode. @@ -837,7 +837,7 @@ /// imm24b - True if the 32-bit immediate is encodable in 24 bits. def Imm24bitAsmOperand: ImmAsmOperand<0,0xffffff> { let Name = "Imm24bit"; - let DiagnosticString = "immediate operand must be in the range [0,0xffffff]"; + let DiagnosticString = "operand must be an immediate in the range [0,0xffffff]"; } def imm24b : Operand, ImmLeaf= 0 && Imm <= 0xffffff; Index: llvm/trunk/test/MC/ARM/basic-arm-instructions-v8.1a.s =================================================================== --- llvm/trunk/test/MC/ARM/basic-arm-instructions-v8.1a.s +++ llvm/trunk/test/MC/ARM/basic-arm-instructions-v8.1a.s @@ -196,10 +196,10 @@ //CHECK-ERROR: error: too few operands for instruction //CHECK-ERROR: setpan //CHECK-ERROR: ^ -//CHECK-ERROR: error: immediate operand must be in the range [0,1] +//CHECK-ERROR: error: operand must be an immediate in the range [0,1] //CHECK-ERROR: setpan #-1 //CHECK-ERROR: ^ -//CHECK-ERROR: error: immediate operand must be in the range [0,1] +//CHECK-ERROR: error: operand must be an immediate in the range [0,1] //CHECK-ERROR: setpan #2 //CHECK-ERROR: ^ Index: llvm/trunk/test/MC/ARM/diagnostics.s =================================================================== --- llvm/trunk/test/MC/ARM/diagnostics.s +++ llvm/trunk/test/MC/ARM/diagnostics.s @@ -94,7 +94,7 @@ bkpt #65536 @ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this: -@ CHECK-ERRORS: note: immediate operand must be in the range [0,65535] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,65535] @ CHECK-ERRORS: note: too many operands for instruction @ CHECK-ERRORS: bkpt #65536 @ CHECK-ERRORS: ^ @@ -103,11 +103,11 @@ hlt #65536 hlt #-1 @CHECK-ERRORS-V7: error: invalid instruction -@CHECK-ERRORS-V8: error: immediate operand must be in the range [0,65535] +@CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,65535] @CHECK-ERRORS: hlt #65536 @CHECK-ERRORS: ^ @CHECK-ERRORS-V7: error: invalid instruction -@CHECK-ERRORS-V8: error: immediate operand must be in the range [0,65535] +@CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,65535] @CHECK-ERRORS: hlt #-1 @CHECK-ERRORS: ^ @@ -129,10 +129,10 @@ cdp2 p7, #2, c1, c1, c1, #8 cdp2 p7, #1, c1, c1, c1, #8 -@ CHECK-ERRORS-V7: error: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: error: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: error: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: error: immediate operand must be in the range [0,7] +@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,7] @ CHECK-ERRORS-V8: error: invalid instruction @ CHECK-ERRORS-V8: error: invalid instruction @ CHECK-ERRORS-V8: error: invalid instruction @@ -142,10 +142,10 @@ dbg #-1 dbg #16 -@ CHECK-ERRORS-V7: error: immediate operand must be in the range [0,15] -@ CHECK-ERRORS-V7: error: immediate operand must be in the range [0,15] -@ CHECK-ERRORS-V8: error: immediate operand must be in the range [0,15] -@ CHECK-ERRORS-V8: error: immediate operand must be in the range [0,15] +@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,15] +@ CHECK-ERRORS-V7: error: operand must be an immediate in the range [0,15] +@ CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,15] +@ CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,15] @ Double-check that we're synced up with the right diagnostics. @ CHECK-ERRORS: dbg #16 @ CHECK-ERRORS: ^ @@ -157,14 +157,14 @@ mcr2 p7, #1, r5, c1, c1, #8 mcrr p7, #16, r5, r4, c1 mcrr2 p7, #16, r5, r4, c1 -@ CHECK-ERRORS: immediate operand must be in the range [0,7] -@ CHECK-ERRORS: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,7] +@ CHECK-ERRORS: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7] @ CHECK-ERRORS-V8: invalid instruction @ CHECK-ERRORS-V8: too many operands for instruction -@ CHECK-ERRORS: immediate operand must be in the range [0,15] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: operand must be an immediate in the range [0,15] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,15] @ CHECK-ERRORS-V8: invalid instruction @ p10 and p11 are reserved for NEON @@ -198,14 +198,14 @@ mrc2 p14, #0, r1, c1, c2, #9 mrrc p7, #16, r5, r4, c1 mrrc2 p7, #17, r5, r4, c1 -@ CHECK-ERRORS: immediate operand must be in the range [0,7] -@ CHECK-ERRORS: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,7] +@ CHECK-ERRORS: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7] @ CHECK-ERRORS-V8: invalid instruction -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,7] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7] @ CHECK-ERRORS-V8: too many operands for instruction -@ CHECK-ERRORS: immediate operand must be in the range [0,15] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: operand must be an immediate in the range [0,15] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,15] @ CHECK-ERRORS-V8: invalid instruction @ Shifter operand validation for PKH instructions. @@ -263,10 +263,10 @@ ssat r8, #1, r10, lsl fred ssat r8, #1, r10, lsl #fred -@ CHECK-ERRORS: error: immediate operand must be in the range [1,32] +@ CHECK-ERRORS: error: operand must be an immediate in the range [1,32] @ CHECK-ERRORS: ssat r8, #0, r10, lsl #8 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: error: immediate operand must be in the range [1,32] +@ CHECK-ERRORS: error: operand must be an immediate in the range [1,32] @ CHECK-ERRORS: ssat r8, #33, r10, lsl #8 @ CHECK-ERRORS: ^ @ CHECK-ERRORS: error: 'lsr' shift amount must be in range [0,31] @@ -295,10 +295,10 @@ ssat16 r2, #0, r7 ssat16 r3, #17, r5 -@ CHECK-ERRORS: error: immediate operand must be in the range [1,16] +@ CHECK-ERRORS: error: operand must be an immediate in the range [1,16] @ CHECK-ERRORS: ssat16 r2, #0, r7 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: error: immediate operand must be in the range [1,16] +@ CHECK-ERRORS: error: operand must be an immediate in the range [1,16] @ CHECK-ERRORS: ssat16 r3, #17, r5 @ CHECK-ERRORS: ^ @@ -313,7 +313,7 @@ @ Out of range immediate on SVC svc #0x1000000 -@ CHECK-ERRORS: error: immediate operand must be in the range [0,0xffffff] +@ CHECK-ERRORS: error: operand must be an immediate in the range [0,0xffffff] @ CHECK-ERRORS: svc #0x1000000 @ CHECK-ERRORS: ^ Index: llvm/trunk/test/MC/ARM/invalid-hint-arm.s =================================================================== --- llvm/trunk/test/MC/ARM/invalid-hint-arm.s +++ llvm/trunk/test/MC/ARM/invalid-hint-arm.s @@ -3,6 +3,6 @@ hint #240 hint #1000 -@ CHECK: error: immediate operand must be in the range [0,239] -@ CHECK: error: immediate operand must be in the range [0,239] +@ CHECK: error: operand must be an immediate in the range [0,239] +@ CHECK: error: operand must be an immediate in the range [0,239] Index: llvm/trunk/test/MC/ARM/invalid-hint-thumb.s =================================================================== --- llvm/trunk/test/MC/ARM/invalid-hint-thumb.s +++ llvm/trunk/test/MC/ARM/invalid-hint-thumb.s @@ -6,10 +6,10 @@ @ FIXME: set the subclasses of the operand classes so that we only get one error for each. @ CHECK: error: invalid instruction, any one of the following would fix this: -@ CHECK: note: immediate operand must be in the range [0,239] -@ CHECK: note: immediate operand must be in the range [0,15] +@ CHECK: note: operand must be an immediate in the range [0,239] +@ CHECK: note: operand must be an immediate in the range [0,15] @ CHECK: error: invalid instruction, any one of the following would fix this: -@ CHECK: note: immediate operand must be in the range [0,239] -@ CHECK: note: immediate operand must be in the range [0,15] +@ CHECK: note: operand must be an immediate in the range [0,239] +@ CHECK: note: operand must be an immediate in the range [0,15] Index: llvm/trunk/test/MC/ARM/lsl-zero-errors.s =================================================================== --- llvm/trunk/test/MC/ARM/lsl-zero-errors.s +++ llvm/trunk/test/MC/ARM/lsl-zero-errors.s @@ -61,7 +61,7 @@ // CHECK-NONARM-NEXT: mov r0, pc, lsl #0 // CHECK-NONARM: invalid operand for instruction // CHECK-NONARM: invalid operand for instruction -// CHECK-NONARM: immediate operand must be in the range [256,65535] +// CHECK-NONARM: operand must be an immediate in the range [256,65535] // CHECK-NONARM: error: invalid instruction, any one of the following would fix this: // CHECK-NONARM-NEXT: mov pc, pc, lsl #0 // CHECK-NONARM: invalid operand for instruction Index: llvm/trunk/test/MC/ARM/negative-immediates-thumb1-fail.s =================================================================== --- llvm/trunk/test/MC/ARM/negative-immediates-thumb1-fail.s +++ llvm/trunk/test/MC/ARM/negative-immediates-thumb1-fail.s @@ -6,22 +6,22 @@ # CHECK: error: invalid instruction, any one of the following would fix this: # CHECK-DAG: note: instruction requires: thumb2 # CHECK-DAG: note: invalid operand for instruction -# CHECK-DAG: note: immediate operand must be in the range [0,7] +# CHECK-DAG: note: operand must be an immediate in the range [0,7] ADDs r0, #0xFFFFFEFF # CHECK: error: invalid instruction, any one of the following would fix this: # CHECK-DAG: note: invalid operand for instruction -# CHECK-DAG: note: immediate operand must be in the range [0,255] +# CHECK-DAG: note: operand must be an immediate in the range [0,255] SUBs r1, r0, #0xFFFFFFF5 # CHECK: error: invalid instruction, any one of the following would fix this: # CHECK-DAG: note: invalid operand for instruction -# CHECK-DAG: note: immediate operand must be in the range [0,7] +# CHECK-DAG: note: operand must be an immediate in the range [0,7] SUBs r0, #0xFFFFFEFF # CHECK: error: invalid instruction, any one of the following would fix this: # CHECK-DAG: note: invalid operand for instruction -# CHECK-DAG: note: immediate operand must be in the range [0,255] +# CHECK-DAG: note: operand must be an immediate in the range [0,255] ORRs r0, r1, #0xFFFFFF00 # CHECK: error: invalid instruction, any one of the following would fix this: Index: llvm/trunk/test/MC/ARM/t2-modified-immediate-fixup-error2.s =================================================================== --- llvm/trunk/test/MC/ARM/t2-modified-immediate-fixup-error2.s +++ llvm/trunk/test/MC/ARM/t2-modified-immediate-fixup-error2.s @@ -9,10 +9,10 @@ @ CHECK: error: invalid instruction, any one of the following would fix this: @ CHECK: note: instruction requires: arm-mode @ CHECK: note: invalid operand for instruction -@ CHECK: note: immediate operand must be in the range [256,65535] +@ CHECK: note: operand must be an immediate in the range [256,65535] mov r0, :lower16: sym0 @ CHECK: error: invalid instruction, any one of the following would fix this: @ CHECK: note: instruction requires: arm-mode @ CHECK: note: invalid operand for instruction -@ CHECK: note: immediate operand must be in the range [256,65535] +@ CHECK: note: operand must be an immediate in the range [256,65535] .equ sym0, 0x01abcdef Index: llvm/trunk/test/MC/ARM/thumb-diagnostics.s =================================================================== --- llvm/trunk/test/MC/ARM/thumb-diagnostics.s +++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s @@ -17,7 +17,7 @@ @ CHECK-ERRORS: note: instruction requires: arm-mode @ CHECK-ERRORS: note: instruction requires: thumb2 @ CHECK-ERRORS: note: invalid operand for instruction -@ CHECK-ERRORS: note: immediate operand must be in the range [0,7] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,7] @ CHECK-ERRORS: note: no flag-preserving variant of this instruction available @ Instructions which require v6+ for both registers to be low regs. @@ -38,7 +38,7 @@ @ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this: @ CHECK-ERRORS: asrs r2, r3, #33 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: note: immediate operand must be in the range [1,32] +@ CHECK-ERRORS: note: operand must be an immediate in the range [1,32] @ CHECK-ERRORS: note: too many operands for instruction @ Out of range immediates for BKPT instruction. @@ -48,13 +48,13 @@ @ CHECK-ERRORS: bkpt #256 @ CHECK-ERRORS: ^ @ CHECK-ERRORS: note: instruction requires: arm-mode -@ CHECK-ERRORS: note: immediate operand must be in the range [0,255] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,255] @ CHECK-ERRORS: note: too many operands for instruction @ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this: @ CHECK-ERRORS: bkpt #-1 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: note: immediate operand must be in the range [0,255] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,255] @ CHECK-ERRORS: note: too many operands for instruction @ Out of range immediates for v8 HLT instruction. @@ -67,11 +67,11 @@ @CHECK-ERRORS-V8: hlt #64 @CHECK-ERRORS-V8: ^ @CHECK-ERRORS-V8: note: instruction requires: arm-mode -@CHECK-ERRORS-V8: immediate operand must be in the range [0,63] +@CHECK-ERRORS-V8: operand must be an immediate in the range [0,63] @CHECK-ERRORS: error: invalid instruction @CHECK-ERRORS: hlt #-1 @CHECK-ERRORS: ^ -@CHECK-ERRORS-V8: error: immediate operand must be in the range [0,63] +@CHECK-ERRORS-V8: error: operand must be an immediate in the range [0,63] @CHECK-ERRORS-V8: hlt #-1 @CHECK-ERRORS-V8: ^ @@ -178,12 +178,12 @@ @ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this: @ CHECK-ERRORS: lsls r4, r5, #-1 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: note: immediate operand must be in the range [0,31] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,31] @ CHECK-ERRORS: note: too many operands for instruction @ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this: @ CHECK-ERRORS: lsls r4, r5, #32 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: note: immediate operand must be in the range [0,31] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,31] @ CHECK-ERRORS: note: too many operands for instruction @ Mismatched source/destination operands for MUL instruction. @@ -219,14 +219,14 @@ @ Out of range immediate for SVC instruction. svc #-1 svc #256 -@ CHECK-ERRORS: error: immediate operand must be in the range [0,255] +@ CHECK-ERRORS: error: operand must be an immediate in the range [0,255] @ CHECK-ERRORS: svc #-1 @ CHECK-ERRORS: ^ @ CHECK-ERRORS: error: invalid instruction, any one of the following would fix this: @ CHECK-ERRORS: svc #256 @ CHECK-ERRORS: ^ @ CHECK-ERRORS: note: instruction requires: arm-mode -@ CHECK-ERRORS: note: immediate operand must be in the range [0,255] +@ CHECK-ERRORS: note: operand must be an immediate in the range [0,255] @ Out of range immediate for ADD SP instructions Index: llvm/trunk/test/MC/ARM/thumb2-diagnostics.s =================================================================== --- llvm/trunk/test/MC/ARM/thumb2-diagnostics.s +++ llvm/trunk/test/MC/ARM/thumb2-diagnostics.s @@ -39,14 +39,14 @@ mrc2 p14, #0, r1, c1, c2, #9 mrrc p7, #16, r5, r4, c1 mrrc2 p7, #17, r5, r4, c1 -@ CHECK-ERRORS: immediate operand must be in the range [0,7] -@ CHECK-ERRORS: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,7] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,7] +@ CHECK-ERRORS: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,7] @ CHECK-ERRORS-V8: invalid instruction @ CHECK-ERRORS-V8: too many operands for instruction -@ CHECK-ERRORS: immediate operand must be in the range [0,15] -@ CHECK-ERRORS-V7: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: operand must be an immediate in the range [0,15] +@ CHECK-ERRORS-V7: operand must be an immediate in the range [0,15] @ CHECK-ERRORS-V8: invalid instruction isb #-1 Index: llvm/trunk/test/MC/ARM/udf-arm-diagnostics.s =================================================================== --- llvm/trunk/test/MC/ARM/udf-arm-diagnostics.s +++ llvm/trunk/test/MC/ARM/udf-arm-diagnostics.s @@ -13,7 +13,7 @@ udf #65536 -@ CHECK: error: immediate operand must be in the range [0,65535] +@ CHECK: error: operand must be an immediate in the range [0,65535] @ CHECK: udf #65536 @ CHECK: ^ Index: llvm/trunk/test/MC/ARM/udf-thumb-2-diagnostics.s =================================================================== --- llvm/trunk/test/MC/ARM/udf-thumb-2-diagnostics.s +++ llvm/trunk/test/MC/ARM/udf-thumb-2-diagnostics.s @@ -15,13 +15,13 @@ @ CHECK: error: invalid instruction, any one of the following would fix this: @ CHECK: note: instruction requires: arm-mode -@ CHECK: note: immediate operand must be in the range [0,255] +@ CHECK: note: operand must be an immediate in the range [0,255] @ CHECK: udf #256 @ CHECK: ^ udf.w #65536 -@ CHECK: error: immediate operand must be in the range [0,65535] +@ CHECK: error: operand must be an immediate in the range [0,65535] @ CHECK: udf.w #65536 @ CHECK: ^ Index: llvm/trunk/test/MC/ARM/udf-thumb-diagnostics.s =================================================================== --- llvm/trunk/test/MC/ARM/udf-thumb-diagnostics.s +++ llvm/trunk/test/MC/ARM/udf-thumb-diagnostics.s @@ -13,7 +13,7 @@ udf #256 -@ CHECK: error: immediate operand must be in the range [0,255] +@ CHECK: error: operand must be an immediate in the range [0,255] @ CHECK: udf #256 @ CHECK: ^