@mdis.dispatcher.Hook(DynamicOperand)
@contextlib.contextmanager
def dispatch_operand(self, node, *, path, pathcls):
- def generic_handler(span):
+ def generic_handler(span, flags="UINT32_C(0)"):
yield f"value = ("
with self:
yield from fetch(span)
yield f");"
- yield "flags = UINT32_C(0);"
+ yield f"flags = {flags};"
self.emit("break;")
def signed_handler(span):
yield "flags = SVP64_OPERAND_SIGNED;"
self.emit("break;")
+ def gpr_handler(span):
+ yield from generic_handler(span, "SVP64_OPERAND_GPR")
+
handlers = {
insndb.SignedOperand: signed_handler,
+ insndb.GPROperand: gpr_handler,
}
self.emit(f"case 0x{(path + 1):02x}: /* {', '.join(node.names)} */")
with self:
};
#define SVP64_OPERAND_SIGNED (UINT32_C(1) << UINT32_C(0))
+#define SVP64_OPERAND_GPR (UINT32_C(1) << UINT32_C(1))
struct svp64_ctx {
struct svp64_record const *record;