summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2008-03-10 16:28:54 -0700
committerIan Romanick <idr@us.ibm.com>2008-03-10 17:00:44 -0700
commitb1525662b330ca8b4cdd930775f3642bfec3b58f (patch)
treeb08b137e47e33fc3888711ff52c56acc2490a60c /src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
parent297b3be25a7f097fb9b1a79e332acddc12dcc3fe (diff)
Move SPE register allocator to rtasm code
Move the register allocator to a common location. There is more code on the way that will make use of this interface.
Diffstat (limited to 'src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h')
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h b/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
index 10ce44b3a0..5a1eb1ed8d 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
+++ b/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
@@ -39,11 +39,27 @@ struct spe_function {
uint32_t *store;
uint32_t *csr;
const char *fn;
+
+ /**
+ * Mask of used / unused registers
+ *
+ * Each set bit corresponds to an available register. Each cleared bit
+ * corresponds to an allocated register.
+ *
+ * \sa
+ * spe_allocate_register, spe_allocate_available_register,
+ * spe_release_register
+ */
+ uint64_t regs[2];
};
extern void spe_init_func(struct spe_function *p, unsigned code_size);
extern void spe_release_func(struct spe_function *p);
+extern int spe_allocate_available_register(struct spe_function *p);
+extern int spe_allocate_register(struct spe_function *p, int reg);
+extern void spe_release_register(struct spe_function *p, int reg);
+
#endif /* RTASM_PPC_SPE_H */
#ifndef EMIT_