diff options
| author | serpilliere <devnull@localhost> | 2013-05-18 20:32:11 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2013-05-18 20:32:11 +0200 |
| commit | 9042b692393b41b2c0d4498415610b5ab1e581f7 (patch) | |
| tree | 3ae191669106b18f0c210e0bb09d27c486f729ce /miasm/expression/expression.py | |
| parent | 3dba1885e0e1464cabd73dadf23dec5f69a25d60 (diff) | |
| download | focaccia-miasm-9042b692393b41b2c0d4498415610b5ab1e581f7.tar.gz focaccia-miasm-9042b692393b41b2c0d4498415610b5ab1e581f7.zip | |
expression: accept + with multiples args
Diffstat (limited to 'miasm/expression/expression.py')
| -rw-r--r-- | miasm/expression/expression.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/miasm/expression/expression.py b/miasm/expression/expression.py index 8763ab24..8403414c 100644 --- a/miasm/expression/expression.py +++ b/miasm/expression/expression.py @@ -547,6 +547,11 @@ class ExprOp(Expr): else: print self.op raise ValueError('unknown op!!', str(self.op)) + elif len(self.args)==3 and self.op == "+": + return '((%s + %s + %s) &0x%x)'%(self.args[0].toC(), + self.args[1].toC(), + self.args[2].toC(), + my_size_mask[self.args[0].get_size()]) elif len(self.args)==3: dct_div= {'div8':"div_op", 'div16':"div_op", @@ -562,7 +567,7 @@ class ExprOp(Expr): '>>>c_cf':'rcr_cf_op', } if not self.op in dct_div: - fsdff + raise ValueError('toC type expr is not implemented') return '(%s(%s, %s, %s, %s) &0x%x)'%(dct_div[self.op], self.args[0].get_size(), self.args[0].toC(), |