]> granicus.if.org Git - llvm/commitdiff
[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226469 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 51faf692c88fc1ebbc67cb24be6249b36d12b268..4d5122a7620f92a763ff93fc184fb534fdceec6c 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 b2b14bc13d6a6f02498b53793740c6ac16e14d2f..8fd161c2cc5396fb8c3e6b0cd346185653ad51b3 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