diff options
Diffstat (limited to 'miasm/arch')
| -rw-r--r-- | miasm/arch/arm_arch.py | 2 | ||||
| -rw-r--r-- | miasm/arch/ia32_arch.py | 12 | ||||
| -rw-r--r-- | miasm/arch/ia32_sem.py | 7 |
3 files changed, 5 insertions, 16 deletions
diff --git a/miasm/arch/arm_arch.py b/miasm/arch/arm_arch.py index 5cffb5d7..46da2c78 100644 --- a/miasm/arch/arm_arch.py +++ b/miasm/arch/arm_arch.py @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -from numpy import uint8, uint16, uint32, uint64, int8, int16, int32, int64 +from miasm.tools.modint import uint1, uint8, uint16, uint32, uint64 import shlex import struct diff --git a/miasm/arch/ia32_arch.py b/miasm/arch/ia32_arch.py index 5509a7c6..8672b447 100644 --- a/miasm/arch/ia32_arch.py +++ b/miasm/arch/ia32_arch.py @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -from numpy import uint8, uint16, uint32, uint64, int8, int16, int32, int64 +from miasm.tools.modint import uint1, uint8, uint16, uint32, uint64 import struct import logging from miasm.core.parse_ad import parse_ad, ad_to_generic @@ -30,22 +30,16 @@ log.addHandler(console_handler) log.setLevel(logging.WARN) -tab_int_size = {int8:8, - uint8:8, - int16:16, +tab_int_size = {uint8:8, uint16:16, - int32:32, uint32:32, - int64:64, uint64:64 } tab_size2int = {x86_afs.u08:uint8, x86_afs.u16:uint16, x86_afs.u32:uint32, - x86_afs.s08:int8, - x86_afs.s16:int16, - x86_afs.s32:int32} + } tab_max_uint = {x86_afs.u08:0xFF, x86_afs.u16:0xFFFF, x86_afs.u32:0xFFFFFFFF, x86_afs.u64:0xFFFFFFFFFFFFFFFFL} diff --git a/miasm/arch/ia32_sem.py b/miasm/arch/ia32_sem.py index d9f8e557..622719d4 100644 --- a/miasm/arch/ia32_sem.py +++ b/miasm/arch/ia32_sem.py @@ -373,11 +373,6 @@ all_registers = [ ] -tab_intsize = {8:int8, - 16:int16, - 32:int32, - 64:int64 - } tab_uintsize ={8:uint8, 16:uint16, 32:uint32, @@ -409,7 +404,7 @@ OF(A-B) = ((A XOR D) AND (A XOR B)) < 0 # XXX TODO make default check against 0 or not 0 (same eq as in C) def get_op_msb(a): - return ExprOp('&', ExprOp('>>', a, ExprInt_from(a, a.get_size()-1)), ExprInt_from(a, 1)) + return a[a.get_size()-1:a.get_size()] def update_flag_zf(a): |