From 4560bd3c918f9a5c65b778b876872a8763c0fd4c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 30 Nov 2020 13:25:28 -0800 Subject: [PATCH 1/2] Fix sinh's sign handling In the musl 1.2.1 update, I made a change to disable the new code in sinh for handling directed rounding modes, but I only incompletely disabled it. This led to `sinh(-inf)` computing `inf` instead of `-inf`, detected in [wasi-libc-test]. This patch fixes it. [wasi-libc-test]: https://github.com/CraneStation/wasi-libc-test/tree/master/libc-test --- libc-top-half/musl/src/math/sinh.c | 2 +- libc-top-half/musl/src/math/sinhf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libc-top-half/musl/src/math/sinh.c b/libc-top-half/musl/src/math/sinh.c index 8463abc7b..c8dda8d68 100644 --- a/libc-top-half/musl/src/math/sinh.c +++ b/libc-top-half/musl/src/math/sinh.c @@ -37,7 +37,7 @@ double sinh(double x) #ifdef __wasilibc_unmodified_upstream // Wasm doesn't have alternate rounding modes t = __expo2(absx, 2*h); #else - t = __expo2(absx); + t = 2*h*__expo2(absx); #endif return t; } diff --git a/libc-top-half/musl/src/math/sinhf.c b/libc-top-half/musl/src/math/sinhf.c index 1fcd27a06..3ac49e218 100644 --- a/libc-top-half/musl/src/math/sinhf.c +++ b/libc-top-half/musl/src/math/sinhf.c @@ -29,7 +29,7 @@ float sinhf(float x) #ifdef __wasilibc_unmodified_upstream // Wasm doesn't have alternate rounding modes t = __expo2f(absx, 2*h); #else - t = __expo2f(absx); + t = 2*h*__expo2f(absx); #endif return t; } From 3a2f5f70f553e39534ac80b146fbfc3bc85aeefe Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Mon, 30 Nov 2020 15:42:32 -0800 Subject: [PATCH 2/2] windows ci: try moving rustup stuff to non-bash shell (#225) --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07df901b3..2a2a50127 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,15 @@ jobs: if: matrix.os == 'windows-latest' - name: Install llvm-nm (Windows) - shell: bash run: | rustup update stable rustup default stable rustup component add llvm-tools-preview + if: matrix.os == 'windows-latest' + + - name: Register llvm-nm in environment (Windows) + shell: bash + run: | echo "WASM_NM=$(rustc --print sysroot|sed 's|C:|/c|'|sed 's|\\|/|g')/lib/rustlib/x86_64-pc-windows-msvc/bin/llvm-nm.exe" >> $GITHUB_ENV if: matrix.os == 'windows-latest'