mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Fix undefined shift. Patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1011,7 +1011,7 @@ static DecodeStatus DecodeSOImmOperand(llvm::MCInst &Inst, unsigned Val,
|
|||||||
uint64_t Address, const void *Decoder) {
|
uint64_t Address, const void *Decoder) {
|
||||||
uint32_t imm = Val & 0xFF;
|
uint32_t imm = Val & 0xFF;
|
||||||
uint32_t rot = (Val & 0xF00) >> 7;
|
uint32_t rot = (Val & 0xF00) >> 7;
|
||||||
uint32_t rot_imm = (imm >> rot) | (imm << (32-rot));
|
uint32_t rot_imm = (imm >> rot) | (imm << ((32-rot) & 0x1F));
|
||||||
Inst.addOperand(MCOperand::CreateImm(rot_imm));
|
Inst.addOperand(MCOperand::CreateImm(rot_imm));
|
||||||
return MCDisassembler::Success;
|
return MCDisassembler::Success;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user