diff options
Diffstat (limited to 'miasm2/arch')
| -rw-r--r-- | miasm2/arch/aarch64/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/aarch64/ira.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/aarch64/regs.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/arm/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/arm/ira.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/arm/regs.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/mips32/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/mips32/ira.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/mips32/regs.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/msp430/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/msp430/ira.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/msp430/sem.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/sh4/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/x86/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/x86/ira.py | 1 | ||||
| -rw-r--r-- | miasm2/arch/x86/sem.py | 13 |
16 files changed, 11 insertions, 17 deletions
diff --git a/miasm2/arch/aarch64/arch.py b/miasm2/arch/aarch64/arch.py index b495821b..c875d787 100644 --- a/miasm2/arch/aarch64/arch.py +++ b/miasm2/arch/aarch64/arch.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- import logging diff --git a/miasm2/arch/aarch64/ira.py b/miasm2/arch/aarch64/ira.py index 090ff6d0..3441483c 100644 --- a/miasm2/arch/aarch64/ira.py +++ b/miasm2/arch/aarch64/ira.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/aarch64/regs.py b/miasm2/arch/aarch64/regs.py index 6130d075..95527be3 100644 --- a/miasm2/arch/aarch64/regs.py +++ b/miasm2/arch/aarch64/regs.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py index 04e47585..0e58008d 100644 --- a/miasm2/arch/arm/arch.py +++ b/miasm2/arch/arm/arch.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- import logging diff --git a/miasm2/arch/arm/ira.py b/miasm2/arch/arm/ira.py index 7d8e1838..d888d598 100644 --- a/miasm2/arch/arm/ira.py +++ b/miasm2/arch/arm/ira.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/arm/regs.py b/miasm2/arch/arm/regs.py index 1393c372..a44878a8 100644 --- a/miasm2/arch/arm/regs.py +++ b/miasm2/arch/arm/regs.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/mips32/arch.py b/miasm2/arch/mips32/arch.py index 38ed2811..2ac16770 100644 --- a/miasm2/arch/mips32/arch.py +++ b/miasm2/arch/mips32/arch.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- import logging diff --git a/miasm2/arch/mips32/ira.py b/miasm2/arch/mips32/ira.py index ecbc1a7f..ec63c8c7 100644 --- a/miasm2/arch/mips32/ira.py +++ b/miasm2/arch/mips32/ira.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/mips32/regs.py b/miasm2/arch/mips32/regs.py index b64b40d5..974d3a2b 100644 --- a/miasm2/arch/mips32/regs.py +++ b/miasm2/arch/mips32/regs.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import ExprId diff --git a/miasm2/arch/msp430/arch.py b/miasm2/arch/msp430/arch.py index ce0fe70f..a9f695ec 100644 --- a/miasm2/arch/msp430/arch.py +++ b/miasm2/arch/msp430/arch.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- import logging diff --git a/miasm2/arch/msp430/ira.py b/miasm2/arch/msp430/ira.py index 8e6aecee..bf777775 100644 --- a/miasm2/arch/msp430/ira.py +++ b/miasm2/arch/msp430/ira.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/msp430/sem.py b/miasm2/arch/msp430/sem.py index 92b005ad..4b52361d 100644 --- a/miasm2/arch/msp430/sem.py +++ b/miasm2/arch/msp430/sem.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import * diff --git a/miasm2/arch/sh4/arch.py b/miasm2/arch/sh4/arch.py index 7c76e003..d72e6945 100644 --- a/miasm2/arch/sh4/arch.py +++ b/miasm2/arch/sh4/arch.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from pyparsing import * diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 87e91756..90d0fcef 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- import re diff --git a/miasm2/arch/x86/ira.py b/miasm2/arch/x86/ira.py index 30dc92b0..d772d9fc 100644 --- a/miasm2/arch/x86/ira.py +++ b/miasm2/arch/x86/ira.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- from miasm2.expression.expression import ExprAff, ExprOp, ExprId diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 152208d4..ea5830e3 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -1732,9 +1732,11 @@ def float_pop(avoid_flt=None, popcount=1): if avoid_flt != float_list[i]: e.append(m2_expr.ExprAff(float_list[i], float_list[i + popcount])) + fill_value = m2_expr.ExprOp("int_64_to_double", + m2_expr.ExprInt(0, float_list[i].size)) for i in xrange(8 - popcount, 8): e.append(m2_expr.ExprAff(float_list[i], - m2_expr.ExprInt(0, float_list[i].size))) + fill_value)) e.append( m2_expr.ExprAff(float_stack_ptr, float_stack_ptr - m2_expr.ExprInt(popcount, 3))) @@ -2906,13 +2908,20 @@ def bittest_get(a, b): b_mask = {16: 4, 32: 5, 64: 6} b_decal = {16: 1, 32: 3, 64: 7} ptr = a.arg + segm = a.is_op_segm() + if segm: + ptr = ptr.args[1] + off_bit = b.zeroExtend( a.size) & m2_expr.ExprInt((1 << b_mask[a.size]) - 1, a.size) off_byte = ((b.zeroExtend(ptr.size) >> m2_expr.ExprInt(3, ptr.size)) & m2_expr.ExprInt(((1 << a.size) - 1) ^ b_decal[a.size], ptr.size)) - d = m2_expr.ExprMem(ptr + off_byte, a.size) + addr = ptr + off_byte + if segm: + addr = m2_expr.ExprOp("segm", a.arg.args[0], addr) + d = m2_expr.ExprMem(addr, a.size) else: off_bit = m2_expr.ExprOp('&', b, m2_expr.ExprInt(a.size - 1, a.size)) d = a |