Skip to content

Commit 0fb80b0

Browse files
authored
Merge pull request #22430 from alexrp/thumbeb
Some QEMU fixes + disable some tests for `thumbeb` in addition to `armeb`
2 parents a7a5f35 + 03ac40d commit 0fb80b0

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

lib/std/fmt.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2596,7 +2596,7 @@ test "positional/alignment/width/precision" {
25962596
}
25972597

25982598
test "vector" {
2599-
if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
2599+
if ((builtin.cpu.arch == .armeb or builtin.cpu.arch == .thumbeb) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
26002600
if (builtin.target.cpu.arch == .riscv64) {
26012601
// https://github.com/ziglang/zig/issues/4486
26022602
return error.SkipZigTest;

lib/std/simd.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a
462462

463463
test "vector prefix scan" {
464464
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
465-
if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
465+
if ((builtin.cpu.arch == .armeb or builtin.cpu.arch == .thumbeb) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
466466
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21893
467467

468468
if (comptime builtin.cpu.arch.isMIPS()) {

lib/std/zig/system.zig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ pub fn getExternalExecutor(
8383
return switch (candidate.cpu.arch) {
8484
.aarch64 => Executor{ .qemu = "qemu-aarch64" },
8585
.aarch64_be => Executor{ .qemu = "qemu-aarch64_be" },
86-
.arm => Executor{ .qemu = "qemu-arm" },
87-
.armeb => Executor{ .qemu = "qemu-armeb" },
86+
.arm, .thumb => Executor{ .qemu = "qemu-arm" },
87+
.armeb, .thumbeb => Executor{ .qemu = "qemu-armeb" },
8888
.hexagon => Executor{ .qemu = "qemu-hexagon" },
8989
.loongarch64 => Executor{ .qemu = "qemu-loongarch64" },
9090
.m68k => Executor{ .qemu = "qemu-m68k" },
@@ -116,7 +116,10 @@ pub fn getExternalExecutor(
116116
},
117117
.sparc64 => Executor{ .qemu = "qemu-sparc64" },
118118
.x86 => Executor{ .qemu = "qemu-i386" },
119-
.x86_64 => Executor{ .qemu = "qemu-x86_64" },
119+
.x86_64 => switch (candidate.abi) {
120+
.gnux32, .muslx32 => return bad_result,
121+
else => Executor{ .qemu = "qemu-x86_64" },
122+
},
120123
.xtensa => Executor{ .qemu = "qemu-xtensa" },
121124
else => return bad_result,
122125
};

test/behavior/align.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ test "@alignCast functions" {
347347

348348
// function alignment is a compile error on wasm32/wasm64
349349
if (native_arch == .wasm32 or native_arch == .wasm64) return error.SkipZigTest;
350-
if (native_arch == .thumb) return error.SkipZigTest;
350+
if (native_arch == .thumb or native_arch == .thumbeb) return error.SkipZigTest;
351351

352352
try expect(fnExpectsOnly1(simple4) == 0x19);
353353
}
@@ -512,7 +512,7 @@ test "align(N) on functions" {
512512

513513
// function alignment is a compile error on wasm32/wasm64
514514
if (native_arch == .wasm32 or native_arch == .wasm64) return error.SkipZigTest;
515-
if (native_arch == .thumb) return error.SkipZigTest;
515+
if (native_arch == .thumb or native_arch == .thumbeb) return error.SkipZigTest;
516516

517517
try expect((@intFromPtr(&overaligned_fn) & (0x1000 - 1)) == 0);
518518
}

test/behavior/vector.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ test "vector division operators" {
640640
};
641641

642642
try comptime S.doTheTest();
643-
if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
643+
if ((builtin.cpu.arch == .armeb or builtin.cpu.arch == .thumbeb) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
644644
try S.doTheTest();
645645
}
646646

@@ -1100,7 +1100,7 @@ test "@addWithOverflow" {
11001100
}
11011101
};
11021102
try comptime S.doTheTest();
1103-
if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
1103+
if ((builtin.cpu.arch == .armeb or builtin.cpu.arch == .thumbeb) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
11041104
try S.doTheTest();
11051105
}
11061106

@@ -1134,7 +1134,7 @@ test "@subWithOverflow" {
11341134
}
11351135
};
11361136
try comptime S.doTheTest();
1137-
if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
1137+
if ((builtin.cpu.arch == .armeb or builtin.cpu.arch == .thumbeb) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
11381138
try S.doTheTest();
11391139
}
11401140

@@ -1158,7 +1158,7 @@ test "@mulWithOverflow" {
11581158
}
11591159
};
11601160
try comptime S.doTheTest();
1161-
if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
1161+
if ((builtin.cpu.arch == .armeb or builtin.cpu.arch == .thumbeb) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
11621162
try S.doTheTest();
11631163
}
11641164

0 commit comments

Comments
 (0)