[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10.5 01/20] tcg: Allow multiple word entries in
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v10.5 01/20] tcg: Allow multiple word entries into the constant pool |
Date: |
Mon, 22 Jan 2018 19:15:00 +0000 |
User-agent: |
mu4e 1.0-alpha3; emacs 26.0.91 |
Peter Maydell <address@hidden> writes:
> On 17 January 2018 at 16:14, Richard Henderson
> <address@hidden> wrote:
>> This will be required for storing vector constants.
>>
>> Signed-off-by: Richard Henderson <address@hidden>
>> ---
>> 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 <address@hidden>
>
> thanks
> -- PMM
--
Alex Bennée
- [Qemu-devel] [PATCH v10.5 00/20] tcg: generic vector operations, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 03/20] tcg: Standardize integral arguments to expanders, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 02/20] tcg: Add types and basic operations for host vectors, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 06/20] tcg: Add generic vector ops for comparisons, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 07/20] tcg: Add generic vector ops for multiplication, Richard Henderson, 2018/01/17
- [Qemu-devel] [PATCH v10.5 05/20] tcg: Add generic vector ops for constant shifts, Richard Henderson, 2018/01/17