mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-27 08:26:23 +00:00
Correct decoder for T1 conditional B encoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12e959c8da
commit
c8f2fcc9a3
@ -3463,9 +3463,9 @@ static DecodeStatus DecodeT2SOImm(MCInst &Inst, unsigned Val,
|
||||
static DecodeStatus
|
||||
DecodeThumbBCCTargetOperand(MCInst &Inst, unsigned Val,
|
||||
uint64_t Address, const void *Decoder){
|
||||
if (!tryAddingSymbolicOperand(Address, Address + SignExtend32<8>(Val<<1) + 4,
|
||||
if (!tryAddingSymbolicOperand(Address, Address + SignExtend32<9>(Val<<1) + 4,
|
||||
true, 2, Inst, Decoder))
|
||||
Inst.addOperand(MCOperand::CreateImm(SignExtend32<8>(Val << 1)));
|
||||
Inst.addOperand(MCOperand::CreateImm(SignExtend32<9>(Val << 1)));
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: llvm-mc -triple=thumbv6-apple-darwin -disassemble < %s | FileCheck %s
|
||||
# RUN: llvm-mc -triple=thumbv6-apple-darwin -disassemble -show-encoding < %s | FileCheck %s
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# ADC (register)
|
||||
@ -82,6 +82,15 @@
|
||||
|
||||
0xb1 0x43
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# B
|
||||
#------------------------------------------------------------------------------
|
||||
# CHECK: bls #128 @ encoding: [0x40,0xd9]
|
||||
# CHECK: beq #-256 @ encoding: [0x80,0xd0]
|
||||
|
||||
0x40 0xd9
|
||||
0x80 0xd0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# BKPT
|
||||
#------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user