| author | |
| committer | |
| log | 2f003f39b28176f08de51271eb66b5f3a54c7aae |
| tree | 8aa5be07f5749b49a2103bda726771473f29bbbd |
| parent | 947b7195bf4628cc4658fec9e2f5b30a1318132b |
| parent | 621487d5abcf9006b3e38f96c49a533c1835e7a3 |
| signature |
33 files changed, 174 insertions(+), 103 deletions(-)
lib/compiler/aro/aro/toolchains/Linux.zig+1-1| ... | @@ -40,7 +40,7 @@ fn buildExtraOpts(self: *Linux, tc: *const Toolchain) !void { | ... | @@ -40,7 +40,7 @@ fn buildExtraOpts(self: *Linux, tc: *const Toolchain) !void { |
| 40 | self.extra_opts.appendAssumeCapacity("relro"); | 40 | self.extra_opts.appendAssumeCapacity("relro"); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | if (target.cpu.arch.isARM() or target.cpu.arch.isAARCH64() or is_android) { | 43 | if ((target.cpu.arch.isArm() and !target.cpu.arch.isThumb()) or target.cpu.arch.isAARCH64() or is_android) { |
| 44 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | 44 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); |
| 45 | self.extra_opts.appendAssumeCapacity("-z"); | 45 | self.extra_opts.appendAssumeCapacity("-z"); |
| 46 | self.extra_opts.appendAssumeCapacity("max-page-size=4096"); | 46 | self.extra_opts.appendAssumeCapacity("max-page-size=4096"); |
lib/compiler_rt/arm.zig+3-5| ... | @@ -10,7 +10,7 @@ pub const panic = common.panic; | ... | @@ -10,7 +10,7 @@ pub const panic = common.panic; |
| 10 | 10 | ||
| 11 | comptime { | 11 | comptime { |
| 12 | if (!builtin.is_test) { | 12 | if (!builtin.is_test) { |
| 13 | if (arch.isArmOrThumb()) { | 13 | if (arch.isArm()) { |
| 14 | @export(&__aeabi_unwind_cpp_pr0, .{ .name = "__aeabi_unwind_cpp_pr0", .linkage = common.linkage, .visibility = common.visibility }); | 14 | @export(&__aeabi_unwind_cpp_pr0, .{ .name = "__aeabi_unwind_cpp_pr0", .linkage = common.linkage, .visibility = common.visibility }); |
| 15 | @export(&__aeabi_unwind_cpp_pr1, .{ .name = "__aeabi_unwind_cpp_pr1", .linkage = common.linkage, .visibility = common.visibility }); | 15 | @export(&__aeabi_unwind_cpp_pr1, .{ .name = "__aeabi_unwind_cpp_pr1", .linkage = common.linkage, .visibility = common.visibility }); |
| 16 | @export(&__aeabi_unwind_cpp_pr2, .{ .name = "__aeabi_unwind_cpp_pr2", .linkage = common.linkage, .visibility = common.visibility }); | 16 | @export(&__aeabi_unwind_cpp_pr2, .{ .name = "__aeabi_unwind_cpp_pr2", .linkage = common.linkage, .visibility = common.visibility }); |
| ... | @@ -206,7 +206,7 @@ fn __aeabi_drsub(a: f64, b: f64) callconv(.AAPCS) f64 { | ... | @@ -206,7 +206,7 @@ fn __aeabi_drsub(a: f64, b: f64) callconv(.AAPCS) f64 { |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | test "__aeabi_frsub" { | 208 | test "__aeabi_frsub" { |
| 209 | if (!builtin.cpu.arch.isARM()) return error.SkipZigTest; | 209 | if (!builtin.cpu.arch.isArm() or builtin.cpu.arch.isThumb()) return error.SkipZigTest; |
| 210 | const inf32 = std.math.inf(f32); | 210 | const inf32 = std.math.inf(f32); |
| 211 | const maxf32 = std.math.floatMax(f32); | 211 | const maxf32 = std.math.floatMax(f32); |
| 212 | const frsub_data = [_][3]f32{ | 212 | const frsub_data = [_][3]f32{ |
| ... | @@ -226,14 +226,13 @@ test "__aeabi_frsub" { | ... | @@ -226,14 +226,13 @@ test "__aeabi_frsub" { |
| 226 | [_]f32{ maxf32, -maxf32, -inf32 }, | 226 | [_]f32{ maxf32, -maxf32, -inf32 }, |
| 227 | [_]f32{ -maxf32, maxf32, inf32 }, | 227 | [_]f32{ -maxf32, maxf32, inf32 }, |
| 228 | }; | 228 | }; |
| 229 | if (!builtin.cpu.arch.isARM()) return error.SkipZigTest; | ||
| 230 | for (frsub_data) |data| { | 229 | for (frsub_data) |data| { |
| 231 | try std.testing.expectApproxEqAbs(data[2], __aeabi_frsub(data[0], data[1]), 0.001); | 230 | try std.testing.expectApproxEqAbs(data[2], __aeabi_frsub(data[0], data[1]), 0.001); |
| 232 | } | 231 | } |
| 233 | } | 232 | } |
| 234 | 233 | ||
| 235 | test "__aeabi_drsub" { | 234 | test "__aeabi_drsub" { |
| 236 | if (!builtin.cpu.arch.isARM()) return error.SkipZigTest; | 235 | if (!builtin.cpu.arch.isArm() or builtin.cpu.arch.isThumb()) return error.SkipZigTest; |
| 237 | const inf64 = std.math.inf(f64); | 236 | const inf64 = std.math.inf(f64); |
| 238 | const maxf64 = std.math.floatMax(f64); | 237 | const maxf64 = std.math.floatMax(f64); |
| 239 | const frsub_data = [_][3]f64{ | 238 | const frsub_data = [_][3]f64{ |
| ... | @@ -253,7 +252,6 @@ test "__aeabi_drsub" { | ... | @@ -253,7 +252,6 @@ test "__aeabi_drsub" { |
| 253 | [_]f64{ maxf64, -maxf64, -inf64 }, | 252 | [_]f64{ maxf64, -maxf64, -inf64 }, |
| 254 | [_]f64{ -maxf64, maxf64, inf64 }, | 253 | [_]f64{ -maxf64, maxf64, inf64 }, |
| 255 | }; | 254 | }; |
| 256 | if (!builtin.cpu.arch.isARM()) return error.SkipZigTest; | ||
| 257 | for (frsub_data) |data| { | 255 | for (frsub_data) |data| { |
| 258 | try std.testing.expectApproxEqAbs(data[2], __aeabi_drsub(data[0], data[1]), 0.000001); | 256 | try std.testing.expectApproxEqAbs(data[2], __aeabi_drsub(data[0], data[1]), 0.000001); |
| 259 | } | 257 | } |
lib/compiler_rt/clzsi2_test.zig+1-1| ... | @@ -268,7 +268,7 @@ test "clzsi2" { | ... | @@ -268,7 +268,7 @@ test "clzsi2" { |
| 268 | try test__clzsi2(0xFE000000, 0); | 268 | try test__clzsi2(0xFE000000, 0); |
| 269 | try test__clzsi2(0xFF000000, 0); | 269 | try test__clzsi2(0xFF000000, 0); |
| 270 | // arm and thumb1 assume input a != 0 | 270 | // arm and thumb1 assume input a != 0 |
| 271 | if (!builtin.cpu.arch.isArmOrThumb()) | 271 | if (!builtin.cpu.arch.isArm()) |
| 272 | try test__clzsi2(0x00000000, 32); | 272 | try test__clzsi2(0x00000000, 32); |
| 273 | try test__clzsi2(0x00000001, 31); | 273 | try test__clzsi2(0x00000001, 31); |
| 274 | try test__clzsi2(0x00000002, 30); | 274 | try test__clzsi2(0x00000002, 30); |
lib/compiler_rt/common.zig+1-1| ... | @@ -29,7 +29,7 @@ pub const want_aeabi = switch (builtin.abi) { | ... | @@ -29,7 +29,7 @@ pub const want_aeabi = switch (builtin.abi) { |
| 29 | }, | 29 | }, |
| 30 | else => false, | 30 | else => false, |
| 31 | }; | 31 | }; |
| 32 | pub const want_mingw_arm_abi = builtin.cpu.arch.isArmOrThumb() and builtin.target.isMinGW(); | 32 | pub const want_mingw_arm_abi = builtin.cpu.arch.isArm() and builtin.target.isMinGW(); |
| 33 | 33 | ||
| 34 | pub const want_ppc_abi = builtin.cpu.arch.isPowerPC(); | 34 | pub const want_ppc_abi = builtin.cpu.arch.isPowerPC(); |
| 35 | 35 |
lib/std/Target.zig+7-10| ... | @@ -1383,31 +1383,28 @@ pub const Cpu = struct { | ... | @@ -1383,31 +1383,28 @@ pub const Cpu = struct { |
| 1383 | }; | 1383 | }; |
| 1384 | } | 1384 | } |
| 1385 | 1385 | ||
| 1386 | pub inline fn isARM(arch: Arch) bool { | 1386 | /// Note that this includes Thumb. |
| 1387 | pub inline fn isArm(arch: Arch) bool { | ||
| 1387 | return switch (arch) { | 1388 | return switch (arch) { |
| 1388 | .arm, .armeb => true, | 1389 | .arm, .armeb => true, |
| 1389 | else => false, | 1390 | else => arch.isThumb(), |
| 1390 | }; | 1391 | }; |
| 1391 | } | 1392 | } |
| 1392 | 1393 | ||
| 1393 | pub inline fn isAARCH64(arch: Arch) bool { | 1394 | pub inline fn isThumb(arch: Arch) bool { |
| 1394 | return switch (arch) { | 1395 | return switch (arch) { |
| 1395 | .aarch64, .aarch64_be => true, | 1396 | .thumb, .thumbeb => true, |
| 1396 | else => false, | 1397 | else => false, |
| 1397 | }; | 1398 | }; |
| 1398 | } | 1399 | } |
| 1399 | 1400 | ||
| 1400 | pub inline fn isThumb(arch: Arch) bool { | 1401 | pub inline fn isAARCH64(arch: Arch) bool { |
| 1401 | return switch (arch) { | 1402 | return switch (arch) { |
| 1402 | .thumb, .thumbeb => true, | 1403 | .aarch64, .aarch64_be => true, |
| 1403 | else => false, | 1404 | else => false, |
| 1404 | }; | 1405 | }; |
| 1405 | } | 1406 | } |
| 1406 | 1407 | ||
| 1407 | pub inline fn isArmOrThumb(arch: Arch) bool { | ||
| 1408 | return arch.isARM() or arch.isThumb(); | ||
| 1409 | } | ||
| 1410 | |||
| 1411 | pub inline fn isWasm(arch: Arch) bool { | 1408 | pub inline fn isWasm(arch: Arch) bool { |
| 1412 | return switch (arch) { | 1409 | return switch (arch) { |
| 1413 | .wasm32, .wasm64 => true, | 1410 | .wasm32, .wasm64 => true, |
lib/std/math/gamma.zig+1-1| ... | @@ -263,7 +263,7 @@ test gamma { | ... | @@ -263,7 +263,7 @@ test gamma { |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | test "gamma.special" { | 265 | test "gamma.special" { |
| 266 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 266 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 267 | 267 | ||
| 268 | inline for (&.{ f32, f64 }) |T| { | 268 | inline for (&.{ f32, f64 }) |T| { |
| 269 | try expect(std.math.isNan(gamma(T, -std.math.nan(T)))); | 269 | try expect(std.math.isNan(gamma(T, -std.math.nan(T)))); |
lib/std/math/isnan.zig+1-1| ... | @@ -32,7 +32,7 @@ test isSignalNan { | ... | @@ -32,7 +32,7 @@ test isSignalNan { |
| 32 | // TODO: Signalling NaN values get converted to quiet NaN values in | 32 | // TODO: Signalling NaN values get converted to quiet NaN values in |
| 33 | // some cases where they shouldn't such that this can fail. | 33 | // some cases where they shouldn't such that this can fail. |
| 34 | // See https://github.com/ziglang/zig/issues/14366 | 34 | // See https://github.com/ziglang/zig/issues/14366 |
| 35 | if (!builtin.cpu.arch.isArmOrThumb() and | 35 | if (!builtin.cpu.arch.isArm() and |
| 36 | !builtin.cpu.arch.isAARCH64() and | 36 | !builtin.cpu.arch.isAARCH64() and |
| 37 | !builtin.cpu.arch.isPowerPC() and | 37 | !builtin.cpu.arch.isPowerPC() and |
| 38 | builtin.zig_backend != .stage2_c) | 38 | builtin.zig_backend != .stage2_c) |
lib/std/os/linux.zig+2-2| ... | @@ -509,7 +509,7 @@ fn getauxvalImpl(index: usize) callconv(.C) usize { | ... | @@ -509,7 +509,7 @@ fn getauxvalImpl(index: usize) callconv(.C) usize { |
| 509 | const require_aligned_register_pair = | 509 | const require_aligned_register_pair = |
| 510 | builtin.cpu.arch.isPowerPC32() or | 510 | builtin.cpu.arch.isPowerPC32() or |
| 511 | builtin.cpu.arch.isMIPS32() or | 511 | builtin.cpu.arch.isMIPS32() or |
| 512 | builtin.cpu.arch.isArmOrThumb(); | 512 | builtin.cpu.arch.isArm(); |
| 513 | 513 | ||
| 514 | // Split a 64bit value into a {LSB,MSB} pair. | 514 | // Split a 64bit value into a {LSB,MSB} pair. |
| 515 | // The LE/BE variants specify the endianness to assume. | 515 | // The LE/BE variants specify the endianness to assume. |
| ... | @@ -2334,7 +2334,7 @@ pub fn process_vm_writev(pid: pid_t, local: []const iovec_const, remote: []const | ... | @@ -2334,7 +2334,7 @@ pub fn process_vm_writev(pid: pid_t, local: []const iovec_const, remote: []const |
| 2334 | } | 2334 | } |
| 2335 | 2335 | ||
| 2336 | pub fn fadvise(fd: fd_t, offset: i64, len: i64, advice: usize) usize { | 2336 | pub fn fadvise(fd: fd_t, offset: i64, len: i64, advice: usize) usize { |
| 2337 | if (comptime native_arch.isArmOrThumb() or native_arch.isPowerPC32()) { | 2337 | if (comptime native_arch.isArm() or native_arch.isPowerPC32()) { |
| 2338 | // These architectures reorder the arguments so that a register is not skipped to align the | 2338 | // These architectures reorder the arguments so that a register is not skipped to align the |
| 2339 | // register number that `offset` is passed in. | 2339 | // register number that `offset` is passed in. |
| 2340 | 2340 |
lib/std/simd.zig+1-1| ... | @@ -18,7 +18,7 @@ pub fn suggestVectorLengthForCpu(comptime T: type, comptime cpu: std.Target.Cpu) | ... | @@ -18,7 +18,7 @@ pub fn suggestVectorLengthForCpu(comptime T: type, comptime cpu: std.Target.Cpu) |
| 18 | if (std.Target.x86.featureSetHasAny(cpu.features, .{ .prefer_256_bit, .avx2 }) and !std.Target.x86.featureSetHas(cpu.features, .prefer_128_bit)) break :blk 256; | 18 | if (std.Target.x86.featureSetHasAny(cpu.features, .{ .prefer_256_bit, .avx2 }) and !std.Target.x86.featureSetHas(cpu.features, .prefer_128_bit)) break :blk 256; |
| 19 | if (std.Target.x86.featureSetHas(cpu.features, .sse)) break :blk 128; | 19 | if (std.Target.x86.featureSetHas(cpu.features, .sse)) break :blk 128; |
| 20 | if (std.Target.x86.featureSetHasAny(cpu.features, .{ .mmx, .@"3dnow" })) break :blk 64; | 20 | if (std.Target.x86.featureSetHasAny(cpu.features, .{ .mmx, .@"3dnow" })) break :blk 64; |
| 21 | } else if (cpu.arch.isArmOrThumb()) { | 21 | } else if (cpu.arch.isArm()) { |
| 22 | if (std.Target.arm.featureSetHas(cpu.features, .neon)) break :blk 128; | 22 | if (std.Target.arm.featureSetHas(cpu.features, .neon)) break :blk 128; |
| 23 | } else if (cpu.arch.isAARCH64()) { | 23 | } else if (cpu.arch.isAARCH64()) { |
| 24 | // SVE allows up to 2048 bits in the specification, as of 2022 the most powerful machine has implemented 512-bit | 24 | // SVE allows up to 2048 bits in the specification, as of 2022 the most powerful machine has implemented 512-bit |
lib/std/start.zig+1-1| ... | @@ -495,7 +495,7 @@ fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn { | ... | @@ -495,7 +495,7 @@ fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn { |
| 495 | // ARMv6 targets (and earlier) have no support for TLS in hardware. | 495 | // ARMv6 targets (and earlier) have no support for TLS in hardware. |
| 496 | // FIXME: Elide the check for targets >= ARMv7 when the target feature API | 496 | // FIXME: Elide the check for targets >= ARMv7 when the target feature API |
| 497 | // becomes less verbose (and more usable). | 497 | // becomes less verbose (and more usable). |
| 498 | if (comptime native_arch.isArmOrThumb()) { | 498 | if (comptime native_arch.isArm()) { |
| 499 | if (at_hwcap & std.os.linux.HWCAP.TLS == 0) { | 499 | if (at_hwcap & std.os.linux.HWCAP.TLS == 0) { |
| 500 | // FIXME: Make __aeabi_read_tp call the kernel helper kuser_get_tls | 500 | // FIXME: Make __aeabi_read_tp call the kernel helper kuser_get_tls |
| 501 | // For the time being use a simple trap instead of a @panic call to | 501 | // For the time being use a simple trap instead of a @panic call to |
lib/std/zig/system.zig+1-1| ... | @@ -401,7 +401,7 @@ pub fn resolveTargetQuery(query: Target.Query) DetectError!Target { | ... | @@ -401,7 +401,7 @@ pub fn resolveTargetQuery(query: Target.Query) DetectError!Target { |
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | // https://github.com/llvm/llvm-project/issues/105978 | 403 | // https://github.com/llvm/llvm-project/issues/105978 |
| 404 | if (result.cpu.arch.isArmOrThumb() and result.floatAbi() == .soft) { | 404 | if (result.cpu.arch.isArm() and result.floatAbi() == .soft) { |
| 405 | result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2)); | 405 | result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2)); |
| 406 | } | 406 | } |
| 407 | 407 |
src/Compilation.zig+7-5| ... | @@ -1795,8 +1795,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil | ... | @@ -1795,8 +1795,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil |
| 1795 | .{ .glibc_crt_file = .crtn_o }, | 1795 | .{ .glibc_crt_file = .crtn_o }, |
| 1796 | }); | 1796 | }); |
| 1797 | } | 1797 | } |
| 1798 | if (!is_dyn_lib) { | 1798 | if (glibc.needsCrt0(comp.config.output_mode)) |f| { |
| 1799 | try comp.queueJob(.{ .glibc_crt_file = .scrt1_o }); | 1799 | try comp.queueJobs(&.{.{ .glibc_crt_file = f }}); |
| 1800 | } | 1800 | } |
| 1801 | try comp.queueJobs(&[_]Job{ | 1801 | try comp.queueJobs(&[_]Job{ |
| 1802 | .{ .glibc_shared_objects = {} }, | 1802 | .{ .glibc_shared_objects = {} }, |
| ... | @@ -5628,8 +5628,8 @@ pub fn addCCArgs( | ... | @@ -5628,8 +5628,8 @@ pub fn addCCArgs( |
| 5628 | try argv.append("-mthumb"); | 5628 | try argv.append("-mthumb"); |
| 5629 | } | 5629 | } |
| 5630 | 5630 | ||
| 5631 | if (target_util.supports_fpic(target) and mod.pic) { | 5631 | if (target_util.supports_fpic(target)) { |
| 5632 | try argv.append("-fPIC"); | 5632 | try argv.append(if (mod.pic) "-fPIC" else "-fno-PIC"); |
| 5633 | } | 5633 | } |
| 5634 | 5634 | ||
| 5635 | try argv.ensureUnusedCapacity(2); | 5635 | try argv.ensureUnusedCapacity(2); |
| ... | @@ -6266,6 +6266,7 @@ pub fn build_crt_file( | ... | @@ -6266,6 +6266,7 @@ pub fn build_crt_file( |
| 6266 | comp: *Compilation, | 6266 | comp: *Compilation, |
| 6267 | root_name: []const u8, | 6267 | root_name: []const u8, |
| 6268 | output_mode: std.builtin.OutputMode, | 6268 | output_mode: std.builtin.OutputMode, |
| 6269 | pic: ?bool, | ||
| 6269 | misc_task_tag: MiscTask, | 6270 | misc_task_tag: MiscTask, |
| 6270 | prog_node: std.Progress.Node, | 6271 | prog_node: std.Progress.Node, |
| 6271 | /// These elements have to get mutated to add the owner module after it is | 6272 | /// These elements have to get mutated to add the owner module after it is |
| ... | @@ -6318,7 +6319,8 @@ pub fn build_crt_file( | ... | @@ -6318,7 +6319,8 @@ pub fn build_crt_file( |
| 6318 | .omit_frame_pointer = comp.root_mod.omit_frame_pointer, | 6319 | .omit_frame_pointer = comp.root_mod.omit_frame_pointer, |
| 6319 | .valgrind = false, | 6320 | .valgrind = false, |
| 6320 | .unwind_tables = false, | 6321 | .unwind_tables = false, |
| 6321 | .pic = comp.root_mod.pic, | 6322 | // Some CRT objects (rcrt1.o, Scrt1.o) are opinionated about PIC. |
| 6323 | .pic = pic orelse comp.root_mod.pic, | ||
| 6322 | .optimize_mode = comp.compilerRtOptMode(), | 6324 | .optimize_mode = comp.compilerRtOptMode(), |
| 6323 | .structured_cfg = comp.root_mod.structured_cfg, | 6325 | .structured_cfg = comp.root_mod.structured_cfg, |
| 6324 | }, | 6326 | }, |
src/codegen/c.zig+1-1| ... | @@ -5190,7 +5190,7 @@ fn asmInputNeedsLocal(f: *Function, constraint: []const u8, value: CValue) bool | ... | @@ -5190,7 +5190,7 @@ fn asmInputNeedsLocal(f: *Function, constraint: []const u8, value: CValue) bool |
| 5190 | return switch (constraint[0]) { | 5190 | return switch (constraint[0]) { |
| 5191 | '{' => true, | 5191 | '{' => true, |
| 5192 | 'i', 'r' => false, | 5192 | 'i', 'r' => false, |
| 5193 | 'I' => !target.cpu.arch.isArmOrThumb(), | 5193 | 'I' => !target.cpu.arch.isArm(), |
| 5194 | else => switch (value) { | 5194 | else => switch (value) { |
| 5195 | .constant => |val| switch (dg.pt.zcu.intern_pool.indexToKey(val.toIntern())) { | 5195 | .constant => |val| switch (dg.pt.zcu.intern_pool.indexToKey(val.toIntern())) { |
| 5196 | .ptr => |ptr| if (ptr.byte_offset == 0) switch (ptr.base_addr) { | 5196 | .ptr => |ptr| if (ptr.byte_offset == 0) switch (ptr.base_addr) { |
src/codegen/llvm.zig+3-3| ... | @@ -496,7 +496,7 @@ const DataLayoutBuilder = struct { | ... | @@ -496,7 +496,7 @@ const DataLayoutBuilder = struct { |
| 496 | if (idx != size) try writer.print(":{d}", .{idx}); | 496 | if (idx != size) try writer.print(":{d}", .{idx}); |
| 497 | } | 497 | } |
| 498 | } | 498 | } |
| 499 | if (self.target.cpu.arch.isArmOrThumb()) | 499 | if (self.target.cpu.arch.isArm()) |
| 500 | try writer.writeAll("-Fi8") // for thumb interwork | 500 | try writer.writeAll("-Fi8") // for thumb interwork |
| 501 | else if (self.target.cpu.arch == .powerpc64 and | 501 | else if (self.target.cpu.arch == .powerpc64 and |
| 502 | self.target.os.tag != .freebsd and | 502 | self.target.os.tag != .freebsd and |
| ... | @@ -763,7 +763,7 @@ const DataLayoutBuilder = struct { | ... | @@ -763,7 +763,7 @@ const DataLayoutBuilder = struct { |
| 763 | else => {}, | 763 | else => {}, |
| 764 | } | 764 | } |
| 765 | }, | 765 | }, |
| 766 | .vector => if (self.target.cpu.arch.isArmOrThumb()) { | 766 | .vector => if (self.target.cpu.arch.isArm()) { |
| 767 | switch (size) { | 767 | switch (size) { |
| 768 | 128 => abi = 64, | 768 | 128 => abi = 64, |
| 769 | else => {}, | 769 | else => {}, |
| ... | @@ -829,7 +829,7 @@ const DataLayoutBuilder = struct { | ... | @@ -829,7 +829,7 @@ const DataLayoutBuilder = struct { |
| 829 | else => {}, | 829 | else => {}, |
| 830 | }, | 830 | }, |
| 831 | .aggregate => if (self.target.os.tag == .uefi or self.target.os.tag == .windows or | 831 | .aggregate => if (self.target.os.tag == .uefi or self.target.os.tag == .windows or |
| 832 | self.target.cpu.arch.isArmOrThumb()) | 832 | self.target.cpu.arch.isArm()) |
| 833 | { | 833 | { |
| 834 | pref = @min(pref, self.target.ptrBitWidth()); | 834 | pref = @min(pref, self.target.ptrBitWidth()); |
| 835 | } else switch (self.target.cpu.arch) { | 835 | } else switch (self.target.cpu.arch) { |
src/codegen/llvm/Builder.zig+4-4| ... | @@ -9831,9 +9831,9 @@ pub fn printUnbuffered( | ... | @@ -9831,9 +9831,9 @@ pub fn printUnbuffered( |
| 9831 | }); | 9831 | }); |
| 9832 | switch (extra.weights) { | 9832 | switch (extra.weights) { |
| 9833 | .none => {}, | 9833 | .none => {}, |
| 9834 | .unpredictable => try writer.writeAll(", !unpredictable !{}"), | 9834 | .unpredictable => try writer.writeAll("!unpredictable !{}"), |
| 9835 | _ => try writer.print("{}", .{ | 9835 | _ => try writer.print("{}", .{ |
| 9836 | try metadata_formatter.fmt(", !prof ", @as(Metadata, @enumFromInt(@intFromEnum(extra.weights)))), | 9836 | try metadata_formatter.fmt("!prof ", @as(Metadata, @enumFromInt(@intFromEnum(extra.weights)))), |
| 9837 | }), | 9837 | }), |
| 9838 | } | 9838 | } |
| 9839 | }, | 9839 | }, |
| ... | @@ -10112,9 +10112,9 @@ pub fn printUnbuffered( | ... | @@ -10112,9 +10112,9 @@ pub fn printUnbuffered( |
| 10112 | try writer.writeAll(" ]"); | 10112 | try writer.writeAll(" ]"); |
| 10113 | switch (extra.data.weights) { | 10113 | switch (extra.data.weights) { |
| 10114 | .none => {}, | 10114 | .none => {}, |
| 10115 | .unpredictable => try writer.writeAll(", !unpredictable !{}"), | 10115 | .unpredictable => try writer.writeAll("!unpredictable !{}"), |
| 10116 | _ => try writer.print("{}", .{ | 10116 | _ => try writer.print("{}", .{ |
| 10117 | try metadata_formatter.fmt(", !prof ", @as(Metadata, @enumFromInt(@intFromEnum(extra.data.weights)))), | 10117 | try metadata_formatter.fmt("!prof ", @as(Metadata, @enumFromInt(@intFromEnum(extra.data.weights)))), |
| 10118 | }), | 10118 | }), |
| 10119 | } | 10119 | } |
| 10120 | }, | 10120 | }, |
src/glibc.zig+13-6| ... | @@ -221,7 +221,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -221,7 +221,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 221 | .owner = comp.root_mod, | 221 | .owner = comp.root_mod, |
| 222 | }, | 222 | }, |
| 223 | }; | 223 | }; |
| 224 | return comp.build_crt_file("crti", .Obj, .@"glibc crti.o", prog_node, &files); | 224 | return comp.build_crt_file("crti", .Obj, null, .@"glibc crti.o", prog_node, &files); |
| 225 | }, | 225 | }, |
| 226 | .crtn_o => { | 226 | .crtn_o => { |
| 227 | var args = std.ArrayList([]const u8).init(arena); | 227 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -242,7 +242,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -242,7 +242,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 242 | .owner = undefined, | 242 | .owner = undefined, |
| 243 | }, | 243 | }, |
| 244 | }; | 244 | }; |
| 245 | return comp.build_crt_file("crtn", .Obj, .@"glibc crtn.o", prog_node, &files); | 245 | return comp.build_crt_file("crtn", .Obj, null, .@"glibc crtn.o", prog_node, &files); |
| 246 | }, | 246 | }, |
| 247 | .scrt1_o => { | 247 | .scrt1_o => { |
| 248 | const start_o: Compilation.CSourceFile = blk: { | 248 | const start_o: Compilation.CSourceFile = blk: { |
| ... | @@ -295,7 +295,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -295,7 +295,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 295 | }; | 295 | }; |
| 296 | var files = [_]Compilation.CSourceFile{ start_o, abi_note_o, init_o }; | 296 | var files = [_]Compilation.CSourceFile{ start_o, abi_note_o, init_o }; |
| 297 | const basename = if (comp.config.output_mode == .Exe and !comp.config.pie) "crt1" else "Scrt1"; | 297 | const basename = if (comp.config.output_mode == .Exe and !comp.config.pie) "crt1" else "Scrt1"; |
| 298 | return comp.build_crt_file(basename, .Obj, .@"glibc Scrt1.o", prog_node, &files); | 298 | return comp.build_crt_file(basename, .Obj, null, .@"glibc Scrt1.o", prog_node, &files); |
| 299 | }, | 299 | }, |
| 300 | .libc_nonshared_a => { | 300 | .libc_nonshared_a => { |
| 301 | const s = path.sep_str; | 301 | const s = path.sep_str; |
| ... | @@ -413,7 +413,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -413,7 +413,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 413 | files_index += 1; | 413 | files_index += 1; |
| 414 | } | 414 | } |
| 415 | const files = files_buf[0..files_index]; | 415 | const files = files_buf[0..files_index]; |
| 416 | return comp.build_crt_file("c_nonshared", .Lib, .@"glibc libc_nonshared.a", prog_node, files); | 416 | return comp.build_crt_file("c_nonshared", .Lib, null, .@"glibc libc_nonshared.a", prog_node, files); |
| 417 | }, | 417 | }, |
| 418 | } | 418 | } |
| 419 | } | 419 | } |
| ... | @@ -440,7 +440,7 @@ fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![ | ... | @@ -440,7 +440,7 @@ fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![ |
| 440 | try result.appendSlice("sparc" ++ s ++ "sparc32"); | 440 | try result.appendSlice("sparc" ++ s ++ "sparc32"); |
| 441 | } | 441 | } |
| 442 | } | 442 | } |
| 443 | } else if (arch.isARM()) { | 443 | } else if (arch.isArm()) { |
| 444 | try result.appendSlice("arm"); | 444 | try result.appendSlice("arm"); |
| 445 | } else if (arch.isMIPS()) { | 445 | } else if (arch.isMIPS()) { |
| 446 | if (!mem.eql(u8, basename, "crti.S") and !mem.eql(u8, basename, "crtn.S")) { | 446 | if (!mem.eql(u8, basename, "crti.S") and !mem.eql(u8, basename, "crtn.S")) { |
| ... | @@ -604,7 +604,7 @@ fn add_include_dirs_arch( | ... | @@ -604,7 +604,7 @@ fn add_include_dirs_arch( |
| 604 | try args.append("-I"); | 604 | try args.append("-I"); |
| 605 | try args.append(try path.join(arena, &[_][]const u8{ dir, "x86" })); | 605 | try args.append(try path.join(arena, &[_][]const u8{ dir, "x86" })); |
| 606 | } | 606 | } |
| 607 | } else if (arch.isARM()) { | 607 | } else if (arch.isArm()) { |
| 608 | if (opt_nptl) |nptl| { | 608 | if (opt_nptl) |nptl| { |
| 609 | try args.append("-I"); | 609 | try args.append("-I"); |
| 610 | try args.append(try path.join(arena, &[_][]const u8{ dir, "arm", nptl })); | 610 | try args.append(try path.join(arena, &[_][]const u8{ dir, "arm", nptl })); |
| ... | @@ -1359,3 +1359,10 @@ pub fn needsCrtiCrtn(target: std.Target) bool { | ... | @@ -1359,3 +1359,10 @@ pub fn needsCrtiCrtn(target: std.Target) bool { |
| 1359 | else => true, | 1359 | else => true, |
| 1360 | }; | 1360 | }; |
| 1361 | } | 1361 | } |
| 1362 | |||
| 1363 | pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile { | ||
| 1364 | return switch (output_mode) { | ||
| 1365 | .Obj, .Lib => null, | ||
| 1366 | .Exe => .scrt1_o, | ||
| 1367 | }; | ||
| 1368 | } |
src/libunwind.zig+1-1| ... | @@ -136,7 +136,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr | ... | @@ -136,7 +136,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr |
| 136 | if (!comp.config.any_non_single_threaded) { | 136 | if (!comp.config.any_non_single_threaded) { |
| 137 | try cflags.append("-D_LIBUNWIND_HAS_NO_THREADS"); | 137 | try cflags.append("-D_LIBUNWIND_HAS_NO_THREADS"); |
| 138 | } | 138 | } |
| 139 | if (target.cpu.arch.isArmOrThumb() and target.abi.floatAbi() == .hard) { | 139 | if (target.cpu.arch.isArm() and target.abi.floatAbi() == .hard) { |
| 140 | try cflags.append("-DCOMPILER_RT_ARMHF_TARGET"); | 140 | try cflags.append("-DCOMPILER_RT_ARMHF_TARGET"); |
| 141 | } | 141 | } |
| 142 | try cflags.append("-Wno-bitwise-conditional-parentheses"); | 142 | try cflags.append("-Wno-bitwise-conditional-parentheses"); |
src/link/Coff.zig+4-6| ... | @@ -1865,12 +1865,10 @@ fn linkWithLLD(coff: *Coff, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: | ... | @@ -1865,12 +1865,10 @@ fn linkWithLLD(coff: *Coff, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: |
| 1865 | try argv.append("-MACHINE:X86"); | 1865 | try argv.append("-MACHINE:X86"); |
| 1866 | } else if (target.cpu.arch == .x86_64) { | 1866 | } else if (target.cpu.arch == .x86_64) { |
| 1867 | try argv.append("-MACHINE:X64"); | 1867 | try argv.append("-MACHINE:X64"); |
| 1868 | } else if (target.cpu.arch.isARM()) { | 1868 | } else if (target.cpu.arch == .thumb) { |
| 1869 | if (target.ptrBitWidth() == 32) { | 1869 | try argv.append("-MACHINE:ARM"); |
| 1870 | try argv.append("-MACHINE:ARM"); | 1870 | } else if (target.cpu.arch == .aarch64) { |
| 1871 | } else { | 1871 | try argv.append("-MACHINE:ARM64"); |
| 1872 | try argv.append("-MACHINE:ARM64"); | ||
| 1873 | } | ||
| 1874 | } | 1872 | } |
| 1875 | 1873 | ||
| 1876 | for (comp.force_undefined_symbols.keys()) |symbol| { | 1874 | for (comp.force_undefined_symbols.keys()) |symbol| { |
src/link/Elf.zig+1-1| ... | @@ -1823,7 +1823,7 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s | ... | @@ -1823,7 +1823,7 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 1823 | } | 1823 | } |
| 1824 | 1824 | ||
| 1825 | if (link_mode == .static) { | 1825 | if (link_mode == .static) { |
| 1826 | if (target.cpu.arch.isArmOrThumb()) { | 1826 | if (target.cpu.arch.isArm()) { |
| 1827 | try argv.append("-Bstatic"); | 1827 | try argv.append("-Bstatic"); |
| 1828 | } else { | 1828 | } else { |
| 1829 | try argv.append("-static"); | 1829 | try argv.append("-static"); |
src/mingw.zig+3-3| ... | @@ -41,7 +41,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -41,7 +41,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 41 | .owner = undefined, | 41 | .owner = undefined, |
| 42 | }, | 42 | }, |
| 43 | }; | 43 | }; |
| 44 | return comp.build_crt_file("crt2", .Obj, .@"mingw-w64 crt2.o", prog_node, &files); | 44 | return comp.build_crt_file("crt2", .Obj, null, .@"mingw-w64 crt2.o", prog_node, &files); |
| 45 | }, | 45 | }, |
| 46 | 46 | ||
| 47 | .dllcrt2_o => { | 47 | .dllcrt2_o => { |
| ... | @@ -56,7 +56,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -56,7 +56,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 56 | .owner = undefined, | 56 | .owner = undefined, |
| 57 | }, | 57 | }, |
| 58 | }; | 58 | }; |
| 59 | return comp.build_crt_file("dllcrt2", .Obj, .@"mingw-w64 dllcrt2.o", prog_node, &files); | 59 | return comp.build_crt_file("dllcrt2", .Obj, null, .@"mingw-w64 dllcrt2.o", prog_node, &files); |
| 60 | }, | 60 | }, |
| 61 | 61 | ||
| 62 | .mingw32_lib => { | 62 | .mingw32_lib => { |
| ... | @@ -118,7 +118,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -118,7 +118,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 118 | } else { | 118 | } else { |
| 119 | @panic("unsupported arch"); | 119 | @panic("unsupported arch"); |
| 120 | } | 120 | } |
| 121 | return comp.build_crt_file("mingw32", .Lib, .@"mingw-w64 mingw32.lib", prog_node, c_source_files.items); | 121 | return comp.build_crt_file("mingw32", .Lib, null, .@"mingw-w64 mingw32.lib", prog_node, c_source_files.items); |
| 122 | }, | 122 | }, |
| 123 | } | 123 | } |
| 124 | } | 124 | } |
src/musl.zig+6-8| ... | @@ -38,7 +38,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -38,7 +38,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 38 | .owner = undefined, | 38 | .owner = undefined, |
| 39 | }, | 39 | }, |
| 40 | }; | 40 | }; |
| 41 | return comp.build_crt_file("crti", .Obj, .@"musl crti.o", prog_node, &files); | 41 | return comp.build_crt_file("crti", .Obj, null, .@"musl crti.o", prog_node, &files); |
| 42 | }, | 42 | }, |
| 43 | .crtn_o => { | 43 | .crtn_o => { |
| 44 | var args = std.ArrayList([]const u8).init(arena); | 44 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -50,7 +50,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -50,7 +50,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 50 | .owner = undefined, | 50 | .owner = undefined, |
| 51 | }, | 51 | }, |
| 52 | }; | 52 | }; |
| 53 | return comp.build_crt_file("crtn", .Obj, .@"musl crtn.o", prog_node, &files); | 53 | return comp.build_crt_file("crtn", .Obj, null, .@"musl crtn.o", prog_node, &files); |
| 54 | }, | 54 | }, |
| 55 | .crt1_o => { | 55 | .crt1_o => { |
| 56 | var args = std.ArrayList([]const u8).init(arena); | 56 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -68,13 +68,12 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -68,13 +68,12 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 68 | .owner = undefined, | 68 | .owner = undefined, |
| 69 | }, | 69 | }, |
| 70 | }; | 70 | }; |
| 71 | return comp.build_crt_file("crt1", .Obj, .@"musl crt1.o", prog_node, &files); | 71 | return comp.build_crt_file("crt1", .Obj, null, .@"musl crt1.o", prog_node, &files); |
| 72 | }, | 72 | }, |
| 73 | .rcrt1_o => { | 73 | .rcrt1_o => { |
| 74 | var args = std.ArrayList([]const u8).init(arena); | 74 | var args = std.ArrayList([]const u8).init(arena); |
| 75 | try addCcArgs(comp, arena, &args, false); | 75 | try addCcArgs(comp, arena, &args, false); |
| 76 | try args.appendSlice(&[_][]const u8{ | 76 | try args.appendSlice(&[_][]const u8{ |
| 77 | "-fPIC", | ||
| 78 | "-fno-stack-protector", | 77 | "-fno-stack-protector", |
| 79 | "-DCRT", | 78 | "-DCRT", |
| 80 | }); | 79 | }); |
| ... | @@ -87,13 +86,12 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -87,13 +86,12 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 87 | .owner = undefined, | 86 | .owner = undefined, |
| 88 | }, | 87 | }, |
| 89 | }; | 88 | }; |
| 90 | return comp.build_crt_file("rcrt1", .Obj, .@"musl rcrt1.o", prog_node, &files); | 89 | return comp.build_crt_file("rcrt1", .Obj, true, .@"musl rcrt1.o", prog_node, &files); |
| 91 | }, | 90 | }, |
| 92 | .scrt1_o => { | 91 | .scrt1_o => { |
| 93 | var args = std.ArrayList([]const u8).init(arena); | 92 | var args = std.ArrayList([]const u8).init(arena); |
| 94 | try addCcArgs(comp, arena, &args, false); | 93 | try addCcArgs(comp, arena, &args, false); |
| 95 | try args.appendSlice(&[_][]const u8{ | 94 | try args.appendSlice(&[_][]const u8{ |
| 96 | "-fPIC", | ||
| 97 | "-fno-stack-protector", | 95 | "-fno-stack-protector", |
| 98 | "-DCRT", | 96 | "-DCRT", |
| 99 | }); | 97 | }); |
| ... | @@ -106,7 +104,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -106,7 +104,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 106 | .owner = undefined, | 104 | .owner = undefined, |
| 107 | }, | 105 | }, |
| 108 | }; | 106 | }; |
| 109 | return comp.build_crt_file("Scrt1", .Obj, .@"musl Scrt1.o", prog_node, &files); | 107 | return comp.build_crt_file("Scrt1", .Obj, true, .@"musl Scrt1.o", prog_node, &files); |
| 110 | }, | 108 | }, |
| 111 | .libc_a => { | 109 | .libc_a => { |
| 112 | // When there is a src/<arch>/foo.* then it should substitute for src/foo.* | 110 | // When there is a src/<arch>/foo.* then it should substitute for src/foo.* |
| ... | @@ -199,7 +197,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -199,7 +197,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 199 | .owner = undefined, | 197 | .owner = undefined, |
| 200 | }; | 198 | }; |
| 201 | } | 199 | } |
| 202 | return comp.build_crt_file("c", .Lib, .@"musl libc.a", prog_node, c_source_files.items); | 200 | return comp.build_crt_file("c", .Lib, null, .@"musl libc.a", prog_node, c_source_files.items); |
| 203 | }, | 201 | }, |
| 204 | .libc_so => { | 202 | .libc_so => { |
| 205 | const optimize_mode = comp.compilerRtOptMode(); | 203 | const optimize_mode = comp.compilerRtOptMode(); |
src/wasi_libc.zig+7-7| ... | @@ -81,7 +81,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -81,7 +81,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 81 | .owner = undefined, | 81 | .owner = undefined, |
| 82 | }, | 82 | }, |
| 83 | }; | 83 | }; |
| 84 | return comp.build_crt_file("crt1-reactor", .Obj, .@"wasi crt1-reactor.o", prog_node, &files); | 84 | return comp.build_crt_file("crt1-reactor", .Obj, null, .@"wasi crt1-reactor.o", prog_node, &files); |
| 85 | }, | 85 | }, |
| 86 | .crt1_command_o => { | 86 | .crt1_command_o => { |
| 87 | var args = std.ArrayList([]const u8).init(arena); | 87 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -96,7 +96,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -96,7 +96,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 96 | .owner = undefined, | 96 | .owner = undefined, |
| 97 | }, | 97 | }, |
| 98 | }; | 98 | }; |
| 99 | return comp.build_crt_file("crt1-command", .Obj, .@"wasi crt1-command.o", prog_node, &files); | 99 | return comp.build_crt_file("crt1-command", .Obj, null, .@"wasi crt1-command.o", prog_node, &files); |
| 100 | }, | 100 | }, |
| 101 | .libc_a => { | 101 | .libc_a => { |
| 102 | var libc_sources = std.ArrayList(Compilation.CSourceFile).init(arena); | 102 | var libc_sources = std.ArrayList(Compilation.CSourceFile).init(arena); |
| ... | @@ -150,7 +150,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -150,7 +150,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 150 | } | 150 | } |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | try comp.build_crt_file("c", .Lib, .@"wasi libc.a", prog_node, libc_sources.items); | 153 | try comp.build_crt_file("c", .Lib, null, .@"wasi libc.a", prog_node, libc_sources.items); |
| 154 | }, | 154 | }, |
| 155 | .libwasi_emulated_process_clocks_a => { | 155 | .libwasi_emulated_process_clocks_a => { |
| 156 | var args = std.ArrayList([]const u8).init(arena); | 156 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -167,7 +167,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -167,7 +167,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 167 | .owner = undefined, | 167 | .owner = undefined, |
| 168 | }); | 168 | }); |
| 169 | } | 169 | } |
| 170 | try comp.build_crt_file("wasi-emulated-process-clocks", .Lib, .@"libwasi-emulated-process-clocks.a", prog_node, emu_clocks_sources.items); | 170 | try comp.build_crt_file("wasi-emulated-process-clocks", .Lib, null, .@"libwasi-emulated-process-clocks.a", prog_node, emu_clocks_sources.items); |
| 171 | }, | 171 | }, |
| 172 | .libwasi_emulated_getpid_a => { | 172 | .libwasi_emulated_getpid_a => { |
| 173 | var args = std.ArrayList([]const u8).init(arena); | 173 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -184,7 +184,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -184,7 +184,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 184 | .owner = undefined, | 184 | .owner = undefined, |
| 185 | }); | 185 | }); |
| 186 | } | 186 | } |
| 187 | try comp.build_crt_file("wasi-emulated-getpid", .Lib, .@"libwasi-emulated-getpid.a", prog_node, emu_getpid_sources.items); | 187 | try comp.build_crt_file("wasi-emulated-getpid", .Lib, null, .@"libwasi-emulated-getpid.a", prog_node, emu_getpid_sources.items); |
| 188 | }, | 188 | }, |
| 189 | .libwasi_emulated_mman_a => { | 189 | .libwasi_emulated_mman_a => { |
| 190 | var args = std.ArrayList([]const u8).init(arena); | 190 | var args = std.ArrayList([]const u8).init(arena); |
| ... | @@ -201,7 +201,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -201,7 +201,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 201 | .owner = undefined, | 201 | .owner = undefined, |
| 202 | }); | 202 | }); |
| 203 | } | 203 | } |
| 204 | try comp.build_crt_file("wasi-emulated-mman", .Lib, .@"libwasi-emulated-mman.a", prog_node, emu_mman_sources.items); | 204 | try comp.build_crt_file("wasi-emulated-mman", .Lib, null, .@"libwasi-emulated-mman.a", prog_node, emu_mman_sources.items); |
| 205 | }, | 205 | }, |
| 206 | .libwasi_emulated_signal_a => { | 206 | .libwasi_emulated_signal_a => { |
| 207 | var emu_signal_sources = std.ArrayList(Compilation.CSourceFile).init(arena); | 207 | var emu_signal_sources = std.ArrayList(Compilation.CSourceFile).init(arena); |
| ... | @@ -238,7 +238,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre | ... | @@ -238,7 +238,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 238 | } | 238 | } |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | try comp.build_crt_file("wasi-emulated-signal", .Lib, .@"libwasi-emulated-signal.a", prog_node, emu_signal_sources.items); | 241 | try comp.build_crt_file("wasi-emulated-signal", .Lib, null, .@"libwasi-emulated-signal.a", prog_node, emu_signal_sources.items); |
| 242 | }, | 242 | }, |
| 243 | } | 243 | } |
| 244 | } | 244 | } |
test/behavior/cast.zig+2-2| ... | @@ -124,7 +124,7 @@ test "@floatFromInt(f80)" { | ... | @@ -124,7 +124,7 @@ test "@floatFromInt(f80)" { |
| 124 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 124 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 125 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 125 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 126 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 126 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 127 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 127 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 128 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 128 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 129 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 129 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 130 | 130 | ||
| ... | @@ -1362,7 +1362,7 @@ test "cast f16 to wider types" { | ... | @@ -1362,7 +1362,7 @@ test "cast f16 to wider types" { |
| 1362 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1362 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1363 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1363 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1364 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1364 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1365 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1365 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1366 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1366 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1367 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1367 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1368 | 1368 |
test/behavior/eval.zig+1-1| ... | @@ -522,7 +522,7 @@ test "runtime 128 bit integer division" { | ... | @@ -522,7 +522,7 @@ test "runtime 128 bit integer division" { |
| 522 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 522 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 523 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 523 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 524 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 524 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 525 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 525 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 526 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 526 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 527 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 527 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 528 | 528 |
test/behavior/floatop.zig+7-7| ... | @@ -126,7 +126,7 @@ test "cmp f16" { | ... | @@ -126,7 +126,7 @@ test "cmp f16" { |
| 126 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 126 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 127 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 127 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 128 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 128 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 129 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 129 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 130 | 130 | ||
| 131 | try testCmp(f16); | 131 | try testCmp(f16); |
| 132 | try comptime testCmp(f16); | 132 | try comptime testCmp(f16); |
| ... | @@ -135,7 +135,7 @@ test "cmp f16" { | ... | @@ -135,7 +135,7 @@ test "cmp f16" { |
| 135 | test "cmp f32/f64" { | 135 | test "cmp f32/f64" { |
| 136 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 136 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 137 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 137 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 138 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 138 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 139 | 139 | ||
| 140 | try testCmp(f32); | 140 | try testCmp(f32); |
| 141 | try comptime testCmp(f32); | 141 | try comptime testCmp(f32); |
| ... | @@ -146,7 +146,7 @@ test "cmp f32/f64" { | ... | @@ -146,7 +146,7 @@ test "cmp f32/f64" { |
| 146 | test "cmp f128" { | 146 | test "cmp f128" { |
| 147 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 147 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 148 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 148 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 149 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 149 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 150 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 150 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 151 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 151 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 152 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 152 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| ... | @@ -1009,7 +1009,7 @@ test "@abs f32/f64" { | ... | @@ -1009,7 +1009,7 @@ test "@abs f32/f64" { |
| 1009 | test "@abs f80/f128/c_longdouble" { | 1009 | test "@abs f80/f128/c_longdouble" { |
| 1010 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1010 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1011 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1011 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1012 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1012 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1013 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1013 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1014 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1014 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1015 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1015 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| ... | @@ -1134,7 +1134,7 @@ test "@floor f32/f64" { | ... | @@ -1134,7 +1134,7 @@ test "@floor f32/f64" { |
| 1134 | test "@floor f80/f128/c_longdouble" { | 1134 | test "@floor f80/f128/c_longdouble" { |
| 1135 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1135 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1136 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1136 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1137 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1137 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1138 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1138 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1139 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1139 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1140 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1140 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| ... | @@ -1232,7 +1232,7 @@ test "@ceil f32/f64" { | ... | @@ -1232,7 +1232,7 @@ test "@ceil f32/f64" { |
| 1232 | test "@ceil f80/f128/c_longdouble" { | 1232 | test "@ceil f80/f128/c_longdouble" { |
| 1233 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1233 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1234 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1234 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1235 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1235 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1236 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1236 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1237 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1237 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1238 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1238 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| ... | @@ -1330,7 +1330,7 @@ test "@trunc f32/f64" { | ... | @@ -1330,7 +1330,7 @@ test "@trunc f32/f64" { |
| 1330 | test "@trunc f80/f128/c_longdouble" { | 1330 | test "@trunc f80/f128/c_longdouble" { |
| 1331 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1331 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1332 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1332 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1333 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1333 | if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1334 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1334 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1335 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1335 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1336 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1336 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
test/behavior/math.zig+7-7| ... | @@ -780,7 +780,7 @@ test "128-bit multiplication" { | ... | @@ -780,7 +780,7 @@ test "128-bit multiplication" { |
| 780 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 780 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 781 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 781 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 782 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 782 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 783 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 783 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 784 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 784 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 785 | 785 | ||
| 786 | { | 786 | { |
| ... | @@ -1369,7 +1369,7 @@ test "remainder division" { | ... | @@ -1369,7 +1369,7 @@ test "remainder division" { |
| 1369 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1369 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1370 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1370 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1371 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1371 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1372 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1372 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1373 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1373 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1374 | 1374 | ||
| 1375 | if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .windows) { | 1375 | if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .windows) { |
| ... | @@ -1522,7 +1522,7 @@ test "@round f80" { | ... | @@ -1522,7 +1522,7 @@ test "@round f80" { |
| 1522 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1522 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1523 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1523 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1524 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1524 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1525 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1525 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1526 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1526 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1527 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1527 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1528 | 1528 | ||
| ... | @@ -1535,7 +1535,7 @@ test "@round f128" { | ... | @@ -1535,7 +1535,7 @@ test "@round f128" { |
| 1535 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1535 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1536 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1536 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1537 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1537 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1538 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 1538 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 1539 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1539 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1540 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1540 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1541 | 1541 | ||
| ... | @@ -1579,7 +1579,7 @@ test "NaN comparison" { | ... | @@ -1579,7 +1579,7 @@ test "NaN comparison" { |
| 1579 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1579 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1580 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1580 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1581 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1581 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1582 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 1582 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 1583 | 1583 | ||
| 1584 | try testNanEqNan(f16); | 1584 | try testNanEqNan(f16); |
| 1585 | try testNanEqNan(f32); | 1585 | try testNanEqNan(f32); |
| ... | @@ -1735,7 +1735,7 @@ test "runtime comparison to NaN is comptime-known" { | ... | @@ -1735,7 +1735,7 @@ test "runtime comparison to NaN is comptime-known" { |
| 1735 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1735 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1736 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1736 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1737 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1737 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1738 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 1738 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 1739 | 1739 | ||
| 1740 | const S = struct { | 1740 | const S = struct { |
| 1741 | fn doTheTest(comptime F: type, x: F) void { | 1741 | fn doTheTest(comptime F: type, x: F) void { |
| ... | @@ -1766,7 +1766,7 @@ test "runtime int comparison to inf is comptime-known" { | ... | @@ -1766,7 +1766,7 @@ test "runtime int comparison to inf is comptime-known" { |
| 1766 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1766 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1767 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1767 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1768 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1768 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1769 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 1769 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 1770 | 1770 | ||
| 1771 | const S = struct { | 1771 | const S = struct { |
| 1772 | fn doTheTest(comptime F: type, x: u32) void { | 1772 | fn doTheTest(comptime F: type, x: u32) void { |
test/behavior/maximum_minimum.zig+1-1| ... | @@ -122,7 +122,7 @@ test "@min/max for floats" { | ... | @@ -122,7 +122,7 @@ test "@min/max for floats" { |
| 122 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 122 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 123 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 123 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 124 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 124 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 125 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 125 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 126 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 126 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 127 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 127 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 128 | 128 |
test/behavior/muladd.zig+4-4| ... | @@ -58,7 +58,7 @@ test "@mulAdd f80" { | ... | @@ -58,7 +58,7 @@ test "@mulAdd f80" { |
| 58 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 58 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 59 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 59 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 60 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 60 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 61 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 61 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 62 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 62 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 63 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 63 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 64 | 64 | ||
| ... | @@ -79,7 +79,7 @@ test "@mulAdd f128" { | ... | @@ -79,7 +79,7 @@ test "@mulAdd f128" { |
| 79 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 79 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 80 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 80 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 81 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 81 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 82 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 82 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 83 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 83 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 84 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 84 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 85 | 85 | ||
| ... | @@ -189,7 +189,7 @@ test "vector f80" { | ... | @@ -189,7 +189,7 @@ test "vector f80" { |
| 189 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 189 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 190 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 190 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 191 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 191 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 192 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 192 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 193 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 193 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 194 | 194 | ||
| 195 | try comptime vector80(); | 195 | try comptime vector80(); |
| ... | @@ -216,7 +216,7 @@ test "vector f128" { | ... | @@ -216,7 +216,7 @@ test "vector f128" { |
| 216 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 216 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 217 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 217 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 218 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 218 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 219 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 219 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 220 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 220 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 221 | 221 | ||
| 222 | try comptime vector128(); | 222 | try comptime vector128(); |
test/behavior/saturating_arithmetic.zig+2-2| ... | @@ -164,7 +164,7 @@ test "saturating multiplication <= 32 bits" { | ... | @@ -164,7 +164,7 @@ test "saturating multiplication <= 32 bits" { |
| 164 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 164 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 165 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 165 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 166 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 166 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 167 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 167 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 168 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 168 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 169 | 169 | ||
| 170 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { | 170 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { |
| ... | @@ -264,7 +264,7 @@ test "saturating multiplication" { | ... | @@ -264,7 +264,7 @@ test "saturating multiplication" { |
| 264 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 264 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 265 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 265 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 266 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 266 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 267 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 267 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 268 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 268 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 269 | 269 | ||
| 270 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { | 270 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { |
test/behavior/struct.zig+3-3| ... | @@ -419,7 +419,7 @@ test "packed struct 24bits" { | ... | @@ -419,7 +419,7 @@ test "packed struct 24bits" { |
| 419 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 419 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 420 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 420 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 421 | if (builtin.cpu.arch == .wasm32) return error.SkipZigTest; // TODO | 421 | if (builtin.cpu.arch == .wasm32) return error.SkipZigTest; // TODO |
| 422 | if (comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; // TODO | 422 | if (comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; // TODO |
| 423 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 423 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 424 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 424 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 425 | 425 | ||
| ... | @@ -818,7 +818,7 @@ test "non-packed struct with u128 entry in union" { | ... | @@ -818,7 +818,7 @@ test "non-packed struct with u128 entry in union" { |
| 818 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 818 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 819 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 819 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 820 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 820 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 821 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 821 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 822 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 822 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 823 | 823 | ||
| 824 | const U = union(enum) { | 824 | const U = union(enum) { |
| ... | @@ -941,7 +941,7 @@ test "tuple assigned to variable" { | ... | @@ -941,7 +941,7 @@ test "tuple assigned to variable" { |
| 941 | 941 | ||
| 942 | test "comptime struct field" { | 942 | test "comptime struct field" { |
| 943 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 943 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 944 | if (comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; // TODO | 944 | if (comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; // TODO |
| 945 | 945 | ||
| 946 | const T = struct { | 946 | const T = struct { |
| 947 | a: i32, | 947 | a: i32, |
test/behavior/vector.zig+2-2| ... | @@ -101,7 +101,7 @@ test "vector float operators" { | ... | @@ -101,7 +101,7 @@ test "vector float operators" { |
| 101 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 101 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 102 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 102 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 103 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 103 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 104 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 104 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 105 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 105 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 106 | 106 | ||
| 107 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | 107 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| ... | @@ -753,7 +753,7 @@ test "vector reduce operation" { | ... | @@ -753,7 +753,7 @@ test "vector reduce operation" { |
| 753 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 753 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 754 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 754 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 755 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 755 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 756 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 756 | if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| 757 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 757 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 758 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21091 | 758 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21091 |
| 759 | 759 |
test/c_abi/main.zig+3-3| ... | @@ -10,7 +10,7 @@ const builtin = @import("builtin"); | ... | @@ -10,7 +10,7 @@ const builtin = @import("builtin"); |
| 10 | const print = std.debug.print; | 10 | const print = std.debug.print; |
| 11 | const expect = std.testing.expect; | 11 | const expect = std.testing.expect; |
| 12 | const expectEqual = std.testing.expectEqual; | 12 | const expectEqual = std.testing.expectEqual; |
| 13 | const have_i128 = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isARM() and | 13 | const have_i128 = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isArm() and |
| 14 | !builtin.cpu.arch.isMIPS() and !builtin.cpu.arch.isPowerPC32(); | 14 | !builtin.cpu.arch.isMIPS() and !builtin.cpu.arch.isPowerPC32(); |
| 15 | 15 | ||
| 16 | const have_f128 = builtin.cpu.arch.isX86() and !builtin.os.tag.isDarwin(); | 16 | const have_f128 = builtin.cpu.arch.isX86() and !builtin.os.tag.isDarwin(); |
| ... | @@ -181,7 +181,7 @@ extern fn c_cmultf(a: ComplexFloat, b: ComplexFloat) ComplexFloat; | ... | @@ -181,7 +181,7 @@ extern fn c_cmultf(a: ComplexFloat, b: ComplexFloat) ComplexFloat; |
| 181 | extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble; | 181 | extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble; |
| 182 | 182 | ||
| 183 | const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and | 183 | const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and |
| 184 | !builtin.cpu.arch.isARM() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV(); | 184 | !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV(); |
| 185 | 185 | ||
| 186 | test "C ABI complex float" { | 186 | test "C ABI complex float" { |
| 187 | if (!complex_abi_compatible) return error.SkipZigTest; | 187 | if (!complex_abi_compatible) return error.SkipZigTest; |
| ... | @@ -5553,7 +5553,7 @@ extern fn c_f16_struct(f16_struct) f16_struct; | ... | @@ -5553,7 +5553,7 @@ extern fn c_f16_struct(f16_struct) f16_struct; |
| 5553 | test "f16 struct" { | 5553 | test "f16 struct" { |
| 5554 | if (builtin.target.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5554 | if (builtin.target.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5555 | if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 5555 | if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 5556 | if (builtin.cpu.arch.isARM() and builtin.mode != .Debug) return error.SkipZigTest; | 5556 | if (builtin.cpu.arch.isArm() and builtin.mode != .Debug) return error.SkipZigTest; |
| 5557 | 5557 | ||
| 5558 | const a = c_f16_struct(.{ .a = 12 }); | 5558 | const a = c_f16_struct(.{ .a = 12 }); |
| 5559 | try expect(a.a == 34); | 5559 | try expect(a.a == 34); |
test/tests.zig+72-1| ... | @@ -28,6 +28,7 @@ const TestTarget = struct { | ... | @@ -28,6 +28,7 @@ const TestTarget = struct { |
| 28 | use_lld: ?bool = null, | 28 | use_lld: ?bool = null, |
| 29 | pic: ?bool = null, | 29 | pic: ?bool = null, |
| 30 | strip: ?bool = null, | 30 | strip: ?bool = null, |
| 31 | skip_modules: []const []const u8 = &.{}, | ||
| 31 | 32 | ||
| 32 | // This is intended for targets that are known to be slow to compile. These are acceptable to | 33 | // This is intended for targets that are known to be slow to compile. These are acceptable to |
| 33 | // run in CI, but should not be run on developer machines by default. As an example, at the time | 34 | // run in CI, but should not be run on developer machines by default. As an example, at the time |
| ... | @@ -337,6 +338,70 @@ const test_targets = blk: { | ... | @@ -337,6 +338,70 @@ const test_targets = blk: { |
| 337 | .link_libc = true, | 338 | .link_libc = true, |
| 338 | }, | 339 | }, |
| 339 | 340 | ||
| 341 | .{ | ||
| 342 | .target = .{ | ||
| 343 | .cpu_arch = .thumb, | ||
| 344 | .os_tag = .linux, | ||
| 345 | .abi = .eabi, | ||
| 346 | }, | ||
| 347 | }, | ||
| 348 | .{ | ||
| 349 | .target = .{ | ||
| 350 | .cpu_arch = .thumb, | ||
| 351 | .os_tag = .linux, | ||
| 352 | .abi = .eabihf, | ||
| 353 | }, | ||
| 354 | }, | ||
| 355 | .{ | ||
| 356 | .target = .{ | ||
| 357 | .cpu_arch = .thumb, | ||
| 358 | .os_tag = .linux, | ||
| 359 | .abi = .musleabi, | ||
| 360 | }, | ||
| 361 | .link_libc = true, | ||
| 362 | .skip_modules = &.{"std"}, | ||
| 363 | }, | ||
| 364 | .{ | ||
| 365 | .target = .{ | ||
| 366 | .cpu_arch = .thumb, | ||
| 367 | .os_tag = .linux, | ||
| 368 | .abi = .musleabihf, | ||
| 369 | }, | ||
| 370 | .link_libc = true, | ||
| 371 | .skip_modules = &.{"std"}, | ||
| 372 | }, | ||
| 373 | // Calls are normally lowered to branch instructions that only support +/- 16 MB range when | ||
| 374 | // targeting Thumb. This is not sufficient for the std test binary linked statically with | ||
| 375 | // musl, so use long calls to avoid out-of-range relocations. | ||
| 376 | .{ | ||
| 377 | .target = std.Target.Query.parse(.{ | ||
| 378 | .arch_os_abi = "thumb-linux-musleabi", | ||
| 379 | .cpu_features = "baseline+long_calls", | ||
| 380 | }) catch @panic("OOM"), | ||
| 381 | .link_libc = true, | ||
| 382 | .pic = false, // Long calls don't work with PIC. | ||
| 383 | .skip_modules = &.{ | ||
| 384 | "behavior", | ||
| 385 | "c-import", | ||
| 386 | "compiler-rt", | ||
| 387 | "universal-libc", | ||
| 388 | }, | ||
| 389 | }, | ||
| 390 | .{ | ||
| 391 | .target = std.Target.Query.parse(.{ | ||
| 392 | .arch_os_abi = "thumb-linux-musleabihf", | ||
| 393 | .cpu_features = "baseline+long_calls", | ||
| 394 | }) catch @panic("OOM"), | ||
| 395 | .link_libc = true, | ||
| 396 | .pic = false, // Long calls don't work with PIC. | ||
| 397 | .skip_modules = &.{ | ||
| 398 | "behavior", | ||
| 399 | "c-import", | ||
| 400 | "compiler-rt", | ||
| 401 | "universal-libc", | ||
| 402 | }, | ||
| 403 | }, | ||
| 404 | |||
| 340 | .{ | 405 | .{ |
| 341 | .target = .{ | 406 | .target = .{ |
| 342 | .cpu_arch = .mips, | 407 | .cpu_arch = .mips, |
| ... | @@ -1225,7 +1290,13 @@ const ModuleTestOptions = struct { | ... | @@ -1225,7 +1290,13 @@ const ModuleTestOptions = struct { |
| 1225 | pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { | 1290 | pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 1226 | const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc); | 1291 | const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc); |
| 1227 | 1292 | ||
| 1228 | for (test_targets) |test_target| { | 1293 | for_targets: for (test_targets) |test_target| { |
| 1294 | if (test_target.skip_modules.len > 0) { | ||
| 1295 | for (test_target.skip_modules) |skip_mod| { | ||
| 1296 | if (std.mem.eql(u8, options.name, skip_mod)) continue :for_targets; | ||
| 1297 | } | ||
| 1298 | } | ||
| 1299 | |||
| 1229 | if (!options.test_slow_targets and test_target.slow_backend) continue; | 1300 | if (!options.test_slow_targets and test_target.slow_backend) continue; |
| 1230 | 1301 | ||
| 1231 | if (options.skip_non_native and !test_target.target.isNative()) | 1302 | if (options.skip_non_native and !test_target.target.isNative()) |