diff options
author | Elliott Hughes <enh@google.com> | 2014-04-14 15:33:32 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-04-14 15:33:32 -0700 |
commit | 0f95a553227da1807df4a9bf962434ef79a3e108 (patch) | |
tree | 174e96f02dd3f2586b53bed172f24fb316f4d032 /libc/arch-arm64 | |
parent | 76ba8e86d509594d861687110bbae265904da33b (diff) | |
download | bionic-0f95a553227da1807df4a9bf962434ef79a3e108.zip bionic-0f95a553227da1807df4a9bf962434ef79a3e108.tar.gz bionic-0f95a553227da1807df4a9bf962434ef79a3e108.tar.bz2 |
Fix arm64 floating point definitions.
Change-Id: I6836da8fc9f66465435a21c51cb18851e20e9645
Diffstat (limited to 'libc/arch-arm64')
-rw-r--r-- | libc/arch-arm64/include/machine/ieee.h | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/libc/arch-arm64/include/machine/ieee.h b/libc/arch-arm64/include/machine/ieee.h index cf06580..a6c024e 100644 --- a/libc/arch-arm64/include/machine/ieee.h +++ b/libc/arch-arm64/include/machine/ieee.h @@ -50,44 +50,6 @@ * floating point. */ -/* - * Define the number of bits in each fraction and exponent. - * - * k k+1 - * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented - * - * (-exp_bias+1) - * as fractions that look like 0.fffff x 2 . This means that - * - * -126 - * the number 0.10000 x 2 , for instance, is the same as the normalized - * - * -127 -128 - * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero - * - * -129 - * in the fraction; to represent 2 , we need two, and so on. This - * - * (-exp_bias-fracbits+1) - * implies that the smallest denormalized number is 2 - * - * for whichever format we are talking about: for single precision, for - * - * -126 -149 - * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and - * - * -149 == -127 - 23 + 1. - */ - -/* - * The ARM has two sets of FP data formats. The FPA supports 32-bit, 64-bit - * and 96-bit IEEE formats, with the words in big-endian order. VFP supports - * 32-bin and 64-bit IEEE formats with the words in the CPU's native byte - * order. - * - * The FPA also has two packed decimal formats, but we ignore them here. - */ - #define SNG_EXPBITS 8 #define SNG_FRACBITS 23 @@ -96,65 +58,18 @@ #define DBL_FRACLBITS 32 #define DBL_FRACBITS 52 -#ifndef __VFP_FP__ -#define E80_EXPBITS 15 -#define E80_FRACHBITS 31 -#define E80_FRACLBITS 32 -#define E80_FRACBITS 64 - -#define EXT_EXPBITS 15 -#define EXT_FRACHBITS 16 -#define EXT_FRACHMBITS 32 -#define EXT_FRACLMBITS 32 -#define EXT_FRACLBITS 32 -#define EXT_FRACBITS 112 -#endif - struct ieee_single { u_int sng_frac:23; u_int sng_exp:8; u_int sng_sign:1; }; -#ifdef __VFP_FP__ struct ieee_double { u_int dbl_fracl; u_int dbl_frach:20; u_int dbl_exp:11; u_int dbl_sign:1; }; -#else /* !__VFP_FP__ */ -struct ieee_double { - u_int dbl_frach:20; - u_int dbl_exp:11; - u_int dbl_sign:1; - u_int dbl_fracl; -}; - -union ieee_double_u { - double dblu_d; - struct ieee_double dblu_dbl; -}; - - -struct ieee_e80 { - u_int e80_exp:15; - u_int e80_zero:16; - u_int e80_sign:1; - u_int e80_frach:31; - u_int e80_j:1; - u_int e80_fracl; -}; - -struct ieee_ext { - u_int ext_frach:16; - u_int ext_exp:15; - u_int ext_sign:1; - u_int ext_frachm; - u_int ext_fraclm; - u_int ext_fracl; -}; -#endif /* !__VFP_FP__ */ /* * Floats whose exponent is in [1..INFNAN) (of whatever type) are @@ -167,26 +82,11 @@ struct ieee_ext { */ #define SNG_EXP_INFNAN 255 #define DBL_EXP_INFNAN 2047 -#ifndef __VFP_FP__ -#define E80_EXP_INFNAN 32767 #define EXT_EXP_INFNAN 32767 -#endif /* !__VFP_FP__ */ - -#if 0 -#define SNG_QUIETNAN (1 << 22) -#define DBL_QUIETNAN (1 << 19) -#ifndef __VFP_FP__ -#define E80_QUIETNAN (1 << 15) -#define EXT_QUIETNAN (1 << 15) -#endif /* !__VFP_FP__ */ -#endif /* * Exponent biases. */ #define SNG_EXP_BIAS 127 #define DBL_EXP_BIAS 1023 -#ifndef __VFP_FP__ -#define E80_EXP_BIAS 16383 #define EXT_EXP_BIAS 16383 -#endif /* !__VFP_FP__ */ |