Skip to content

[i386][Float128][compiler-rt] compiler-rt lack of __subtf3 symbol #121757

@zhangtianhao6

Description

@zhangtianhao6

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;
}

use compiler-rt error: -rtlib=compiler-rt -m32
use libgcc ok: -m32
https://godbolt.org/z/3YT3PbPEW

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions