diff options
| -rw-r--r-- | miasm2/arch/x86/sem.py | 1 | ||||
| -rw-r--r-- | miasm2/jitter/csts.py | 2 | ||||
| -rw-r--r-- | miasm2/jitter/jitload.py | 7 |
3 files changed, 5 insertions, 5 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 800a1fa2..802b6283 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -660,7 +660,6 @@ def cli(ir, instr): def sti(ir, instr): e = [m2_expr.ExprAff(exception_flags, m2_expr.ExprInt32(EXCEPT_PRIV_INSN))] - e = [] # XXX TODO HACK return e, [] diff --git a/miasm2/jitter/csts.py b/miasm2/jitter/csts.py index e4b315e1..b71e9463 100644 --- a/miasm2/jitter/csts.py +++ b/miasm2/jitter/csts.py @@ -11,6 +11,8 @@ EXCEPT_INT_XX = (1 << 2) EXCEPT_BREAKPOINT_INTERN = (1 << 10) EXCEPT_ACCESS_VIOL = ((1 << 14) | EXCEPT_DO_NOT_UPDATE_PC) +EXCEPT_DIV_BY_ZERO = ((1 << 16) | EXCEPT_DO_NOT_UPDATE_PC) +EXCEPT_PRIV_INSN = ((1 << 17) | EXCEPT_DO_NOT_UPDATE_PC) # VM Mngr constants PAGE_READ = 1 diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py index a035445b..2335cc3c 100644 --- a/miasm2/jitter/jitload.py +++ b/miasm2/jitter/jitload.py @@ -144,12 +144,11 @@ class CallbackHandlerBitflag(CallbackHandler): Iterator on other results""" res = True - for b in self.callbacks: - - if b & bitflag != 0: + for bitflag_expected in self.callbacks: + if bitflag_expected & bitflag == bitflag_expected: # If the flag matched for res in super(CallbackHandlerBitflag, - self).call_callbacks(b, *args): + self).call_callbacks(bitflag_expected, *args): if res is not True: yield res |