mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 11:46:58 +00:00
include/fpu/softfloat: implement float16_chs helper
Backports commit 5f10aef521427b3909c24a0c7a82839b43f876e2 from qemu
This commit is contained in:
parent
facbc9ef66
commit
380699fa35
|
@ -260,6 +260,14 @@ static inline float16 float16_abs(float16 a)
|
|||
return make_float16(float16_val(a) & 0x7fff);
|
||||
}
|
||||
|
||||
static inline float16 float16_chs(float16 a)
|
||||
{
|
||||
/* Note that chs does *not* handle NaN specially, nor does
|
||||
* it flush denormal inputs to zero.
|
||||
*/
|
||||
return make_float16(float16_val(a) ^ 0x8000);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The pattern for a default generated half-precision NaN.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue