Repository navigation
aarch64/fenv: fix fenv_t - #319
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Tracked by #320 Do we want to sync Seems there are some bugs: openlibm/include/openlibm_fenv_arm.h Lines 65 to 67 in 5a88ede /* We need to be able to map status flag positions to mask flag positions */
#ifndef __ARM_PCS_VFP
#define _FPUSW_SHIFT 16
#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT)
#endifAnd FreeBSD doesn't use #else /* __ARM_PCS_VFP */
...
#define _FPU_MASK_SHIFT 8 |
|
Please merge if ready. |
|
All CI passed. Assume everything works well. |
|
This fails to build on Windows, any ideas? |
error: unknown type name '__uint64_t'; did you mean 'uint64_t'? 39 | typedef __uint64_t fenv_t; JuliaMath/openlibm#319 (comment)
|
it looks like other arches' headers ( |
|
yeah, that seems to have done the trick: https://github.com/msys2/MINGW-packages/blob/356bd84ad0398d2e063448ad7689fa5f04d7a00c/mingw-w64-openlibm/0002-fix-aarch64-build.patch |
AArch64 has two 64bit regs, AArch32 only has one.
The high 32 bits of both registers are reserved, so we only need to save the low 32 bits and pack them into a uint64.
aarch64/fenv.hfrom FreeBSDhttps://github.com/freebsd/freebsd-src/blob/de1aa3dab23c06fec962a14da3e7b4755c5880cf/lib/msun/aarch64/fenv.h
Fix #278