summaryrefslogtreecommitdiff
path: root/src/sys/include/arch/amd64/piir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/include/arch/amd64/piir.h')
-rw-r--r--src/sys/include/arch/amd64/piir.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sys/include/arch/amd64/piir.h b/src/sys/include/arch/amd64/piir.h
index 75236b9..d994339 100644
--- a/src/sys/include/arch/amd64/piir.h
+++ b/src/sys/include/arch/amd64/piir.h
@@ -54,4 +54,25 @@ ssize_t md_piir_decode(
ir_byte_t input
);
+/*
+ * Allocate a register ID for use in the IR
+ *
+ * @work: Current work
+ * @vm: Virtual machine state
+ * @flags: Optional flags
+ *
+ * Returns the allocated register ID on success, otherwise
+ * a less than zero value on failure
+ */
+reg_t md_alloc_reg(struct np_work *work, struct piir_vm *vm, int flags);
+
+/*
+ * Free one or more registers
+ *
+ * @work: Current work
+ * @vm: Virtual machine state
+ * @reg: Register to free
+ */
+void md_free_reg(struct np_work *work, struct piir_vm *vm, reg_t reg);
+
#endif /* !_MACHINE_PIIR_H_ */