Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bun scripts/build.ts遭遇错误 #3

Open
dk994023477 opened this issue Nov 7, 2024 · 0 comments
Open

bun scripts/build.ts遭遇错误 #3

dk994023477 opened this issue Nov 7, 2024 · 0 comments

Comments

@dk994023477
Copy link

INSTRUMENT=0
clang -O3 --target=wasm32 -nostdlib -fno-builtin -Iinclude -Isrc -DINSTRUMENT=0 -msimd128 -mbulk-memory -mrelaxed-simd -Wl,--no-entry -Wl,-z,stack-size=8192 -o src/jit/stubs/semifloat.wasm src/jit/stubs/semifloat.c
clang -march=native -fno-lto -Iinclude -Isrc -DINSTRUMENT=0 -O3 -c -o tests/semifloat/semifloat_stub.o src/jit/stubs/semifloat.c
src/jit/stubs/semifloat.c:165:9: warning: implicit declaration of function 'wasm_f64x2_relaxed_madd' is invalid in C99 [-Wimplicit-function-declaration]
return wasm_f64x2_relaxed_madd(wasm_f64x2_neg(c), b, a); // ab - c
^
src/jit/stubs/semifloat.c:165:9: error: returning 'int' from a function with incompatible result type 'v128_t' (vector of 4 'int32_t' values)
return wasm_f64x2_relaxed_madd(wasm_f64x2_neg(c), b, a); // a
b - c
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
make: *** [Makefile:67: src/jit/stubs/semifloat.wasm] Error 1
make: *** Waiting for unfinished jobs....

static inline v128_t mul_residue_fma(v128_t a, v128_t b, v128_t c) {
#ifdef wasm_f64x2_relaxed_madd
// Use the intrinsic if available
return wasm_f64x2_relaxed_madd(wasm_f64x2_neg(c), b, a); // a*b - c
#else
// Fallback if the intrinsic is not available
v128_t neg_c = wasm_f64x2_neg(c); // -c
v128_t mul_ab = wasm_f64x2_mul(a, b); // a * b
return wasm_f64x2_add(mul_ab, neg_c); // (a * b) + (-c)
#endif
}

bun scripts/build.ts编译OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant