authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-12-15 01:41:46+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-12-15 01:41:46+01:00
logd5c2f527b488a17e20b0698ff02c9b67f1148210
treef6c99591e0093f4045f795ed3038600ce1366f75
parentee47094a33b91adc2250ac1f2c01786ee15d7c40
parent9aa4cf4f8895fe1e61ec92e97c6255df0a58f88e
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #22219 from alexrp/arm-big-endian

Add `armeb-linux-*`, `thumbeb-linux-*`, and `aarch64_be-linux-*` to CI

5 files changed, 148 insertions(+), 6 deletions(-)

lib/compiler_rt/arm.zig+1
......@@ -233,6 +233,7 @@ test "__aeabi_frsub" {
233233
234234test "__aeabi_drsub" {
235235 if (!builtin.cpu.arch.isArm() or builtin.cpu.arch.isThumb()) return error.SkipZigTest;
236 if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22061
236237 const inf64 = std.math.inf(f64);
237238 const maxf64 = std.math.floatMax(f64);
238239 const frsub_data = [_][3]f64{
lib/std/fmt.zig+1
......@@ -2596,6 +2596,7 @@ test "positional/alignment/width/precision" {
25962596}
25972597
25982598test "vector" {
2599 if (builtin.cpu.arch == .armeb and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22060
25992600 if (builtin.target.cpu.arch == .riscv64) {
26002601 // https://github.com/ziglang/zig/issues/4486
26012602 return error.SkipZigTest;
lib/std/simd.zig+1
......@@ -462,6 +462,7 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a
462462
463463test "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
465466 if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21893
466467
467468 if (comptime builtin.cpu.arch.isMIPS()) {
test/behavior/vector.zig+8-4
......@@ -639,8 +639,9 @@ test "vector division operators" {
639639 }
640640 };
641641
642 try S.doTheTest();
643642 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
644 try S.doTheTest();
644645}
645646
646647test "vector bitwise not operator" {
......@@ -1098,8 +1099,9 @@ test "@addWithOverflow" {
10981099 }
10991100 }
11001101 };
1101 try S.doTheTest();
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
1104 try S.doTheTest();
11031105}
11041106
11051107test "@subWithOverflow" {
......@@ -1131,8 +1133,9 @@ test "@subWithOverflow" {
11311133 }
11321134 }
11331135 };
1134 try S.doTheTest();
11351136 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
1138 try S.doTheTest();
11361139}
11371140
11381141test "@mulWithOverflow" {
......@@ -1154,8 +1157,9 @@ test "@mulWithOverflow" {
11541157 try expectEqual(expected, overflow);
11551158 }
11561159 };
1157 try S.doTheTest();
11581160 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
1162 try S.doTheTest();
11591163}
11601164
11611165test "@shlWithOverflow" {
test/tests.zig+137-2
......@@ -307,6 +307,30 @@ const test_targets = blk: {
307307 .link_libc = true,
308308 },
309309
310 .{
311 .target = .{
312 .cpu_arch = .aarch64_be,
313 .os_tag = .linux,
314 .abi = .none,
315 },
316 },
317 .{
318 .target = .{
319 .cpu_arch = .aarch64_be,
320 .os_tag = .linux,
321 .abi = .musl,
322 },
323 .link_libc = true,
324 },
325 .{
326 .target = .{
327 .cpu_arch = .aarch64_be,
328 .os_tag = .linux,
329 .abi = .gnu,
330 },
331 .link_libc = true,
332 },
333
310334 .{
311335 .target = .{
312336 .cpu_arch = .arm,
......@@ -354,6 +378,53 @@ const test_targets = blk: {
354378 .link_libc = true,
355379 },
356380
381 .{
382 .target = .{
383 .cpu_arch = .armeb,
384 .os_tag = .linux,
385 .abi = .eabi,
386 },
387 },
388 .{
389 .target = .{
390 .cpu_arch = .armeb,
391 .os_tag = .linux,
392 .abi = .eabihf,
393 },
394 },
395 .{
396 .target = .{
397 .cpu_arch = .armeb,
398 .os_tag = .linux,
399 .abi = .musleabi,
400 },
401 .link_libc = true,
402 },
403 .{
404 .target = .{
405 .cpu_arch = .armeb,
406 .os_tag = .linux,
407 .abi = .musleabihf,
408 },
409 .link_libc = true,
410 },
411 .{
412 .target = .{
413 .cpu_arch = .armeb,
414 .os_tag = .linux,
415 .abi = .gnueabi,
416 },
417 .link_libc = true,
418 },
419 .{
420 .target = .{
421 .cpu_arch = .armeb,
422 .os_tag = .linux,
423 .abi = .gnueabihf,
424 },
425 .link_libc = true,
426 },
427
357428 .{
358429 .target = .{
359430 .cpu_arch = .thumb,
......@@ -393,7 +464,7 @@ const test_targets = blk: {
393464 .target = std.Target.Query.parse(.{
394465 .arch_os_abi = "thumb-linux-musleabi",
395466 .cpu_features = "baseline+long_calls",
396 }) catch @panic("OOM"),
467 }) catch unreachable,
397468 .link_libc = true,
398469 .pic = false, // Long calls don't work with PIC.
399470 .skip_modules = &.{
......@@ -407,7 +478,71 @@ const test_targets = blk: {
407478 .target = std.Target.Query.parse(.{
408479 .arch_os_abi = "thumb-linux-musleabihf",
409480 .cpu_features = "baseline+long_calls",
410 }) catch @panic("OOM"),
481 }) catch unreachable,
482 .link_libc = true,
483 .pic = false, // Long calls don't work with PIC.
484 .skip_modules = &.{
485 "behavior",
486 "c-import",
487 "compiler-rt",
488 "universal-libc",
489 },
490 },
491
492 .{
493 .target = .{
494 .cpu_arch = .thumbeb,
495 .os_tag = .linux,
496 .abi = .eabi,
497 },
498 },
499 .{
500 .target = .{
501 .cpu_arch = .thumbeb,
502 .os_tag = .linux,
503 .abi = .eabihf,
504 },
505 },
506 .{
507 .target = .{
508 .cpu_arch = .thumbeb,
509 .os_tag = .linux,
510 .abi = .musleabi,
511 },
512 .link_libc = true,
513 .skip_modules = &.{"std"},
514 },
515 .{
516 .target = .{
517 .cpu_arch = .thumbeb,
518 .os_tag = .linux,
519 .abi = .musleabihf,
520 },
521 .link_libc = true,
522 .skip_modules = &.{"std"},
523 },
524 // Calls are normally lowered to branch instructions that only support +/- 16 MB range when
525 // targeting Thumb. This is not sufficient for the std test binary linked statically with
526 // musl, so use long calls to avoid out-of-range relocations.
527 .{
528 .target = std.Target.Query.parse(.{
529 .arch_os_abi = "thumbeb-linux-musleabi",
530 .cpu_features = "baseline+long_calls",
531 }) catch unreachable,
532 .link_libc = true,
533 .pic = false, // Long calls don't work with PIC.
534 .skip_modules = &.{
535 "behavior",
536 "c-import",
537 "compiler-rt",
538 "universal-libc",
539 },
540 },
541 .{
542 .target = std.Target.Query.parse(.{
543 .arch_os_abi = "thumbeb-linux-musleabihf",
544 .cpu_features = "baseline+long_calls",
545 }) catch unreachable,
411546 .link_libc = true,
412547 .pic = false, // Long calls don't work with PIC.
413548 .skip_modules = &.{