[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 04/19] include/fpu/softfloat: implement float
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v1 04/19] include/fpu/softfloat: implement float16_set_sign helper |
Date: |
Fri, 5 Jan 2018 13:15:03 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 12/18/2017 06:44 PM, Richard Henderson wrote:
> On 12/11/2017 04:56 AM, Alex Bennée wrote:
>> +static inline float16 float16_set_sign(float16 a, int sign)
>> +{
>> + return make_float16((float16_val(a) & 0x7fff) | (sign << 15));
>> +}
>> +
>
> 1) Do we use this anywhere?
>
> 2) While this is probably in line with the other implementations,
> but going to a more qemu-ish style this should use deposit32.
Yes, it is easier to read while reviewing (no mask or shift), so safer.
That's probably why I'm becoming addict of the "hw/registerfields.h"
API... :)
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v1 04/19] include/fpu/softfloat: implement float16_set_sign helper,
Philippe Mathieu-Daudé <=