def nonzero_handler(span):
yield from generic_handler(span, "SVP64_OPERAND_NONZERO")
- def signed_handler(span):
+ def signed_handler(span, flags="SVP64_OPERAND_SIGNED"):
mask = f"(UINT32_C(1) << (UINT32_C({len(span)}) - 1))"
yield "value = ("
with self:
yield "-"
yield f"{mask}"
yield ");"
- yield "flags = SVP64_OPERAND_SIGNED;"
+ yield f"flags = {flags};"
self.emit("break;")
+ def address_handler(span):
+ yield from signed_handler(span, "(SVP64_OPERAND_ADDRESS | SVP64_OPERAND_SIGNED)")
+
def gpr_handler(span, pair=False):
if not pair:
yield from generic_handler(span, "SVP64_OPERAND_GPR")
insndb.FPROperand: fpr_handler,
insndb.CR3Operand: cr3_handler,
insndb.CR5Operand: cr5_handler,
+ insndb.TargetAddrOperand: address_handler,
insndb.SignedOperand: signed_handler,
insndb.NonZeroOperand: nonzero_handler,
insndb.DynamicOperand: generic_handler,
#define SVP64_OPERAND_CR3 (UINT32_C(1) << UINT32_C(4))
#define SVP64_OPERAND_CR5 (UINT32_C(1) << UINT32_C(5))
#define SVP64_OPERAND_NONZERO (UINT32_C(1) << UINT32_C(6))
+#define SVP64_OPERAND_ADDRESS (UINT32_C(1) << UINT32_C(7))
struct svp64_ctx {
struct svp64_record const *record;