diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-02-15 23:28:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-15 23:28:36 +0100 |
| commit | e933c0c31742ddb9dcfd9b46d93fe2a47553af5e (patch) | |
| tree | a5b6ac1d9f3ecf6378d2ae33661b0433f5736dc6 /miasm2/arch/sh4/arch.py | |
| parent | 092d0bfaac18ffe683a8ef3a1dedc5dba80e7688 (diff) | |
| parent | 2420df074cd2f3bb8b1e343a5bce6b83fffa9d80 (diff) | |
| download | miasm-e933c0c31742ddb9dcfd9b46d93fe2a47553af5e.tar.gz miasm-e933c0c31742ddb9dcfd9b46d93fe2a47553af5e.zip | |
Merge pull request #683 from commial/refactor/remove-default-exprmem-size
Refactor/remove default exprmem size
Diffstat (limited to 'miasm2/arch/sh4/arch.py')
| -rw-r--r-- | miasm2/arch/sh4/arch.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/miasm2/arch/sh4/arch.py b/miasm2/arch/sh4/arch.py index d7ae4f12..ecfc9502 100644 --- a/miasm2/arch/sh4/arch.py +++ b/miasm2/arch/sh4/arch.py @@ -67,25 +67,25 @@ def parse_deref_mem(s, l, t): def parse_predec(s, l, t): t = t[0] - e = ExprMem(ExprOp('predec', t[0])) + e = ExprMem(ExprOp('predec', t[0]), 32) return e def parse_postinc(s, l, t): t = t[0] - e = ExprMem(ExprOp('postinc', t[0])) + e = ExprMem(ExprOp('postinc', t[0]), 32) return e def parse_regdisp(t): t = t[0] - e = ExprMem(t[0] + t[1]) + e = ExprMem(t[0] + t[1], 32) return e def parse_regreg(t): t = t[0] - e = ExprMem(t[0] + t[1]) + e = ExprMem(t[0] + t[1], 32) return e @@ -314,7 +314,7 @@ class sh4_dgbrimm8(sh4_dgpreg): def encode(self): e = self.expr s = self.sz - if e == ExprMem(GBR): + if e == ExprMem(GBR, 32): self.value = 0 return True res = match_expr(self.expr, ExprMem(GBR + jra, s), [jra]) @@ -331,7 +331,7 @@ class sh4_dpc32imm(sh4_dpc16imm): def decode(self, v): self.expr = ExprMem( - (PC & ExprInt(0xfffffffc, 32)) + ExprInt(v * 4 + 4, 32)) + (PC & ExprInt(0xfffffffc, 32)) + ExprInt(v * 4 + 4, 32), 32) return True def calcdisp(self, v): |