From: Owen Anderson Date: Mon, 8 Aug 2011 23:25:22 +0000 (+0000) Subject: Thumb1 BL instructions encoding 22 bits of displacement, not 21. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=648f9a75fdbba228e89389c34a2b3f1ceecd06be;p=oota-llvm.git Thumb1 BL instructions encoding 22 bits of displacement, not 21. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137073 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index b71391d5c1a..8442e06503b 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -94,6 +94,7 @@ def t_cbtarget : Operand { def t_bltarget : Operand { let EncoderMethod = "getThumbBLTargetOpValue"; + let DecoderMethod = "DecodeThumbBLTargetOperand"; } def t_blxtarget : Operand { @@ -168,6 +169,7 @@ def t_addrmode_is1 : Operand, def t_addrmode_sp : Operand, ComplexPattern { let EncoderMethod = "getAddrModeThumbSPOpValue"; + let DecoderMethod = "DecodeThumbAddrModeSP"; let PrintMethod = "printThumbAddrModeSPOperand"; let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm); } @@ -374,7 +376,8 @@ let isCall = 1, "bl${p}\t$func", [(ARMtcall tglobaladdr:$func)]>, Requires<[IsThumb, IsNotDarwin]> { - bits<21> func; + bits<22> func; + let Inst{26} = func{21}; let Inst{25-16} = func{20-11}; let Inst{13} = 1; let Inst{11} = 1;