diff options
| author | Ajax <commial@gmail.com> | 2018-05-15 10:42:02 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-05-15 10:42:02 +0200 |
| commit | de4295331794e81937a5c4073c37808ec63beaa4 (patch) | |
| tree | a8b2bab4f9e91ab56442ea29d525ce6d5390536c /miasm2/ir/translators/C.py | |
| parent | c450ece842408d2abcfc0f2ec648a4841bf0673b (diff) | |
| download | miasm-de4295331794e81937a5c4073c37808ec63beaa4.tar.gz miasm-de4295331794e81937a5c4073c37808ec63beaa4.zip | |
Op bsr/bsf are replaced by cnttrailzeros / cntleadzeros, defined in 0
Diffstat (limited to '')
| -rw-r--r-- | miasm2/ir/translators/C.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/ir/translators/C.py b/miasm2/ir/translators/C.py index 0e285669..099f1420 100644 --- a/miasm2/ir/translators/C.py +++ b/miasm2/ir/translators/C.py @@ -43,8 +43,8 @@ class TranslatorC(Translator): if expr.op == 'parity': return "parity(%s&0x%x)" % (self.from_expr(expr.args[0]), size2mask(expr.args[0].size)) - elif expr.op in ['bsr', 'bsf']: - return "x86_%s(0x%x, %s)" % (expr.op, + elif expr.op in ['cntleadzeros', 'cnttrailzeros']: + return "%s(0x%x, %s)" % (expr.op, expr.args[0].size, self.from_expr(expr.args[0])) elif expr.op in ['clz']: |