1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

soft-fp: Add __extendhfsf2/__extendhfdf2, __truncsfhf2/__truncdfhf2, __eqhf2/__nehf2

1. Add __extendhfdf2/__extendhfsf2 to return an IEEE half converted to IEEE double/single.
2. Add __truncdfhf2/__extendsfhf2 to truncate IEEE double/single into IEEE half.
3. Add __eqhf2/__nehf2 to return 0 if a == b and a,b are not NAN, otherwise return 1.

These are needed by x86 _Float16:

https://software.intel.com/content/www/us/en/develop/download/intel-avx512-fp16-architecture-specification.html

support in GCC.
This commit is contained in:
liuhongt
2021-07-07 10:07:59 +08:00
committed by H.J. Lu
parent b46cfcef3f
commit 6ec6c77867
6 changed files with 253 additions and 0 deletions

View File

@@ -167,4 +167,6 @@ union _FP_UNION_H
#define _FP_FRAC_HIGH_RAW_H(X) _FP_FRAC_HIGH_1 (X)
#define _FP_FRAC_HIGH_DW_H(X) _FP_FRAC_HIGH_1 (X)
#define FP_CMP_EQ_H(r, X, Y, ex) _FP_CMP_EQ (H, 1, (r), X, Y, (ex))
#endif /* !SOFT_FP_HALF_H */