openlibm icon indicating copy to clipboard operation
openlibm copied to clipboard

Sync patches from upstream (BSD)

Open inkydragon opened this issue 9 months ago • 0 comments

  • [ ] #222
  • [x] https://github.com/JuliaMath/openlibm/pull/319#issuecomment-2592194108

Do we want to sync openlibm_fenv_arm.h from FreeBSD too?

Seems there are some bugs:

https://github.com/JuliaMath/openlibm/blob/5a88ede059eab2c651a3c1589aabe85136ea9a48/include/openlibm_fenv_arm.h#L65-L67

/* 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)
#endif

And FreeBSD doesn't use _ENABLE_MASK freebsd/freebsd-src@de1aa3d/lib/msun/arm/fenv.h#L83-L87

#else	/* __ARM_PCS_VFP */

...

#define _FPU_MASK_SHIFT	8

freebsd/freebsd-src@de1aa3d/lib/msun/arm/fenv.h#L113

inkydragon avatar Feb 10 '25 11:02 inkydragon