summaryrefslogtreecommitdiff
path: root/wasm2c/wasm-rt-impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'wasm2c/wasm-rt-impl.c')
-rw-r--r--wasm2c/wasm-rt-impl.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/wasm2c/wasm-rt-impl.c b/wasm2c/wasm-rt-impl.c
index 7d70597c..14ca0e6f 100644
--- a/wasm2c/wasm-rt-impl.c
+++ b/wasm2c/wasm-rt-impl.c
@@ -290,74 +290,6 @@ void wasm_rt_free_memory(wasm_rt_memory_t* memory) {
#endif
}
-#ifdef _WIN32
-static float quiet_nanf(float x) {
- uint32_t tmp;
- memcpy(&tmp, &x, 4);
- tmp |= 0x7fc00000lu;
- memcpy(&x, &tmp, 4);
- return x;
-}
-
-static double quiet_nan(double x) {
- uint64_t tmp;
- memcpy(&tmp, &x, 8);
- tmp |= 0x7ff8000000000000llu;
- memcpy(&x, &tmp, 8);
- return x;
-}
-
-double wasm_rt_trunc(double x) {
- if (isnan(x)) {
- return quiet_nan(x);
- }
- return trunc(x);
-}
-
-float wasm_rt_truncf(float x) {
- if (isnan(x)) {
- return quiet_nanf(x);
- }
- return truncf(x);
-}
-
-float wasm_rt_nearbyintf(float x) {
- if (isnan(x)) {
- return quiet_nanf(x);
- }
- return nearbyintf(x);
-}
-
-double wasm_rt_nearbyint(double x) {
- if (isnan(x)) {
- return quiet_nan(x);
- }
- return nearbyint(x);
-}
-
-float wasm_rt_fabsf(float x) {
- if (isnan(x)) {
- uint32_t tmp;
- memcpy(&tmp, &x, 4);
- tmp = tmp & ~(1 << 31);
- memcpy(&x, &tmp, 4);
- return x;
- }
- return fabsf(x);
-}
-
-double wasm_rt_fabs(double x) {
- if (isnan(x)) {
- uint64_t tmp;
- memcpy(&tmp, &x, 8);
- tmp = tmp & ~(1ll << 63);
- memcpy(&x, &tmp, 8);
- return x;
- }
- return fabs(x);
-}
-#endif
-
void wasm_rt_allocate_table(wasm_rt_table_t* table,
uint32_t elements,
uint32_t max_elements) {