Peter Maydell <peter.mayd...@linaro.org> writes: > On 17 January 2018 at 16:14, Richard Henderson > <richard.hender...@linaro.org> wrote: >> This will be required for storing vector constants. >> >> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> >> --- >> tcg/tcg-pool.inc.c | 115 >> +++++++++++++++++++++++++++++++++++++++++++---------- >> 1 file changed, 93 insertions(+), 22 deletions(-) >> >> diff --git a/tcg/tcg-pool.inc.c b/tcg/tcg-pool.inc.c >> index 8a85131405..0f76e7bee3 100644 >> --- a/tcg/tcg-pool.inc.c >> +++ b/tcg/tcg-pool.inc.c >> @@ -22,39 +22,110 @@ >> >> typedef struct TCGLabelPoolData { >> struct TCGLabelPoolData *next; >> - tcg_target_ulong data; >> tcg_insn_unit *label; >> - intptr_t addend; >> - int type; >> + int addend : 32; >> + int rtype : 16; >> + int nlong : 16; >> + tcg_target_ulong data[]; >> } TCGLabelPoolData; >> > > Seems a bit odd to use bitfields for 32 and 16 bit values, but whatever. > (My default reaction to bitfields is "be suspicious" :-))
I'm guessing this is the same reason as the softfloat re-factor. By manually forcing stuff into a bitfield the compiler does a better job of passing multiple structure elements in a single register? It would be nice if the compiler could spot this itself though. > > Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> > > thanks > -- PMM -- Alex Bennée