diff options
| author | LIU Zhiwei <zhiwei_liu@c-sky.com> | 2020-08-13 15:14:19 +0800 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2020-08-28 10:48:07 -0700 |
| commit | 8282310d8535cc2a8431c516e907da79f92df6eb (patch) | |
| tree | 770b25f08c3f2ba057fdccb9ce496bf94b1c5d1e /include/fpu/softfloat-types.h | |
| parent | a03e924cf8a22888060fc0de4d91de053cd5cde4 (diff) | |
| download | focaccia-qemu-8282310d8535cc2a8431c516e907da79f92df6eb.tar.gz focaccia-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. */ |