File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 36
36
* Hopefully the system ID byte is immutable, so it's valid to use
37
37
* this as a default environment.
38
38
*/
39
- const fenv_t __fe_dfl_env = 0 ;
39
+ const fenv_t __fe_dfl_env = {
40
+ .__fpcr = 0x0 ,
41
+ .__fpsr = 0x0
42
+ };
40
43
41
44
extern inline int feclearexcept (int __excepts );
42
45
extern inline int fegetexceptflag (fexcept_t * __flagp , int __excepts );
Original file line number Diff line number Diff line change 37
37
#define __fenv_static static
38
38
#endif
39
39
40
- typedef uint32_t fenv_t ;
40
+ /* Test Arm Procedure Call Standard */
41
+ #ifdef __ARM_PCS_AAPCS64
42
+ /* AArch64 */
43
+ typedef struct {
44
+ /** FPCR, Floating-point Control Register
45
+ * FPCR is a 64-bit register, but Bits [63:27] is reserved, so we only need 32 bits.
46
+ * https://developer.arm.com/documentation/ddi0601/2024-12/AArch64-Registers/FPCR--Floating-point-Control-Register?lang=en
47
+ */
48
+ uint32_t __fpcr ;
49
+ /** FPSR, Floating-point Status Register
50
+ * FPSR is a 64-bit register, but Bits [63:32] is reserved, so we only need 32 bits.
51
+ * https://developer.arm.com/documentation/ddi0601/2024-12/AArch64-Registers/FPSR--Floating-point-Status-Register?lang=en
52
+ */
53
+ uint32_t __fpsr ;
54
+ } fenv_t ;
55
+ #else /* AArch32 */
56
+ /** FPSCR, Floating-Point Status and Control Register
57
+ * FPSCR is a 32-bit register.
58
+ * https://developer.arm.com/documentation/ddi0601/2024-12/AArch32-Registers/FPSCR--Floating-Point-Status-and-Control-Register?lang=en
59
+ */
60
+ typedef uint32_t fenv_t ;
61
+ #endif /* __ARM_PCS_AAPCS64 */
41
62
typedef uint32_t fexcept_t ;
42
63
43
64
/* Exception flags */
You can’t perform that action at this time.
0 commit comments