You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a todo-eventually item: gcc on other platforms supports -mpc32, -mpc64, -mpc80 to explicitly choose which precision mode to set the x87 FPU into. This is implemented by always shipping multiple .o files as part of the runtime library, and selecting between them using the specs file.
E.g., my Linux gcc's -dumpspecs has some code like: {mpc32:crtprec32.o%s} %{mpc64:crtprec64.o%s} %{mpc80:crtprec80.o%s}, and then there are crtprec32.o, crtprec64.o, crtprec80.o files in /usr/lib/gcc/..., so the correct one can be selected when running gcc.
The current patches in mingwpy that force the use of 64-bit precision mode can't go upstream as is, but if we implemented the standard gcc behaviour in mingw-w64 (at least the -mpc64 and -mpc80 options -- I doubt that anyone cares about -mpc32) then that could go upstream, and then instead of patching the makefiles we'd just have to arrange for our default to be -mpc64. (And possibly we could eventually roll that into some sort of -mmsvc option.)
The text was updated successfully, but these errors were encountered:
The latest commits https://github.com/mingwpy/mingw-builds/commits/mingwpy-dev allows to choose 80bit precision with the flag -mlong-double-80. The default precision is now 64bit for long doubles. For the standard mingw-w64 distributions this is exactly the opposite.
This change was made to stay MSVC and Windows API conformant:
long double has the same precision as double
FPU register settings are 64bit as default
The mingw-w64 libraries still allows 80bit long doubles if needed:
use the -mlong-double-80 flag for compiling
add the CRT_fp10.o object to the link command to change the FPU register to extended precision (80bit)
@njsmith, the latter could be done with an additional target as you described. I guess upstream would accept patches for such a target but with the opposite default as mingwpy needed.
As a todo-eventually item: gcc on other platforms supports
-mpc32
,-mpc64
,-mpc80
to explicitly choose which precision mode to set the x87 FPU into. This is implemented by always shipping multiple .o files as part of the runtime library, and selecting between them using the specs file.E.g., my Linux gcc's
-dumpspecs
has some code like:{mpc32:crtprec32.o%s} %{mpc64:crtprec64.o%s} %{mpc80:crtprec80.o%s}
, and then there arecrtprec32.o
,crtprec64.o
,crtprec80.o
files in/usr/lib/gcc/...
, so the correct one can be selected when running gcc.The current patches in mingwpy that force the use of 64-bit precision mode can't go upstream as is, but if we implemented the standard gcc behaviour in mingw-w64 (at least the
-mpc64
and-mpc80
options -- I doubt that anyone cares about-mpc32
) then that could go upstream, and then instead of patching the makefiles we'd just have to arrange for our default to be-mpc64
. (And possibly we could eventually roll that into some sort of-mmsvc
option.)The text was updated successfully, but these errors were encountered: