diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt --- a/compiler-rt/lib/builtins/CMakeLists.txt +++ b/compiler-rt/lib/builtins/CMakeLists.txt @@ -144,6 +144,7 @@ powidf2.c powisf2.c powitf2.c + powixf2.c subdf3.c subsf3.c subvdi3.c @@ -248,7 +249,6 @@ floatundixf.c floatuntixf.c mulxc3.c - powixf2.c ) if (NOT MSVC) diff --git a/compiler-rt/lib/builtins/powitf2.c b/compiler-rt/lib/builtins/powitf2.c --- a/compiler-rt/lib/builtins/powitf2.c +++ b/compiler-rt/lib/builtins/powitf2.c @@ -12,7 +12,7 @@ #include "int_lib.h" -#if _ARCH_PPC +#if defined(_ARCH_PPC) || defined(__wasm__) // Returns: a ^ b diff --git a/compiler-rt/test/builtins/Unit/powitf2_test.c b/compiler-rt/test/builtins/Unit/powitf2_test.c --- a/compiler-rt/test/builtins/Unit/powitf2_test.c +++ b/compiler-rt/test/builtins/Unit/powitf2_test.c @@ -14,7 +14,7 @@ #include -#if _ARCH_PPC +#if defined (_ARCH_PPC) || defined (__wasm__) #include "int_lib.h" #include @@ -37,7 +37,7 @@ int main() { -#if _ARCH_PPC +#if defined(_ARCH_PPC) || defined (__wasm__) if (test__powitf2(0, 0, 1)) return 1; if (test__powitf2(1, 0, 1))