[PATCH] D74275: [compiler-rt] Compile __powitf2 under wasm
    Sam Clegg via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb 10 19:52:08 PST 2020
    
    
  
sbc100 added inline comments.
================
Comment at: compiler-rt/lib/builtins/CMakeLists.txt:147
   powitf2.c
+  powixf2.c
   subdf3.c
----------------
efriedma wrote:
> powixf2.c is, in fact, x86-specific.  At first glance it might not look like that, but the "x" in the name powixf2 refers exclusively to x86 long double.
Indeed, sorry I misread/misunderstood.
================
Comment at: compiler-rt/lib/builtins/powitf2.c:15
 
-#if _ARCH_PPC
+#if defined(_ARCH_PPC) || defined(__wasm__)
 
----------------
efriedma wrote:
> Please change this so it matches the other 128 long double routines: it should include fp_lib.h, it should use the condition `#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)`, and it should use fp_t instead of explicitly writing out "long double".
Great those macros looks like what I'm looking for. 
Would you mind doing the fp_t change as a followup?  I don't know this codebase well enough to feel confident doing that part.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74275/new/
https://reviews.llvm.org/D74275
    
    
More information about the llvm-commits
mailing list