Skip to content

Commit

Permalink
Instruction decoding fix: Alias ORR to MOV when the first source oper…
Browse files Browse the repository at this point in the history
…and is WZR and the 'shift'

and 'imm6' fields are both 0.
  • Loading branch information
ssunny7 committed Nov 6, 2016
1 parent 2e550dc commit 5f9bbfd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion instructionAPI/src/InstructionDecoder-aarch64.C
Expand Up @@ -2544,7 +2544,15 @@ Expression::Ptr InstructionDecoder_aarch64::makeMemRefExPair2(){
else if (hasShift) {
if (IS_INSN_ADDSUB_SHIFT(insn) || IS_INSN_LOGICAL_SHIFT(insn)) //add-sub shifted | logical shifted
{
processShiftFieldShiftedInsn(immLen, immVal);
if(IS_INSN_LOGICAL_SHIFT(insn) && shiftField == 0 && field<5, 9>(insn) == 0x1F && immVal == 0) {
insn_in_progress->getOperation().operationID = aarch64_op_mov_orr_log_shift;
insn_in_progress->getOperation().mnemonic = "mov";
skipRn = true;

insn_in_progress->appendOperand(makeRmExpr(), true, false);
} else {
processShiftFieldShiftedInsn(immLen, immVal);
}
}
else if (IS_INSN_ADDSUB_IMM(insn)) //add-sub (immediate)
{
Expand Down

0 comments on commit 5f9bbfd

Please sign in to comment.