summaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-23 17:33:39 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-23 17:33:39 +0000
commite8996ee012e957cf8456d41ee6a7bbaf1f9b888b (patch)
treee5adc099e59c63196813379f76102faa33d8a39b /tcg/tcg.h
parentd7e4036e317f75884513252acbf7eece54fc2ff5 (diff)
added tcg_temp_free() and improved the handling of constants
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4544 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index b29b54825f..405968b2d3 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -98,6 +98,7 @@ typedef int TCGType;
#define TCG_TYPE_I32 0
#define TCG_TYPE_I64 1
+#define TCG_TYPE_COUNT 2 /* number of different types */
#if TCG_TARGET_REG_BITS == 32
#define TCG_TYPE_PTR TCG_TYPE_I32
@@ -188,6 +189,9 @@ typedef struct TCGTemp {
unsigned int fixed_reg:1;
unsigned int mem_coherent:1;
unsigned int mem_allocated:1;
+ unsigned int temp_allocated:1; /* never used for code gen */
+ /* index of next free temp of same base type, -1 if end */
+ int next_free_temp;
const char *name;
} TCGTemp;
@@ -208,6 +212,8 @@ struct TCGContext {
TCGTemp *temps; /* globals first, temps after */
int nb_globals;
int nb_temps;
+ int first_free_temp[TCG_TYPE_COUNT]; /* index of free temps, -1 if none */
+
/* constant indexes (end of temp array) */
int const_start;
int const_end;
@@ -236,6 +242,7 @@ struct TCGContext {
TCGHelperInfo *helpers;
int nb_helpers;
int allocated_helpers;
+ int helpers_sorted;
#ifdef CONFIG_PROFILER
/* profiling info */
@@ -299,6 +306,7 @@ TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2,
TCGv tcg_global_mem_new(TCGType type, int reg, tcg_target_long offset,
const char *name);
TCGv tcg_temp_new(TCGType type);
+void tcg_temp_free(TCGv arg);
char *tcg_get_arg_str(TCGContext *s, char *buf, int buf_size, TCGv arg);
void tcg_dump_info(FILE *f,
int (*cpu_fprintf)(FILE *f, const char *fmt, ...));
@@ -381,9 +389,6 @@ TCGv tcg_const_i64(int64_t val);
void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type,
int label_index, long addend);
-void tcg_reg_alloc_start(TCGContext *s);
-void tcg_reg_alloc_bb_end(TCGContext *s);
-void tcg_liveness_analysis(TCGContext *s);
const TCGArg *tcg_gen_code_op(TCGContext *s, int opc, const TCGArg *args1,
unsigned int dead_iargs);