[ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather...
authorBradley Smith <bradley.smith@arm.com>
Mon, 19 Jan 2015 16:37:17 +0000 (16:37 +0000)
committerBradley Smith <bradley.smith@arm.com>
Mon, 19 Jan 2015 16:37:17 +0000 (16:37 +0000)
llvm-svn: 226469

llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/test/MC/ARM/thumb2-diagnostics.s

index 51faf69..4d5122a 100644 (file)
@@ -4971,7 +4971,7 @@ static DecodeStatus DecodeT2ShifterImmOperand(MCInst &Inst, uint32_t Val,
   DecodeStatus S = MCDisassembler::Success;
 
   // Shift of "asr #32" is not allowed in Thumb2 mode.
-  if (Val == 0x20) S = MCDisassembler::SoftFail;
+  if (Val == 0x20) S = MCDisassembler::Fail;
   Inst.addOperand(MCOperand::CreateImm(Val));
   return S;
 }
index b2b14bc..8fd161c 100644 (file)
@@ -87,4 +87,7 @@ foo2:
 @ CHECK-ERRORS: error: invalid operand for instruction
 @ CHECK-ERRORS: error: invalid operand for instruction
 
-
+ssat r0, #1, r0, asr #32
+usat r0, #1, r0, asr #32
+@ CHECK-ERRORS: error: 'asr #32' shift amount not allowed in Thumb mode
+@ CHECK-ERRORS: error: 'asr #32' shift amount not allowed in Thumb mode