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
The __subtf3 function is automatically generated by the subtraction compiler of the float 128 type. However, the compiler rt library of the i386 architecture does not provide the __subtf3 function. The libgcc provides the __subtf3 function. Why does this difference exist? Can we make up for it or do not allow the compiler to automatically generate the __subtf3 function?
case
#include <iostream>
int main() {
// 创建两个 __float128 类型的变量
__float128 a = 1.23456789012345678901234567890123456789Q; // 精度较高
__float128 b = 0.12345678901234567890123456789012345678Q;
// 执行减法,编译器将自动使用 __subtf3
__float128 result = a - b;
return 0;
}
AFAIK, x86 does not support fp128 which is why it is not present. Windows, Darwin, and FreeBSD (unlike Linux) do not support FP80 which is possible with the x87 co-processor. But, it does make sense to match libgcc as the library is supposed to be ABI compatible.
The __subtf3 function is automatically generated by the subtraction compiler of the float 128 type. However, the compiler rt library of the i386 architecture does not provide the __subtf3 function. The libgcc provides the __subtf3 function. Why does this difference exist? Can we make up for it or do not allow the compiler to automatically generate the __subtf3 function?
case
use compiler-rt error: -rtlib=compiler-rt -m32
use libgcc ok: -m32
https://godbolt.org/z/3YT3PbPEW
The text was updated successfully, but these errors were encountered: