diff options
| author | Camille Mougey <commial@gmail.com> | 2018-08-30 08:04:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-30 08:04:28 +0200 |
| commit | 53faba1609e80ed11edc7e504dffe59a21dc1d44 (patch) | |
| tree | 5c667472f97cb6d8e87396e7b97a673d9b000a66 /miasm2/arch/mep/sem.py | |
| parent | a64951d7213f03b08af7e0717b88ca6006c5060f (diff) | |
| parent | caec47dc1871782ca445ea34229cd2a5ee600a7f (diff) | |
| download | miasm-53faba1609e80ed11edc7e504dffe59a21dc1d44.tar.gz miasm-53faba1609e80ed11edc7e504dffe59a21dc1d44.zip | |
Merge pull request #827 from serpilliere/fix_mips
Fix mips
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) |