<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/121757>121757</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[i386][Float128][compiler-rt] compiler-rt lack of __subtf3 symbol
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zhangtianhao6
</td>
</tr>
</table>
<pre>
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;
}
```
float
use compiler-rt error: -rtlib=compiler-rt -m32
use libgcc ok: -m32
https://godbolt.org/z/3YT3PbPEW
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8VE1v5CgQ_TXVl1K3MPgDH3zAaVt7nJVGGu0pwjbdZoNNC3CyPb9-Bd3JJJOZkSy5oD7eqweU9F6fV6UaKFoojju5hdm65vss13PQcp2lLXeDna4NEPF1Vvj46LchnBietnUM2q6oPcot2EUGPUpjrnhWq3IyqAmHK4ZZYcxw8hY92uWijXJoT8l3MlYGzCjHcL2oA_5lX9SzckAfkvst3AU0enDSXV8zNeMlSjfOOqgxbE7hZJXH1Qa8OPusJ5XCPhE-YOzD6OE8jq-R_neh3-brrWyYtcdJn07KqXVUqP7TPgDr8UGu-KJwkU8KtwuerEMd0DrEySYy0hj78rGZYH8j2a9pAOuBCCBilF5FqyT3jwigTK-j2SaFwB609cEpuQDrbhl6DbhIvQLlQGuEqgUiEBGB9kB7hK4AzqFuo9G20Arocmg5iPzVEPj4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