self.emit("svp64_disassemble_operand(struct svp64_ctx *ctx, uint32_t insn, size_t id) {")
with self:
self.emit("uint32_t value;")
+ self.emit("uint32_t flags;")
self.emit("")
self.emit(f"switch (ctx->record->operands[id]) {{")
yield node
self.emit("")
with self:
self.emit("ctx->operands[id].value = value;")
+ self.emit("ctx->operands[id].flags = flags;")
self.emit("")
self.emit("return SVP64_SUCCESS;")
self.emit("}")
with self:
yield from fetch(span)
yield f");"
+ yield "flags = UINT32_C(0);"
self.emit("break;")
def signed_handler(span):
yield "-"
yield f"{mask}"
yield ");"
+ yield "flags = SVP64_OPERAND_SIGNED;"
self.emit("break;")
handlers = {
struct svp64_operand {
uint32_t value;
+ uint32_t flags;
};
+#define SVP64_OPERAND_SIGNED (UINT32_C(1) << UINT32_C(0))
+
struct svp64_ctx {
struct svp64_record const *record;
struct svp64_operand operands[8];