diff options
author | LIU Zhiwei | 2020-08-13 09:14:19 +0200 |
---|---|---|
committer | Richard Henderson | 2020-08-28 19:48:07 +0200 |
commit | 8282310d8535cc2a8431c516e907da79f92df6eb (patch) | |
tree | 770b25f08c3f2ba057fdccb9ce496bf94b1c5d1e /include/fpu/softfloat-types.h | |
parent | softfloat: Add float16_is_normal (diff) | |
download | qemu-8282310d8535cc2a8431c516e907da79f92df6eb.tar.gz qemu-8282310d8535cc2a8431c516e907da79f92df6eb.tar.xz qemu-8282310d8535cc2a8431c516e907da79f92df6eb.zip |
softfloat: Define operations for bfloat16
This patch implements operations for bfloat16 except conversion and some misc
operations. We also add FloatFmt and pack/unpack interfaces for bfloat16.
As they are both static fields, we can't make a sperate patch for them.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200813071421.2509-2-zhiwei_liu@c-sky.com>
[rth: Use FloatRelation for comparison operations.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/fpu/softfloat-types.h')
-rw-r--r-- | include/fpu/softfloat-types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index c7ddcab8ca..8a3f20fae9 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -113,6 +113,11 @@ typedef struct { #define make_float128_init(high_, low_) { .high = high_, .low = low_ } /* + * Software neural-network floating-point types. + */ +typedef uint16_t bfloat16; + +/* * Software IEC/IEEE floating-point underflow tininess-detection mode. */ |