mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
The asm parser currently selects the wrong encoding for non-conditional Thumb2 branches. However, this exposed a number of situations where the decoder was too permissive in allowing invalid instructions to decode successful. Specify additional fixed bits to close those gaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2603,17 +2603,17 @@ DecodeThumb2BCCInstruction(llvm::MCInst &Inst, unsigned Insn,
|
||||
|
||||
unsigned pred = fieldFromInstruction32(Insn, 22, 4);
|
||||
if (pred == 0xE || pred == 0xF) {
|
||||
unsigned opc = fieldFromInstruction32(Insn, 4, 2);
|
||||
unsigned opc = fieldFromInstruction32(Insn, 4, 28);
|
||||
switch (opc) {
|
||||
default:
|
||||
return Fail;
|
||||
case 0:
|
||||
case 0xf3bf8f4:
|
||||
Inst.setOpcode(ARM::t2DSB);
|
||||
break;
|
||||
case 1:
|
||||
case 0xf3bf8f5:
|
||||
Inst.setOpcode(ARM::t2DMB);
|
||||
break;
|
||||
case 2:
|
||||
case 0xf3bf8f6:
|
||||
Inst.setOpcode(ARM::t2ISB);
|
||||
return Success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user