qemu-devel
[Top][All Lists]
Advanced

[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: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v10.5 01/20] tcg: Allow multiple word entries into the constant pool
Date: Mon, 22 Jan 2018 11:56:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/22/2018 11:15 AM, Alex Bennée wrote:
>>>  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.

You're probably right that I could just use int16_t etc.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]