aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-09-11 17:41:55 -0700
committerGitHub <noreply@github.com>2024-09-11 17:41:55 -0700
commit4fba7336a9038b4abf647caf822f89df717d3cc0 (patch)
treed2a5e61671fefce3ba53454b46311ba77dc31b7a /test/behavior
parent218cf059dd215282aa96d6b4715e68d533a4238e (diff)
parentf1645772c1881a233ffcfc5072710040c4881deb (diff)
downloadzig-4fba7336a9038b4abf647caf822f89df717d3cc0.tar.gz
zig-4fba7336a9038b4abf647caf822f89df717d3cc0.zip
Merge pull request #21269 from alexrp/soft-float
Fix soft float support, split musl triples by float ABI, and enable CI
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/floatop.zig2
-rw-r--r--test/behavior/math.zig1
-rw-r--r--test/behavior/vector.zig13
3 files changed, 11 insertions, 5 deletions
diff --git a/test/behavior/floatop.zig b/test/behavior/floatop.zig
index f9f2579b0a..d799c91331 100644
--- a/test/behavior/floatop.zig
+++ b/test/behavior/floatop.zig
@@ -126,6 +126,7 @@ test "cmp f16" {
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
+ if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
try testCmp(f16);
try comptime testCmp(f16);
@@ -134,6 +135,7 @@ test "cmp f16" {
test "cmp f32/f64" {
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
+ if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
try testCmp(f32);
try comptime testCmp(f32);
diff --git a/test/behavior/math.zig b/test/behavior/math.zig
index 7837ffb74b..c658ea3081 100644
--- a/test/behavior/math.zig
+++ b/test/behavior/math.zig
@@ -1597,6 +1597,7 @@ test "NaN comparison" {
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
+ if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
try testNanEqNan(f16);
try testNanEqNan(f32);
diff --git a/test/behavior/vector.zig b/test/behavior/vector.zig
index 6539a5f6c5..13a5139424 100644
--- a/test/behavior/vector.zig
+++ b/test/behavior/vector.zig
@@ -1409,7 +1409,14 @@ test "store vector with memset" {
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_llvm) {
+ // LLVM 16 ERROR: "Converting bits to bytes lost precision"
+ // https://github.com/ziglang/zig/issues/16177
switch (builtin.target.cpu.arch) {
+ .arm,
+ .armeb,
+ .thumb,
+ .thumbeb,
+ => if (builtin.target.floatAbi() == .soft) return error.SkipZigTest,
.wasm32,
.mips,
.mipsel,
@@ -1418,11 +1425,7 @@ test "store vector with memset" {
.riscv64,
.powerpc,
.powerpc64,
- => {
- // LLVM 16 ERROR: "Converting bits to bytes lost precision"
- // https://github.com/ziglang/zig/issues/16177
- return error.SkipZigTest;
- },
+ => return error.SkipZigTest,
else => {},
}
}