Skip to content

Commit

Permalink
Handle LI LIS alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Sep 8, 2023
1 parent 98919f3 commit de89c75
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions librz/analysis/arch/ppc/ppc_il_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,18 @@ static RzILOpEffect *add_sub_op(RZ_BORROW csh handle, RZ_BORROW cs_insn *insn, b
// I/M/Z Immediate, Minus one, Zero extend,
// C/E/S Carry (sets it), Extends (adds carry it), Shift immediate

// Handle Add alias
switch (insn->alias_id) {
default:
break;
case PPC_INS_ALIAS_LI: // RT = sI
return SETG(rT, EXTEND(PPC_ARCH_BITS, SN(16, sI)));
break;
case PPC_INS_ALIAS_LIS: // RT = SI << 16
return SETG(rT, EXTEND(PPC_ARCH_BITS, APPEND(SN(16, sI), U16(0))));
break;
}

// EXEC
switch (id) {
default:
Expand Down

0 comments on commit de89c75

Please sign in to comment.