mirror of
https://git.proxmox.com/git/qemu
synced 2025-07-09 15:14:49 +00:00
tcg: Remove redundant pointer from TCGContext
The pointer entry 'temps' always refers to the array entry 'static_temps'. Removing the pointer and renaming 'static_temps' to 'temps' reduces the size of TCGContext (4 or 8 byte) and allows better code generation. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
046dbab95f
commit
d838201111
@ -242,7 +242,6 @@ void tcg_context_init(TCGContext *s)
|
|||||||
int *sorted_args;
|
int *sorted_args;
|
||||||
|
|
||||||
memset(s, 0, sizeof(*s));
|
memset(s, 0, sizeof(*s));
|
||||||
s->temps = s->static_temps;
|
|
||||||
s->nb_globals = 0;
|
s->nb_globals = 0;
|
||||||
|
|
||||||
/* Count total number of arguments and allocate the corresponding
|
/* Count total number of arguments and allocate the corresponding
|
||||||
|
@ -367,7 +367,6 @@ struct TCGContext {
|
|||||||
TCGPool *pool_first, *pool_current, *pool_first_large;
|
TCGPool *pool_first, *pool_current, *pool_first_large;
|
||||||
TCGLabel *labels;
|
TCGLabel *labels;
|
||||||
int nb_labels;
|
int nb_labels;
|
||||||
TCGTemp *temps; /* globals first, temps after */
|
|
||||||
int nb_globals;
|
int nb_globals;
|
||||||
int nb_temps;
|
int nb_temps;
|
||||||
/* index of free temps, -1 if none */
|
/* index of free temps, -1 if none */
|
||||||
@ -393,7 +392,7 @@ struct TCGContext {
|
|||||||
int frame_reg;
|
int frame_reg;
|
||||||
|
|
||||||
uint8_t *code_ptr;
|
uint8_t *code_ptr;
|
||||||
TCGTemp static_temps[TCG_MAX_TEMPS];
|
TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */
|
||||||
|
|
||||||
TCGHelperInfo *helpers;
|
TCGHelperInfo *helpers;
|
||||||
int nb_helpers;
|
int nb_helpers;
|
||||||
|
Loading…
Reference in New Issue
Block a user