-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[builtins] Avoid using long double in generic sources #69754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
6298a09
to
679e906
Compare
Use of long double can be error-prone since it could be one of 80-bit extended precision float, IEEE 128-bit float, or IBM 128-bit float. Instead use an explicit xf_float typedef for the remaining cases where long double is being used in the implementation. This patch does not touch the PPC specializations which still use long double.
679e906
to
0af8ccd
Compare
This seems to not build on Windows, at least with clang-cl as host compiler: http://45.33.8.238/win/85105/step_4.txt Could you take a look? |
My guess is that HAS_80_BIT_LONG_DOUBLE is not being defined for some reason?
|
So either clang-cl does not use 80 bit long double and we shouldn't be compiling those files or the guard needs to be adjusted. Not familiar with Windows ABIs so I'd have to defer to someone with experience there. |
Yes, Windows long double is 64 bits, not 80 bits. |
Does this mean the *xf files should not be compiled for Windows ABIs? |
Yes, that would make sense to me. *xf pertains to 80 bit float as far as I know. |
Apologies, https://reviews.llvm.org/D82153 already took care of that a while ago. Config problem on that bot. |
Use of long double can be error-prone since it could be one of 80-bit
extended precision float, IEEE 128-bit float, or IBM 128-bit float.
Instead use an explicit xf_float typedef for the remaining cases where
long double is being used in the implementation. This patch does not touch
the PPC specializations which still use long double.
Depends on #68132 (to be committed after that PR).