tcg: Add temp_subindex to TCGTemp
Record the location of a TCGTemp within a larger object. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d56fea79f9
commit
fac87bd2a4
@ -456,6 +456,7 @@ typedef struct TCGTemp {
|
|||||||
unsigned int mem_coherent:1;
|
unsigned int mem_coherent:1;
|
||||||
unsigned int mem_allocated:1;
|
unsigned int mem_allocated:1;
|
||||||
unsigned int temp_allocated:1;
|
unsigned int temp_allocated:1;
|
||||||
|
unsigned int temp_subindex:1;
|
||||||
|
|
||||||
int64_t val;
|
int64_t val;
|
||||||
struct TCGTemp *mem_base;
|
struct TCGTemp *mem_base;
|
||||||
|
@ -928,6 +928,7 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TCGv_ptr base,
|
|||||||
ts2->mem_allocated = 1;
|
ts2->mem_allocated = 1;
|
||||||
ts2->mem_base = base_ts;
|
ts2->mem_base = base_ts;
|
||||||
ts2->mem_offset = offset + (1 - bigendian) * 4;
|
ts2->mem_offset = offset + (1 - bigendian) * 4;
|
||||||
|
ts2->temp_subindex = 1;
|
||||||
pstrcpy(buf, sizeof(buf), name);
|
pstrcpy(buf, sizeof(buf), name);
|
||||||
pstrcat(buf, sizeof(buf), "_1");
|
pstrcat(buf, sizeof(buf), "_1");
|
||||||
ts2->name = strdup(buf);
|
ts2->name = strdup(buf);
|
||||||
@ -974,6 +975,7 @@ TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local)
|
|||||||
ts2->base_type = TCG_TYPE_I64;
|
ts2->base_type = TCG_TYPE_I64;
|
||||||
ts2->type = TCG_TYPE_I32;
|
ts2->type = TCG_TYPE_I32;
|
||||||
ts2->temp_allocated = 1;
|
ts2->temp_allocated = 1;
|
||||||
|
ts2->temp_subindex = 1;
|
||||||
ts2->kind = kind;
|
ts2->kind = kind;
|
||||||
} else {
|
} else {
|
||||||
ts->base_type = type;
|
ts->base_type = type;
|
||||||
@ -1092,6 +1094,7 @@ TCGTemp *tcg_constant_internal(TCGType type, int64_t val)
|
|||||||
ts2->type = TCG_TYPE_I32;
|
ts2->type = TCG_TYPE_I32;
|
||||||
ts2->kind = TEMP_CONST;
|
ts2->kind = TEMP_CONST;
|
||||||
ts2->temp_allocated = 1;
|
ts2->temp_allocated = 1;
|
||||||
|
ts2->temp_subindex = 1;
|
||||||
ts2->val = val >> 32;
|
ts2->val = val >> 32;
|
||||||
} else {
|
} else {
|
||||||
ts->base_type = type;
|
ts->base_type = type;
|
||||||
|
Loading…
Reference in New Issue
Block a user