diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-10-21 16:19:09 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-11-04 16:45:46 +0100 |
| commit | 3771288cffdd53c1ff87857374bd13c550b355dc (patch) | |
| tree | b85469ca5e38aeb54e19d24ccb4bea1ecf627b5e /miasm2/arch/mips32/sem.py | |
| parent | 589d4fd9ebd61216155bba9f1988bbd5c3094a2b (diff) | |
| download | miasm-3771288cffdd53c1ff87857374bd13c550b355dc.tar.gz miasm-3771288cffdd53c1ff87857374bd13c550b355dc.zip | |
ExprCompose: add new api
The ExprComposes uses directly its arguments sizes to guess the slices locations. Old api: ExprCompose([(a, 0, 32), (b, 32, 64)]) becomes: ExprCompose(a, b)
Diffstat (limited to 'miasm2/arch/mips32/sem.py')
| -rw-r--r-- | miasm2/arch/mips32/sem.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/miasm2/arch/mips32/sem.py b/miasm2/arch/mips32/sem.py index d03772ca..dea822b4 100644 --- a/miasm2/arch/mips32/sem.py +++ b/miasm2/arch/mips32/sem.py @@ -99,7 +99,7 @@ def bne(arg1, arg2, arg3): def lui(arg1, arg2): """The immediate value @arg2 is shifted left 16 bits and stored in the register @arg1. The lower 16 bits are zeroes.""" - arg1 = ExprCompose([(i16(0), 0, 16), (arg2[:16], 16, 32)]) + arg1 = ExprCompose(i16(0), arg2[:16]) @sbuild.parse def nop(): @@ -251,10 +251,7 @@ def bgtz(arg1, arg2): @sbuild.parse def wsbh(arg1, arg2): - arg1 = ExprCompose([(arg2[8:16], 0, 8), - (arg2[0:8] , 8, 16), - (arg2[24:32], 16, 24), - (arg2[16:24], 24, 32)]) + arg1 = ExprCompose(arg2[8:16], arg2[0:8], arg2[24:32], arg2[16:24]) @sbuild.parse def rotr(arg1, arg2, arg3): |