Closed barracuda156 closed 2 months ago
You don't need to use openlibm on FreeBSD. FreeBSD's libm is already BE aware. In addition, most of openlibm is derived from FreeBSD's libm.
You don't need to use openlibm on FreeBSD. FreeBSD's libm is already BE aware. In addition, most of openlibm is derived from FreeBSD's libm.
@kargl Thank you. Do you think that implementation of feenableexcept
and fedisableexcept
from openlibm
can be borrowed to be used on Darwin PPC?
fenv.h
on MacOS does not have those, but they are needed for support of IEEE arithmetic in Fortran. (That is how I ended up here, looking for a suitable implementation.)
I've never used Darwin, so don't know. Looking at /usr/src/lib/msun/powerpc/fenv.h on FreeBSD shows the functions are declared as inline function and there is a lot of assembly. I suspect this a case of just grab the file and try it.
Edited: I just looked at openlibm_fenv_powerpc.h. It is identical to FreeBSD's header above.
I can confirm it is working since I'm using it in amigaos4 clib2 that is fully powerpc BE
Presumably #276 addresses this?
Presumably #276 addresses this?
@ViralBShah Allow me until this weekend. I will return to that likely missed __ppc64__
define and also this issue. Need to sort some other stuff first.
Anyone has tried to compile it on e500v1 with SPE?
I can confirm it is working since I'm using it in amigaos4 clib2 that is fully powerpc BE
@afxgroup Somewhat on a side note, could you say in Amiga target supports ieee_arithmetic
in gfortran
and if yes, then how specifically?
Unforunately we don't have a working gfortran and I can't test it
Unforunately we don't have a working gfortran and I can't test it
@afxgroup Oh. What’s wrong with it though? Have you filed a bug report with GCC Bugzilla?
I don't think there is something wrong. I our toolchain is disabled. I could try to compile it. But then what do you need to be tested?
@simonbyrne Is it possible to add support for PowerPC BE, in particular
ppc32
? Primarily interested in macOS PPC, but also considering FreeBSD.UPD. It seems that BE should be supported, despite not being mentioned in README (the code below has both little- and big-endian cases): https://github.com/JuliaMath/openlibm/blob/1d2c5e3bf52e050c994510ede91e0d2f0717173a/include/openlibm_fenv_powerpc.h#L100