diff options
| author | serpilliere <devnull@localhost> | 2012-07-02 09:34:31 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2012-07-02 09:34:31 +0200 |
| commit | ba2c1c335ba39466f90425d13ed93cf8b868918b (patch) | |
| tree | cbbf673ff423c9116fb1481c5c8cf8263d857ddc | |
| parent | 9447ee34926461b933cd7eb915a8318aa3a777ea (diff) | |
| download | miasm-ba2c1c335ba39466f90425d13ed93cf8b868918b.tar.gz miasm-ba2c1c335ba39466f90425d13ed93cf8b868918b.zip | |
ia32_arch: fix asm instruction w 16 bit prefix
| -rw-r--r-- | miasm/arch/ia32_arch.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/miasm/arch/ia32_arch.py b/miasm/arch/ia32_arch.py index 84ab02cd..3c1906a2 100644 --- a/miasm/arch/ia32_arch.py +++ b/miasm/arch/ia32_arch.py @@ -1384,7 +1384,7 @@ class x86_mn: return [] a = self.arg[0] if is_imm(a) and not x86_afs.symb in a: - dst = (self.offset+self.l+a[x86_afs.imm])&tab_max_uint[self.admode] + dst = (self.offset+self.l+a[x86_afs.imm])&tab_max_uint[self.opmode] out = [dst] else: out = [a] @@ -2286,6 +2286,14 @@ if __name__ == '__main__': test_out = [] log.setLevel(logging.DEBUG) + instr = x86mnemo.dis('67e1fa'.replace(' ', '').decode('hex')) + print instr + print instr.arg + print instr.l + print instr.opmode, instr.admode + fds + + instr = x86mnemo.dis('0fa9'.replace(' ', '').decode('hex'), admode=x86_afs.u16, opmode=x86_afs.u16) |