~robin_jadoul/binja_poke_vm

fb852c836186150677bd2545e0c8059b0d5eb85f — Robin Jadoul 3 years ago 63bfdc4
Make the read intrinsic better
1 files changed, 2 insertions(+), 1 deletions(-)

M __init__.py
M __init__.py => __init__.py +2 -1
@@ 8,6 8,7 @@ from binaryninja.function import (
        IntrinsicInfo,
        IntrinsicInput,
        )
from binaryninja.lowlevelil import ILRegister

import struct



@@ 64,7 65,7 @@ class Instr:
            v = f(8, *args[1:])
            return [il.set_reg(8, f"R{self.args[0][1]}", v)]
        elif self.op == "read":
            return [il.intrinsic(args, "read", [])]
            return [il.intrinsic([ILRegister(Architecture["poke"], Architecture["poke"].get_reg_index(f"R{self.args[0][1]}"))], "read", [])]
        elif self.op == "write":
            return [il.intrinsic([], "write", args)]
        elif self.op == "exit":