[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 04/19] include/fpu/softfloat: implement float16_s
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v1 04/19] include/fpu/softfloat: implement float16_set_sign helper |
Date: |
Mon, 11 Dec 2017 12:56:50 +0000 |
Signed-off-by: Alex Bennée <address@hidden>
---
include/fpu/softfloat.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 32036382c6..17dfe60dbd 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -390,6 +390,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.
*----------------------------------------------------------------------------*/
--
2.15.1
- Re: [Qemu-devel] [PATCH v1 02/19] include/fpu/softfloat: implement float16_abs helper, (continued)
- [Qemu-devel] [PATCH v1 03/19] include/fpu/softfloat: implement float16_chs helper, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 01/19] fpu/softfloat: implement float16_squash_input_denormal, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 05/19] include/fpu/softfloat: add some float16 contants, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 06/19] fpu/softfloat: propagate signalling NaNs in MINMAX, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 04/19] include/fpu/softfloat: implement float16_set_sign helper,
Alex Bennée <=
- [Qemu-devel] [PATCH v1 08/19] fpu/softfloat: move the extract functions to the top of the file, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 07/19] fpu/softfloat: improve comments on ARM NaN propagation, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 09/19] fpu/softfloat: define decompose structures, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 14/19] fpu/softfloat: re-factor round_to_int, Alex Bennée, 2017/12/11