Fix an incorrect shift when decoding SP-relative stores in Thumb1-mode. Add more tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2011-08-22 17:56:58 +00:00
parent 011af5ca80
commit b113ec55e8
2 changed files with 31 additions and 1 deletions

View File

@ -2322,7 +2322,7 @@ static DecodeStatus DecodeThumbAddrModePC(llvm::MCInst &Inst, unsigned Val,
static DecodeStatus DecodeThumbAddrModeSP(llvm::MCInst &Inst, unsigned Val,
uint64_t Address, const void *Decoder) {
Inst.addOperand(MCOperand::CreateReg(ARM::SP));
Inst.addOperand(MCOperand::CreateImm(Val << 2));
Inst.addOperand(MCOperand::CreateImm(Val));
return Success;
}