Closed chung-leong closed 4 months ago
Getting a different error now:
install
+- WriteFile
+- zig build-lib call-variadic-functions ReleaseSmall aarch64-macos failure
error: LLVM ERROR: Cannot select: 0x126b15fa0: f128 = fp_round 0x126b16010, TargetConstant:i64<1>
0x126b16010: f64,ch = load<(load (s64))> 0x126a4a600, 0x126b16470, undef:i64
0x126b16470: i64 = and 0x126a4a440, Constant:i64<-16>
0x126a4a440: i64 = add 0x126bd60a0, Constant:i64<15>
0x126bd60a0: i64,ch = load<(load (s64) from %ir.23)> 0x10f15eca0, FrameIndex:i64<20>, undef:i64
0x126bd5e70: i64 = FrameIndex<20>
0x126a4a210: i64 = undef
0x126bd6880: i64 = Constant<15>
0x126b16240: i64 = Constant<-16>
0x126a4a210: i64 = undef
0x126a4bfe0: i64 = TargetConstant<1>
In function: call-variadic-functions.printFloats
error: the following command terminated unexpectedly:
/Users/m1/.zvm/0.13.0/zig build-lib -OReleaseSmall -target aarch64-macos -mcpu baseline --dep module -Mroot=/Users/m1/zigar/zigar-compiler/zig/stub-c.zig -I /Users/m1/zigar/zigar-compiler/test/integration/function-calling -Mmodule=/Users/m1/zigar/zigar-compiler/test/integration/function-calling/call-variadic-functions.zig -lc --cache-dir /private/var/folders/3j/qqxfy2j50pxcwr66ndvvsxz80000gn/T/zigar-build/call-variadic-fu-23afc1a4/.zig-cache --global-cache-dir /Users/m1/.cache/zig --name call-variadic-functions -dynamic -install_name @rpath/libcall-variadic-functions.dylib --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
+- WriteFile transitive failure
+- zig build-lib call-variadic-functions ReleaseSmall aarch64-macos failure
+- zig build-lib call-variadic-functions ReleaseSmall aarch64-macos (reused)
error: the following build command failed with exit code 1:
/private/var/folders/3j/qqxfy2j50pxcwr66ndvvsxz80000gn/T/zigar-build/call-variadic-fu-23afc1a4/.zig-cache/o/96020fe8c8d178383619b5cf80b74557/build /Users/m1/.zvm/0.13.0/zig /private/var/folders/3j/qqxfy2j50pxcwr66ndvvsxz80000gn/T/zigar-build/call-variadic-fu-23afc1a4 /private/var/folders/3j/qqxfy2j50pxcwr66ndvvsxz80000gn/T/zigar-build/call-variadic-fu-23afc1a4/.zig-cache /Users/m1/.cache/zig --seed 0x9bd46527 -Z55be7135d09dcbcb -Doptimize=ReleaseSmall -Dtarget=aarch64-macos
Test case is failing with f16
, f32
, and f80
. This might be due to MacOS expecting the caller to sign extend instead of the callee.
Code just won't compile if f128
is used. LLVM error from @cVarArg()
.
At least printf() is working now. Some types are still problematic. Not sure if it's due to the compiler or our code. Revisit the issue after issues related to LLVM are fixed.
sprintf test results: