[PATCH] D74275: [compiler-rt] Compile __powitf2 under wasm

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 17:41:01 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2f172d8d3c10: [compiler-rt] Compile __powitf2 under wasm (authored by sbc100).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74275

Files:
  compiler-rt/lib/builtins/powitf2.c
  compiler-rt/test/builtins/Unit/powitf2_test.c


Index: compiler-rt/test/builtins/Unit/powitf2_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/powitf2_test.c
+++ compiler-rt/test/builtins/Unit/powitf2_test.c
@@ -14,7 +14,7 @@
 
 #include <stdio.h>
 
-#if _ARCH_PPC
+#if __LDBL_MANT_DIG__ == 113
 
 #include "int_lib.h"
 #include <math.h>
@@ -37,7 +37,7 @@
 
 int main()
 {
-#if _ARCH_PPC
+#if __LDBL_MANT_DIG__ == 113
     if (test__powitf2(0, 0, 1))
         return 1;
     if (test__powitf2(1, 0, 1))
Index: compiler-rt/lib/builtins/powitf2.c
===================================================================
--- compiler-rt/lib/builtins/powitf2.c
+++ compiler-rt/lib/builtins/powitf2.c
@@ -10,9 +10,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "int_lib.h"
+#define QUAD_PRECISION
+#include "fp_lib.h"
 
-#if _ARCH_PPC
+#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
 
 // Returns: a ^ b
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74275.244045.patch
Type: text/x-patch
Size: 975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200212/914704af/attachment.bin>


More information about the llvm-commits mailing list