From: Bradley Smith Date: Mon, 19 Jan 2015 16:37:17 +0000 (+0000) Subject: [ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather... X-Git-Tag: android-x86-7.1-r4~53319 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0041050116fd32571c4956b201fe4d6794eb19b8;p=android-x86%2Fexternal-llvm.git [ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather than unpredictable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226469 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index 51faf692c88..4d5122a7620 100644 --- a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -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; } diff --git a/test/MC/ARM/thumb2-diagnostics.s b/test/MC/ARM/thumb2-diagnostics.s index b2b14bc13d6..8fd161c2cc5 100644 --- a/test/MC/ARM/thumb2-diagnostics.s +++ b/test/MC/ARM/thumb2-diagnostics.s @@ -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