qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/22] softfloat: Add float to 16bit integer con


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 02/22] softfloat: Add float to 16bit integer conversions.
Date: Tue, 31 Dec 2013 14:22:36 +0000

On 31 December 2013 14:18, Richard Henderson <address@hidden> wrote:
> On 12/31/2013 05:35 AM, Peter Maydell wrote:
>> +    int64_t v;
>> +    int_fast16_t res;
>> +    int old_exc_flags = get_float_exception_flags(status);
>> +
>> +    v = float32_to_int64(a STATUS_VAR);
>
> Any good reason not to use int32 as the intermediate, for the benefit of 
> 32-bit
> hosts?

You mean 'v'? Making v less than 64 bits will give wrong results
for input values which fit in a 64 bit int but not a 32 bit int, won't it?
Or do you mean we should call float32_to_int32() instead?
I think that ought to work...

thanks
-- PMM



reply via email to

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