diff options
Diffstat (limited to 'miasm2/arch/mips32/arch.py')
| -rw-r--r-- | miasm2/arch/mips32/arch.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/miasm2/arch/mips32/arch.py b/miasm2/arch/mips32/arch.py index 2ac16770..79176205 100644 --- a/miasm2/arch/mips32/arch.py +++ b/miasm2/arch/mips32/arch.py @@ -53,18 +53,14 @@ int_or_expr = base_expr def ast_id2expr(t): - if not t in mn_mips32.regs.all_regs_ids_byname: - r = ExprId(asm_label(t)) - else: - r = mn_mips32.regs.all_regs_ids_byname[t] - return r + return mn_mips32.regs.all_regs_ids_byname.get(t, t) def ast_int2expr(a): return ExprInt32(a) -my_var_parser = cpu.parse_ast(ast_id2expr, ast_int2expr) +my_var_parser = cpu.ParseAst(ast_id2expr, ast_int2expr) base_expr.setParseAction(my_var_parser) class additional_info: |