mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 05:25:11 +00:00
include/fpu/softfloat: implement float16_set_sign helper
Backports commit 78b5a3e653c90b56ba650f54c07fc18f7b7bd905 from qemu
This commit is contained in:
parent
380699fa35
commit
d14a090e65
|
@ -268,6 +268,11 @@ static inline float16 float16_chs(float16 a)
|
|||
return make_float16(float16_val(a) ^ 0x8000);
|
||||
}
|
||||
|
||||
static inline float16 float16_set_sign(float16 a, int sign)
|
||||
{
|
||||
return make_float16((float16_val(a) & 0x7fff) | (sign << 15));
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The pattern for a default generated half-precision NaN.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue