[PATCH] D112401: [Clang] Mutate printf bulitin names under IEEE128 on PPC64

Jinsong Ji via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 1 06:53:12 PDT 2021


jsji accepted this revision as: jsji.
jsji added a comment.
This revision is now accepted and ready to land.

LGTM. Please hold a few days to see whether there are inputs from other reviewers. Thanks.



================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:100
+  static SmallDenseMap<unsigned, StringRef, 8> F128Builtins{
+      {Builtin::BI__builtin_printf, "__printfieee128"},
+      {Builtin::BI__builtin_vsnprintf, "__vsnprintfieee128"},
----------------
qiucf wrote:
> jsji wrote:
> > Why only these printf builtins? I think there are full list of similar libcalls in `GLIBC_2.32` and later?
> Yes, Glibc redirects all these functions depending on long double semantics, and GCC has corresponding builtins for almost all library functions (https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html).
> 
> But currently clang doesn't have all of these builtins (for example, `__builtin_scanf`). It seems beyond this patch's scope to make the list complete.
OK. Thanks. Can we add a TODO note.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112401/new/

https://reviews.llvm.org/D112401



More information about the cfe-commits mailing list