Thumb2 BFC was insufficiently encoded.

rdar://problem/9292717

llvm-svn: 129619
This commit is contained in:
Johnny Chen 2011-04-15 22:52:15 +00:00
parent 761e1e3512
commit 48592ee5af
3 changed files with 6 additions and 1 deletions

View File

@ -2130,10 +2130,12 @@ def t2BFC : T2BitFI<(outs rGPR:$Rd), (ins rGPR:$src, bf_inv_mask_imm:$imm),
IIC_iUNAsi, "bfc", "\t$Rd, $imm",
[(set rGPR:$Rd, (and rGPR:$src, bf_inv_mask_imm:$imm))]> {
let Inst{31-27} = 0b11110;
let Inst{26} = 0; // should be 0.
let Inst{25} = 1;
let Inst{24-20} = 0b10110;
let Inst{19-16} = 0b1111; // Rn
let Inst{15} = 0;
let Inst{5} = 0; // should be 0.
bits<10> imm;
let msb{4-0} = imm{9-5};

View File

@ -1616,7 +1616,7 @@ static bool DisassembleThumb2Sat(MCInst &MI, unsigned Opcode, uint32_t insn,
// o t2ADDri12, t2SUBri12: Rs Rn imm12
// o t2LEApcrel (ADR): Rs imm12
// o t2BFC (BFC): Rs Ro(TIED_TO) bf_inv_mask_imm
// o t2BFI (BFI) (Currently not defined in LLVM as of Jan-07-2010)
// o t2BFI (BFI): Rs Ro(TIED_TO) Rn bf_inv_mask_imm
// o t2MOVi16: Rs imm16
// o t2MOVTi16: Rs imm16
// o t2SBFX (SBFX): Rs Rn lsb width

View File

@ -12,6 +12,9 @@
# CHECK: bgt.w #-16
0x3f 0xf7 0xf8 0xaf
# CHECK: bfc r0, #10, #10
0x6f 0xf3 0x93 0x20
# CHECK: bfi r2, r10, #0, #1
0x6a 0xf3 0x00 0x02