diff options
Diffstat (limited to 'miasm2/arch/mep/sem.py')
| -rw-r--r-- | miasm2/arch/mep/sem.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/miasm2/arch/mep/sem.py b/miasm2/arch/mep/sem.py index e1d4c5fa..e779b970 100644 --- a/miasm2/arch/mep/sem.py +++ b/miasm2/arch/mep/sem.py @@ -912,7 +912,12 @@ def div(rn, rm): # Check if both numbers are positive or negative are_both_neg = sign_rn & sign_rm - are_both_pos = "=="(are_both_neg, sign_mask) + are_both_pos = ExprCond( + are_both_neg - sign_mask, + ExprInt(0, are_both_neg.size), + ExprInt(1, are_both_neg.size) + ) + # Invert both numbers rn_inv = ~rn + i32(1) |