Skip to content
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

[compiler-rt][PowerPC] missing IEEE long double emulation functions #89054

Open
pkubaj opened this issue Apr 17, 2024 · 4 comments
Open

[compiler-rt][PowerPC] missing IEEE long double emulation functions #89054

pkubaj opened this issue Apr 17, 2024 · 4 comments

Comments

@pkubaj
Copy link
Contributor

pkubaj commented Apr 17, 2024

Currently when building LLVM on ppc64le with IEEE long double, LLVM tries to use emulation functions listed in https://gcc.gnu.org/wiki/Ieee128PowerPC (table in 2.3 Emulation functions). However, compiler-rt has no implementation of those functions leading to a build failure when there's no libgcc installed (e.g. on LLVM-only system).

@llvmbot
Copy link
Member

llvmbot commented Apr 17, 2024

@llvm/issue-subscribers-backend-powerpc

Author: Piotr Kubaj (pkubaj)

Currently when building LLVM on ppc64le with IEEE long double, LLVM tries to use emulation functions listed in https://gcc.gnu.org/wiki/Ieee128PowerPC (table in 2.3 Emulation functions). However, compiler-rt has no implementation of those functions leading to a build failure when there's no libgcc installed (e.g. on LLVM-only system).

@chenzheng1030
Copy link
Collaborator

Could you share your usage for LLVM-only system? It it a Linux system? Why do you want to try with LLVM-only system? Thank you!

@ecnelises
Copy link
Member

From the table, following supplementary functions are for __float128 (LLVM does not support decimal so they are excluded):

  • __extendsfkf2
  • __extenddfkf2
  • __trunckfsf2
  • __trunckfdf2
  • __extendkftf2
  • __trunctfkf2
  • __floatsikf
  • __floatdikf
  • __floatdikf
  • __floattikf
  • __floatunsikf
  • __floatundikf
  • __floatundikf
  • __floatuntikf
  • __addkf3
  • __subkf3
  • __mulkf3
  • __divkf3
  • __cmpukf2
  • __cmpokf2

Except __cmpukf2 and __cmpokf2 are not found inside llvm subdirectory, the rest libcalls may be generated by LLVM backend but compiler-rt does not have implementations.

@pkubaj
Copy link
Contributor Author

pkubaj commented Apr 18, 2024

@chenzheng1030
FreeBSD is LLVM-only. We use clang as C compiler, clang++ as C++ compiler, lld as linker and libc++ as a C++ standard library. Our C library is our own (no glibc nor musl).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants