qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] TCG helpers that return f16


From: Peter Maydell
Subject: Re: [Qemu-devel] TCG helpers that return f16
Date: Tue, 22 May 2018 17:31:59 +0100

On 22 May 2018 at 17:27, Richard Henderson <address@hidden> wrote:
> On 05/22/2018 09:19 AM, Peter Maydell wrote:
>> But what we actually have is
>> target/arm/helper.c:float16 HELPER(recpe_f16)(float16 input, void *fpstp)
>> target/arm/helper.c:float16 HELPER(vfp_sltoh)(uint32_t x, uint32_t
>> shift, void *fpst)
>>
>> (and others that you can find by grepping for "float16 HELPER") --
>> the helpers don't return a uint32_t, they return float16.
>> In fact if you try to make them return uint32_t then you get
>> a compile error, because the DEF_HELPER_* macros prototype them
>> as returning float16 when you say the return type is 'f16'.
>
> Grr.  That is definitely not what I thought we were wiring up.
>
> So, do you think it is sufficiently less confusing for developers within
> target/* to have "f16" expand to "float16" as opposed to uint32_t?

I don't think it's a big deal for f16 return to require a uint32_t
return type -- if we get the DEF_HELPER macros to do the
right thing then it'll be a compile error if you get it wrong.
At any rate we should do that first as our bug fix before we
think about anything more clever.

Do we also want f16 inputs to mean uint32_t arguments?

thanks
-- PMM



reply via email to

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