Support for ieee_arithmetic in gcc12-gfortran for Darwin PPC? #40
Replies: 21 comments 45 replies
-
I changed source like this:
And got a different error:
|
Beta Was this translation helpful? Give feedback.
-
FreeBSD added the following for all powerpc* and aarch64 for
|
Beta Was this translation helpful? Give feedback.
-
The IEEE support in libgfortran is determined by
powerpc-apple is not on that list, and it will not be added, since that architecture has been unsupported since October 2014. If you want to do it, add your configuration to configure.host, create a config/fpu-ppc.h file with the right functions defined. You need to be able to add function calls or assembly (more likely assembly) to:
|
Beta Was this translation helpful? Give feedback.
-
it looks like there are already builtins to support manipulation the fp status, to it's a question of doing something similar to aarch64/x86 (still not time here - I just happened to look at the builtins in passing).
|
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert I checked symbols in
|
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert This at least builds: How should I test it to see if it works correctly – or if not, to find out what should be fixed? |
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert Could you take a look now?
|
Beta Was this translation helpful? Give feedback.
-
Parts of the log for IEEE:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Feedback about your patch:
About the test results: there are enough failures that probably some fundamental things are not handled well. Try to look at gfortran.dg/ieee/ieee_1.F90 and identify where the failure comes from. Before the call to |
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert A quick update (more today after a while):
UPD. No, changing defines to enable invalid sqrt had no effect on results. It may be unsupported on Darwin in fact: |
Beta Was this translation helpful? Give feedback.
-
@fxcoudert @iains More on failing tests. Test
This corresponds to:
Do we actually have REAL_16 support on 32-bit PPC in Fortran? |
Beta Was this translation helpful? Give feedback.
-
This is just for the record, re some other test failures. (To be updated.) Another [non-IEEE-specific] gfortran test,
Corresponds to:
Possibly an archaic bug never fixed: https://gcc.gnu.org/pipermail/gcc-testresults/2008-January/116411.html
Several of our failing tests also fail on
|
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert I could not find any info on this: does the following re IBM long double apply to Darwin as well? (I.e. rounding mode, NaNs.)
https://www.ibm.com/docs/en/aix/7.2?topic=sepl-128-bit-long-double-floating-point-data-type Rounding mode issue with IBM long double seems to exist on powerpc-linux as well: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59666 |
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert This is a native run on 10A190 (ppc32) from barracuda156/gcc-git@4932b5b (as Iain knows, 10A190 needs to fall back to 10.5 settings in
If I read correctly, overall it is an improvement over what we had (only errors summary below):
Several test which failed earlier now pass. I will look into detailed results to a) see if something which worked earlier got broken or became worse and b) if failures may be fixed further. |
Beta Was this translation helpful? Give feedback.
-
Tests on 12.3.0 with
These are not directly comparable though with those above, since above was gcc-git (so there are more tests in total than in 12.3.0). Perhaps some change has to be reverted to v. 1 (but not all, since overall results seem to have improved). @iains If you get a chance to run tests with this patch, it would be awesome. P. S. At what stage it is appropriate to submit a PR to GCC? While I think this can still be improved, and I will work on that, getting 100% of tests passing may not be feasible (well, not for me at least). If we can be sure that fixing IEEE module does not break anything else (or does it?), maybe rather get it merged before 14 release? |
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert
As far as I can see, for IEEE tests the following fail:
Since I can finally build and run this on 10.6 on |
Beta Was this translation helpful? Give feedback.
-
@fxcoudert @iains I need a quick advice, since I hope to finalize the thing now, and need to decide on a preferred implementation. I have tried three options:
The problem is that I get nearly identical test results – and I suspect that failures have little to do with my code but are either unrelated bugs in gfortran or constraints of the 32-bit architecture. So, to the question: are there some reasons to prefer one over the other? (Assume I get strictly identical test results for gfortran.) |
Beta Was this translation helpful? Give feedback.
-
@iains @fxcoudert I would appreciate if you find time to review this: whenever convenient for you, but it would be nice to have it in gcc 15, if possible. |
Beta Was this translation helpful? Give feedback.
-
@iains I was building
OpenCoarrays
for ppc32, and got the following error:Changing source code syntax slightly as advised elsewhere in some tickets had no effect:
There is a claim that IEEE module support has been implemented since
gcc-5
: https://gcc.gnu.org/gcc-5/changes.htmlApparently that is not the case.
A quick search led to tickets with failures for ppc and aarch64: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100662
Do you have these fixed in your Darwin branches? Or if not, can it be fixed with a reasonable effort?
Beta Was this translation helpful? Give feedback.
All reactions