Skip to content

Commit

Permalink
Merge pull request #1457 from W0ni/arm_handle_cf_shifters
Browse files Browse the repository at this point in the history
[ARM] compute cf for shift/rotate
  • Loading branch information
serpilliere authored Mar 21, 2024
2 parents 2b1273e + 16cc7d3 commit 88432b0
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 79 deletions.
4 changes: 4 additions & 0 deletions miasm/arch/arm/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,12 @@ def decode(self, v):
shift_op = ExprInt(amount, 32)
a = regs_expr[rm]
if shift_op == ExprInt(0, 32):
#rrx
if shift_type == 3:
self.expr = ExprOp(allshifts[4], a)
#asr, lsr
elif shift_type == 1 or shift_type == 2:
self.expr = ExprOp(allshifts[shift_type], a, ExprInt(32, 32))
else:
self.expr = a
else:
Expand Down
Loading

0 comments on commit 88432b0

Please sign in to comment.