| author | |
| committer | |
| log | 7a02878f4e1ff18275e61db7450fb3e12ee1926e |
| tree | 41cb2b5c3f1c7b06746368238ebf944b74b7bd80 |
| parent | 27ceb4ae3719522e2eb519ba1cd67303ae2e7259 |
| signature |
23 files changed, 65 insertions(+), 55 deletions(-)
src/arch/riscv64/CodeGen.zig+51-8| ... | @@ -897,7 +897,7 @@ fn formatWipMir( | ... | @@ -897,7 +897,7 @@ fn formatWipMir( |
| 897 | .pic = comp.root_mod.pic, | 897 | .pic = comp.root_mod.pic, |
| 898 | }; | 898 | }; |
| 899 | var first = true; | 899 | var first = true; |
| 900 | for ((lower.lowerMir(data.inst) catch |err| switch (err) { | 900 | for ((lower.lowerMir(data.inst, .{ .allow_frame_locs = false }) catch |err| switch (err) { |
| 901 | error.LowerFail => { | 901 | error.LowerFail => { |
| 902 | defer { | 902 | defer { |
| 903 | lower.err_msg.?.deinit(data.func.gpa); | 903 | lower.err_msg.?.deinit(data.func.gpa); |
| ... | @@ -990,13 +990,10 @@ fn addInst(func: *Func, inst: Mir.Inst) error{OutOfMemory}!Mir.Inst.Index { | ... | @@ -990,13 +990,10 @@ fn addInst(func: *Func, inst: Mir.Inst) error{OutOfMemory}!Mir.Inst.Index { |
| 990 | .pseudo_dbg_prologue_end, | 990 | .pseudo_dbg_prologue_end, |
| 991 | .pseudo_dbg_line_column, | 991 | .pseudo_dbg_line_column, |
| 992 | .pseudo_dbg_epilogue_begin, | 992 | .pseudo_dbg_epilogue_begin, |
| 993 | .pseudo_store_rm, | ||
| 994 | .pseudo_load_rm, | ||
| 995 | .pseudo_lea_rm, | ||
| 996 | .pseudo_mv, | 993 | .pseudo_mv, |
| 997 | .pseudo_dead, | 994 | .pseudo_dead, |
| 998 | => false, | 995 | => false, |
| 999 | }) wip_mir_log.debug("{}", .{func.fmtWipMir(result_index)}) else wip_mir_log.debug(" | uses-mem", .{}); | 996 | }) wip_mir_log.debug("{}", .{func.fmtWipMir(result_index)}); |
| 1000 | return result_index; | 997 | return result_index; |
| 1001 | } | 998 | } |
| 1002 | 999 | ||
| ... | @@ -3563,9 +3560,51 @@ fn airSetUnionTag(func: *Func, inst: Air.Inst.Index) !void { | ... | @@ -3563,9 +3560,51 @@ fn airSetUnionTag(func: *Func, inst: Air.Inst.Index) !void { |
| 3563 | } | 3560 | } |
| 3564 | 3561 | ||
| 3565 | fn airGetUnionTag(func: *Func, inst: Air.Inst.Index) !void { | 3562 | fn airGetUnionTag(func: *Func, inst: Air.Inst.Index) !void { |
| 3563 | const zcu = func.bin_file.comp.module.?; | ||
| 3564 | const mod = func.bin_file.comp.module.?; | ||
| 3566 | const ty_op = func.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; | 3565 | const ty_op = func.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; |
| 3567 | const result: MCValue = if (func.liveness.isUnused(inst)) .unreach else return func.fail("TODO implement airGetUnionTag for {}", .{func.target.cpu.arch}); | 3566 | |
| 3568 | return func.finishAir(inst, result, .{ ty_op.operand, .none, .none }); | 3567 | const tag_ty = func.typeOfIndex(inst); |
| 3568 | const union_ty = func.typeOf(ty_op.operand); | ||
| 3569 | const layout = union_ty.unionGetLayout(mod); | ||
| 3570 | |||
| 3571 | if (layout.tag_size == 0) { | ||
| 3572 | return func.finishAir(inst, .none, .{ ty_op.operand, .none, .none }); | ||
| 3573 | } | ||
| 3574 | |||
| 3575 | const operand = try func.resolveInst(ty_op.operand); | ||
| 3576 | |||
| 3577 | const frame_mcv = try func.allocRegOrMem(union_ty, null, false); | ||
| 3578 | try func.genCopy(union_ty, frame_mcv, operand); | ||
| 3579 | |||
| 3580 | const tag_abi_size = tag_ty.abiSize(mod); | ||
| 3581 | const result_reg, const result_lock = try func.allocReg(.int); | ||
| 3582 | defer func.register_manager.unlockReg(result_lock); | ||
| 3583 | |||
| 3584 | switch (frame_mcv) { | ||
| 3585 | .load_frame => |frame_addr| { | ||
| 3586 | if (tag_abi_size <= 8) { | ||
| 3587 | const off: i32 = if (layout.tag_align.compare(.lt, layout.payload_align)) | ||
| 3588 | @intCast(layout.payload_size) | ||
| 3589 | else | ||
| 3590 | 0; | ||
| 3591 | |||
| 3592 | try func.genCopy( | ||
| 3593 | tag_ty, | ||
| 3594 | .{ .register = result_reg }, | ||
| 3595 | .{ .load_frame = .{ .index = frame_addr.index, .off = frame_addr.off + off } }, | ||
| 3596 | ); | ||
| 3597 | } else { | ||
| 3598 | return func.fail( | ||
| 3599 | "TODO implement get_union_tag for ABI larger than 8 bytes and operand {}, tag {}", | ||
| 3600 | .{ frame_mcv, tag_ty.fmt(zcu) }, | ||
| 3601 | ); | ||
| 3602 | } | ||
| 3603 | }, | ||
| 3604 | else => return func.fail("TODO: airGetUnionTag {s}", .{@tagName(operand)}), | ||
| 3605 | } | ||
| 3606 | |||
| 3607 | return func.finishAir(inst, .{ .register = result_reg }, .{ ty_op.operand, .none, .none }); | ||
| 3569 | } | 3608 | } |
| 3570 | 3609 | ||
| 3571 | fn airClz(func: *Func, inst: Air.Inst.Index) !void { | 3610 | fn airClz(func: *Func, inst: Air.Inst.Index) !void { |
| ... | @@ -4061,6 +4100,10 @@ fn airStructFieldVal(func: *Func, inst: Air.Inst.Index) !void { | ... | @@ -4061,6 +4100,10 @@ fn airStructFieldVal(func: *Func, inst: Air.Inst.Index) !void { |
| 4061 | }); | 4100 | }); |
| 4062 | } | 4101 | } |
| 4063 | 4102 | ||
| 4103 | if (field_off == 0) { | ||
| 4104 | try func.truncateRegister(field_ty, dst_reg); | ||
| 4105 | } | ||
| 4106 | |||
| 4064 | break :result if (field_off == 0) dst_mcv else try func.copyToNewRegister(inst, dst_mcv); | 4107 | break :result if (field_off == 0) dst_mcv else try func.copyToNewRegister(inst, dst_mcv); |
| 4065 | }, | 4108 | }, |
| 4066 | .load_frame => { | 4109 | .load_frame => { |
| ... | @@ -5945,7 +5988,7 @@ fn genSetMem( | ... | @@ -5945,7 +5988,7 @@ fn genSetMem( |
| 5945 | 0 => {}, | 5988 | 0 => {}, |
| 5946 | 1, 2, 4, 8 => { | 5989 | 1, 2, 4, 8 => { |
| 5947 | // no matter what type, it should use an integer register | 5990 | // no matter what type, it should use an integer register |
| 5948 | const src_reg = try func.copyToTmpRegister(Type.usize, src_mcv); | 5991 | const src_reg = try func.copyToTmpRegister(ty, src_mcv); |
| 5949 | const src_lock = func.register_manager.lockRegAssumeUnused(src_reg); | 5992 | const src_lock = func.register_manager.lockRegAssumeUnused(src_reg); |
| 5950 | defer func.register_manager.unlockReg(src_lock); | 5993 | defer func.register_manager.unlockReg(src_lock); |
| 5951 | 5994 |
src/arch/riscv64/Emit.zig+1-1| ... | @@ -26,7 +26,7 @@ pub fn emitMir(emit: *Emit) Error!void { | ... | @@ -26,7 +26,7 @@ pub fn emitMir(emit: *Emit) Error!void { |
| 26 | mir_index, | 26 | mir_index, |
| 27 | @intCast(emit.code.items.len), | 27 | @intCast(emit.code.items.len), |
| 28 | ); | 28 | ); |
| 29 | const lowered = try emit.lower.lowerMir(mir_index); | 29 | const lowered = try emit.lower.lowerMir(mir_index, .{ .allow_frame_locs = true }); |
| 30 | var lowered_relocs = lowered.relocs; | 30 | var lowered_relocs = lowered.relocs; |
| 31 | for (lowered.insts, 0..) |lowered_inst, lowered_index| { | 31 | for (lowered.insts, 0..) |lowered_inst, lowered_index| { |
| 32 | const start_offset: u32 = @intCast(emit.code.items.len); | 32 | const start_offset: u32 = @intCast(emit.code.items.len); |
src/arch/riscv64/Lower.zig+7-2| ... | @@ -40,7 +40,9 @@ pub const Reloc = struct { | ... | @@ -40,7 +40,9 @@ pub const Reloc = struct { |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | /// The returned slice is overwritten by the next call to lowerMir. | 42 | /// The returned slice is overwritten by the next call to lowerMir. |
| 43 | pub fn lowerMir(lower: *Lower, index: Mir.Inst.Index) Error!struct { | 43 | pub fn lowerMir(lower: *Lower, index: Mir.Inst.Index, options: struct { |
| 44 | allow_frame_locs: bool, | ||
| 45 | }) Error!struct { | ||
| 44 | insts: []const Instruction, | 46 | insts: []const Instruction, |
| 45 | relocs: []const Reloc, | 47 | relocs: []const Reloc, |
| 46 | } { | 48 | } { |
| ... | @@ -69,7 +71,10 @@ pub fn lowerMir(lower: *Lower, index: Mir.Inst.Index) Error!struct { | ... | @@ -69,7 +71,10 @@ pub fn lowerMir(lower: *Lower, index: Mir.Inst.Index) Error!struct { |
| 69 | .pseudo_load_rm, .pseudo_store_rm => { | 71 | .pseudo_load_rm, .pseudo_store_rm => { |
| 70 | const rm = inst.data.rm; | 72 | const rm = inst.data.rm; |
| 71 | 73 | ||
| 72 | const frame_loc = rm.m.toFrameLoc(lower.mir); | 74 | const frame_loc: Mir.FrameLoc = if (options.allow_frame_locs) |
| 75 | rm.m.toFrameLoc(lower.mir) | ||
| 76 | else | ||
| 77 | .{ .base = .s0, .disp = 0 }; | ||
| 73 | 78 | ||
| 74 | switch (inst.ops) { | 79 | switch (inst.ops) { |
| 75 | .pseudo_load_rm => { | 80 | .pseudo_load_rm => { |
src/arch/riscv64/encoder.zig+1-1| ... | @@ -56,7 +56,7 @@ pub const Instruction = struct { | ... | @@ -56,7 +56,7 @@ pub const Instruction = struct { |
| 56 | .none => unreachable, // it's sliced out above | 56 | .none => unreachable, // it's sliced out above |
| 57 | .reg => |reg| try writer.writeAll(@tagName(reg)), | 57 | .reg => |reg| try writer.writeAll(@tagName(reg)), |
| 58 | .imm => |imm| try writer.print("{d}", .{imm.asSigned(64)}), | 58 | .imm => |imm| try writer.print("{d}", .{imm.asSigned(64)}), |
| 59 | .mem => unreachable, // there is no "mem" operand in the actual instructions | 59 | .mem => try writer.writeAll("mem"), |
| 60 | .barrier => |barrier| try writer.writeAll(@tagName(barrier)), | 60 | .barrier => |barrier| try writer.writeAll(@tagName(barrier)), |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
src/arch/x86_64/Lower.zig+2| ... | @@ -65,6 +65,8 @@ pub const Reloc = struct { | ... | @@ -65,6 +65,8 @@ pub const Reloc = struct { |
| 65 | }; | 65 | }; |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | const Options = struct { allow_frame_locs: bool }; | ||
| 69 | |||
| 68 | /// The returned slice is overwritten by the next call to lowerMir. | 70 | /// The returned slice is overwritten by the next call to lowerMir. |
| 69 | pub fn lowerMir(lower: *Lower, index: Mir.Inst.Index) Error!struct { | 71 | pub fn lowerMir(lower: *Lower, index: Mir.Inst.Index) Error!struct { |
| 70 | insts: []const Instruction, | 72 | insts: []const Instruction, |
test/behavior/array.zig-2| ... | @@ -580,7 +580,6 @@ test "type coercion of anon struct literal to array" { | ... | @@ -580,7 +580,6 @@ test "type coercion of anon struct literal to array" { |
| 580 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 580 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 581 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 581 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 582 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 582 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 583 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 584 | 583 | ||
| 585 | const S = struct { | 584 | const S = struct { |
| 586 | const U = union { | 585 | const U = union { |
| ... | @@ -1011,7 +1010,6 @@ test "union that needs padding bytes inside an array" { | ... | @@ -1011,7 +1010,6 @@ test "union that needs padding bytes inside an array" { |
| 1011 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1010 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1012 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 1011 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 1013 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1012 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1014 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1015 | 1013 | ||
| 1016 | const B = union(enum) { | 1014 | const B = union(enum) { |
| 1017 | D: u8, | 1015 | D: u8, |
test/behavior/bitcast.zig-2| ... | @@ -192,7 +192,6 @@ test "@bitCast packed structs at runtime and comptime" { | ... | @@ -192,7 +192,6 @@ test "@bitCast packed structs at runtime and comptime" { |
| 192 | test "@bitCast extern structs at runtime and comptime" { | 192 | test "@bitCast extern structs at runtime and comptime" { |
| 193 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 193 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 194 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 194 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 195 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 196 | 195 | ||
| 197 | const Full = extern struct { | 196 | const Full = extern struct { |
| 198 | number: u16, | 197 | number: u16, |
| ... | @@ -227,7 +226,6 @@ test "bitcast packed struct to integer and back" { | ... | @@ -227,7 +226,6 @@ test "bitcast packed struct to integer and back" { |
| 227 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 226 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 228 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 227 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 229 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 228 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 230 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 231 | 229 | ||
| 232 | const LevelUpMove = packed struct { | 230 | const LevelUpMove = packed struct { |
| 233 | move_id: u9, | 231 | move_id: u9, |
test/behavior/enum.zig-1| ... | @@ -908,7 +908,6 @@ test "enum literal casting to tagged union" { | ... | @@ -908,7 +908,6 @@ test "enum literal casting to tagged union" { |
| 908 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 908 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 909 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 909 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 910 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 910 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 911 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 912 | 911 | ||
| 913 | const Arch = union(enum) { | 912 | const Arch = union(enum) { |
| 914 | x86_64, | 913 | x86_64, |
test/behavior/error.zig-1| ... | @@ -535,7 +535,6 @@ test "return result loc as peer result loc in inferred error set function" { | ... | @@ -535,7 +535,6 @@ test "return result loc as peer result loc in inferred error set function" { |
| 535 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 535 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 536 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 536 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 537 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 537 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 538 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 539 | 538 | ||
| 540 | const S = struct { | 539 | const S = struct { |
| 541 | fn doTheTest() !void { | 540 | fn doTheTest() !void { |
test/behavior/eval.zig-1| ... | @@ -395,7 +395,6 @@ test "return 0 from function that has u0 return type" { | ... | @@ -395,7 +395,6 @@ test "return 0 from function that has u0 return type" { |
| 395 | test "statically initialized struct" { | 395 | test "statically initialized struct" { |
| 396 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 396 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 397 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 397 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 398 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 399 | 398 | ||
| 400 | st_init_str_foo.x += 1; | 399 | st_init_str_foo.x += 1; |
| 401 | try expect(st_init_str_foo.x == 14); | 400 | try expect(st_init_str_foo.x == 14); |
test/behavior/inline_switch.zig-1| ... | @@ -49,7 +49,6 @@ test "inline switch unions" { | ... | @@ -49,7 +49,6 @@ test "inline switch unions" { |
| 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 50 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 50 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 51 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 51 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 52 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 53 | 52 | ||
| 54 | var x: U = .a; | 53 | var x: U = .a; |
| 55 | _ = &x; | 54 | _ = &x; |
test/behavior/math.zig-1| ... | @@ -1269,7 +1269,6 @@ test "@subWithOverflow" { | ... | @@ -1269,7 +1269,6 @@ test "@subWithOverflow" { |
| 1269 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1269 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1270 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1270 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1271 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1271 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1272 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1273 | 1272 | ||
| 1274 | { | 1273 | { |
| 1275 | var a: u8 = 1; | 1274 | var a: u8 = 1; |
test/behavior/optional.zig-1| ... | @@ -397,7 +397,6 @@ test "array of optional unaligned types" { | ... | @@ -397,7 +397,6 @@ test "array of optional unaligned types" { |
| 397 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 397 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 398 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 398 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 399 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 399 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 400 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 401 | 400 | ||
| 402 | const Enum = enum { one, two, three }; | 401 | const Enum = enum { one, two, three }; |
| 403 | 402 |
test/behavior/packed-struct.zig-1| ... | @@ -785,7 +785,6 @@ test "nested packed struct field access test" { | ... | @@ -785,7 +785,6 @@ test "nested packed struct field access test" { |
| 785 | test "nested packed struct at non-zero offset" { | 785 | test "nested packed struct at non-zero offset" { |
| 786 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 786 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 787 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 787 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 788 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 789 | 788 | ||
| 790 | const Pair = packed struct(u24) { | 789 | const Pair = packed struct(u24) { |
| 791 | a: u16 = 0, | 790 | a: u16 = 0, |
test/behavior/reflection.zig-1| ... | @@ -28,7 +28,6 @@ fn dummy(a: bool, b: i32, c: f32) i32 { | ... | @@ -28,7 +28,6 @@ fn dummy(a: bool, b: i32, c: f32) i32 { |
| 28 | test "reflection: @field" { | 28 | test "reflection: @field" { |
| 29 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 29 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 30 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 30 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 31 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 32 | 31 | ||
| 33 | var f = Foo{ | 32 | var f = Foo{ |
| 34 | .one = 42, | 33 | .one = 42, |
test/behavior/sizeof_and_typeof.zig+2| ... | @@ -19,6 +19,8 @@ test "@sizeOf on compile-time types" { | ... | @@ -19,6 +19,8 @@ test "@sizeOf on compile-time types" { |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | test "@TypeOf() with multiple arguments" { | 21 | test "@TypeOf() with multiple arguments" { |
| 22 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 23 | |||
| 22 | { | 24 | { |
| 23 | var var_1: u32 = undefined; | 25 | var var_1: u32 = undefined; |
| 24 | var var_2: u8 = undefined; | 26 | var var_2: u8 = undefined; |
test/behavior/struct.zig-3| ... | @@ -875,7 +875,6 @@ test "packed struct field passed to generic function" { | ... | @@ -875,7 +875,6 @@ test "packed struct field passed to generic function" { |
| 875 | test "anonymous struct literal syntax" { | 875 | test "anonymous struct literal syntax" { |
| 876 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 876 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 877 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 877 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 878 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 879 | 878 | ||
| 880 | const S = struct { | 879 | const S = struct { |
| 881 | const Point = struct { | 880 | const Point = struct { |
| ... | @@ -985,7 +984,6 @@ test "struct with union field" { | ... | @@ -985,7 +984,6 @@ test "struct with union field" { |
| 985 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 984 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 986 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 985 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 987 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 986 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 988 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 989 | 987 | ||
| 990 | const Value = struct { | 988 | const Value = struct { |
| 991 | ref: u32 = 2, | 989 | ref: u32 = 2, |
| ... | @@ -1368,7 +1366,6 @@ test "store to comptime field" { | ... | @@ -1368,7 +1366,6 @@ test "store to comptime field" { |
| 1368 | test "struct field init value is size of the struct" { | 1366 | test "struct field init value is size of the struct" { |
| 1369 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1367 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1370 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1368 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1371 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1372 | 1369 | ||
| 1373 | const namespace = struct { | 1370 | const namespace = struct { |
| 1374 | const S = extern struct { | 1371 | const S = extern struct { |
test/behavior/switch.zig-2| ... | @@ -256,7 +256,6 @@ test "switch on enum using pointer capture" { | ... | @@ -256,7 +256,6 @@ test "switch on enum using pointer capture" { |
| 256 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 256 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 257 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 257 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 258 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 258 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 259 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 260 | 259 | ||
| 261 | try testSwitchEnumPtrCapture(); | 260 | try testSwitchEnumPtrCapture(); |
| 262 | try comptime testSwitchEnumPtrCapture(); | 261 | try comptime testSwitchEnumPtrCapture(); |
| ... | @@ -693,7 +692,6 @@ test "switch capture copies its payload" { | ... | @@ -693,7 +692,6 @@ test "switch capture copies its payload" { |
| 693 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 692 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 694 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 693 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 695 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 694 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 696 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 697 | 695 | ||
| 698 | const S = struct { | 696 | const S = struct { |
| 699 | fn doTheTest() !void { | 697 | fn doTheTest() !void { |
test/behavior/this.zig-1| ... | @@ -27,7 +27,6 @@ test "this refer to module call private fn" { | ... | @@ -27,7 +27,6 @@ test "this refer to module call private fn" { |
| 27 | test "this refer to container" { | 27 | test "this refer to container" { |
| 28 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 28 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 29 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 29 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 30 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 31 | 30 | ||
| 32 | var pt: Point(i32) = undefined; | 31 | var pt: Point(i32) = undefined; |
| 33 | pt.x = 12; | 32 | pt.x = 12; |
test/behavior/tuple.zig-1| ... | @@ -131,7 +131,6 @@ test "tuple initializer for var" { | ... | @@ -131,7 +131,6 @@ test "tuple initializer for var" { |
| 131 | test "array-like initializer for tuple types" { | 131 | test "array-like initializer for tuple types" { |
| 132 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 132 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 133 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 133 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 134 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 135 | 134 | ||
| 136 | const T = @Type(.{ | 135 | const T = @Type(.{ |
| 137 | .Struct = .{ | 136 | .Struct = .{ |
test/behavior/type.zig-1| ... | @@ -383,7 +383,6 @@ test "Type.Union" { | ... | @@ -383,7 +383,6 @@ test "Type.Union" { |
| 383 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 383 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 384 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 384 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 385 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 385 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 386 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 387 | 386 | ||
| 388 | const Untagged = @Type(.{ | 387 | const Untagged = @Type(.{ |
| 389 | .Union = .{ | 388 | .Union = .{ |
test/behavior/union.zig-23| ... | @@ -43,7 +43,6 @@ test "basic unions" { | ... | @@ -43,7 +43,6 @@ test "basic unions" { |
| 43 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 43 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 44 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 44 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 45 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 45 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 46 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 47 | 46 | ||
| 48 | var foo = Foo{ .int = 1 }; | 47 | var foo = Foo{ .int = 1 }; |
| 49 | try expect(foo.int == 1); | 48 | try expect(foo.int == 1); |
| ... | @@ -276,7 +275,6 @@ test "comparison between union and enum literal" { | ... | @@ -276,7 +275,6 @@ test "comparison between union and enum literal" { |
| 276 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 275 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 277 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 276 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 278 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 277 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 279 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 280 | 278 | ||
| 281 | try testComparison(); | 279 | try testComparison(); |
| 282 | try comptime testComparison(); | 280 | try comptime testComparison(); |
| ... | @@ -292,7 +290,6 @@ test "cast union to tag type of union" { | ... | @@ -292,7 +290,6 @@ test "cast union to tag type of union" { |
| 292 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 290 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 293 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 291 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 294 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 292 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 295 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 296 | 293 | ||
| 297 | try testCastUnionToTag(); | 294 | try testCastUnionToTag(); |
| 298 | try comptime testCastUnionToTag(); | 295 | try comptime testCastUnionToTag(); |
| ... | @@ -314,7 +311,6 @@ test "cast tag type of union to union" { | ... | @@ -314,7 +311,6 @@ test "cast tag type of union to union" { |
| 314 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 311 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 315 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 312 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 316 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 313 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 317 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 318 | 314 | ||
| 319 | var x: Value2 = Letter2.B; | 315 | var x: Value2 = Letter2.B; |
| 320 | _ = &x; | 316 | _ = &x; |
| ... | @@ -331,7 +327,6 @@ test "implicit cast union to its tag type" { | ... | @@ -331,7 +327,6 @@ test "implicit cast union to its tag type" { |
| 331 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 327 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 332 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 328 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 333 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 329 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 334 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 335 | 330 | ||
| 336 | var x: Value2 = Letter2.B; | 331 | var x: Value2 = Letter2.B; |
| 337 | _ = &x; | 332 | _ = &x; |
| ... | @@ -353,7 +348,6 @@ test "constant packed union" { | ... | @@ -353,7 +348,6 @@ test "constant packed union" { |
| 353 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 348 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 354 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 349 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 355 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 350 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 356 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 357 | 351 | ||
| 358 | try testConstPackedUnion(&[_]PackThis{PackThis{ .StringLiteral = 1 }}); | 352 | try testConstPackedUnion(&[_]PackThis{PackThis{ .StringLiteral = 1 }}); |
| 359 | } | 353 | } |
| ... | @@ -503,7 +497,6 @@ test "initialize global array of union" { | ... | @@ -503,7 +497,6 @@ test "initialize global array of union" { |
| 503 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 497 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 504 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 498 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 505 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 499 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 506 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 507 | 500 | ||
| 508 | glbl_array[1] = FooUnion{ .U1 = 2 }; | 501 | glbl_array[1] = FooUnion{ .U1 = 2 }; |
| 509 | glbl_array[0] = FooUnion{ .U0 = 1 }; | 502 | glbl_array[0] = FooUnion{ .U0 = 1 }; |
| ... | @@ -515,7 +508,6 @@ test "update the tag value for zero-sized unions" { | ... | @@ -515,7 +508,6 @@ test "update the tag value for zero-sized unions" { |
| 515 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 508 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 516 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 509 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 517 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 510 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 518 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 519 | 511 | ||
| 520 | const S = union(enum) { | 512 | const S = union(enum) { |
| 521 | U0: void, | 513 | U0: void, |
| ... | @@ -636,7 +628,6 @@ test "tagged union with all void fields but a meaningful tag" { | ... | @@ -636,7 +628,6 @@ test "tagged union with all void fields but a meaningful tag" { |
| 636 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 628 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 637 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 629 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 638 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 630 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 639 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 640 | 631 | ||
| 641 | const S = struct { | 632 | const S = struct { |
| 642 | const B = union(enum) { | 633 | const B = union(enum) { |
| ... | @@ -758,7 +749,6 @@ test "@intFromEnum works on unions" { | ... | @@ -758,7 +749,6 @@ test "@intFromEnum works on unions" { |
| 758 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 749 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 759 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 750 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 760 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 751 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 761 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 762 | 752 | ||
| 763 | const Bar = union(enum) { | 753 | const Bar = union(enum) { |
| 764 | A: bool, | 754 | A: bool, |
| ... | @@ -874,7 +864,6 @@ test "@unionInit can modify a union type" { | ... | @@ -874,7 +864,6 @@ test "@unionInit can modify a union type" { |
| 874 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 864 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 875 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 865 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 876 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 866 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 877 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 878 | 867 | ||
| 879 | const UnionInitEnum = union(enum) { | 868 | const UnionInitEnum = union(enum) { |
| 880 | Boolean: bool, | 869 | Boolean: bool, |
| ... | @@ -898,7 +887,6 @@ test "@unionInit can modify a pointer value" { | ... | @@ -898,7 +887,6 @@ test "@unionInit can modify a pointer value" { |
| 898 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 887 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 899 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 888 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 900 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 889 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 901 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 902 | 890 | ||
| 903 | const UnionInitEnum = union(enum) { | 891 | const UnionInitEnum = union(enum) { |
| 904 | Boolean: bool, | 892 | Boolean: bool, |
| ... | @@ -1089,7 +1077,6 @@ test "switching on non exhaustive union" { | ... | @@ -1089,7 +1077,6 @@ test "switching on non exhaustive union" { |
| 1089 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1077 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1090 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1078 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1091 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1079 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1092 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1093 | 1080 | ||
| 1094 | const S = struct { | 1081 | const S = struct { |
| 1095 | const E = enum(u8) { | 1082 | const E = enum(u8) { |
| ... | @@ -1199,7 +1186,6 @@ test "global variable struct contains union initialized to non-most-aligned fiel | ... | @@ -1199,7 +1186,6 @@ test "global variable struct contains union initialized to non-most-aligned fiel |
| 1199 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1186 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1200 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1187 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1201 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1188 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1202 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1203 | 1189 | ||
| 1204 | const T = struct { | 1190 | const T = struct { |
| 1205 | const U = union(enum) { | 1191 | const U = union(enum) { |
| ... | @@ -1352,7 +1338,6 @@ test "noreturn field in union" { | ... | @@ -1352,7 +1338,6 @@ test "noreturn field in union" { |
| 1352 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1338 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1353 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1339 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1354 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1340 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1355 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1356 | 1341 | ||
| 1357 | const U = union(enum) { | 1342 | const U = union(enum) { |
| 1358 | a: u32, | 1343 | a: u32, |
| ... | @@ -1434,7 +1419,6 @@ test "union field ptr - zero sized payload" { | ... | @@ -1434,7 +1419,6 @@ test "union field ptr - zero sized payload" { |
| 1434 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1419 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1435 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1420 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1436 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1421 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1437 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1438 | 1422 | ||
| 1439 | const U = union { | 1423 | const U = union { |
| 1440 | foo: void, | 1424 | foo: void, |
| ... | @@ -1449,7 +1433,6 @@ test "union field ptr - zero sized field" { | ... | @@ -1449,7 +1433,6 @@ test "union field ptr - zero sized field" { |
| 1449 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1433 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1450 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1434 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1451 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1435 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1452 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1453 | 1436 | ||
| 1454 | const U = union { | 1437 | const U = union { |
| 1455 | foo: void, | 1438 | foo: void, |
| ... | @@ -1589,7 +1572,6 @@ test "reinterpreting enum value inside packed union" { | ... | @@ -1589,7 +1572,6 @@ test "reinterpreting enum value inside packed union" { |
| 1589 | 1572 | ||
| 1590 | test "access the tag of a global tagged union" { | 1573 | test "access the tag of a global tagged union" { |
| 1591 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1574 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1592 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1593 | 1575 | ||
| 1594 | const U = union(enum) { | 1576 | const U = union(enum) { |
| 1595 | a, | 1577 | a, |
| ... | @@ -1601,7 +1583,6 @@ test "access the tag of a global tagged union" { | ... | @@ -1601,7 +1583,6 @@ test "access the tag of a global tagged union" { |
| 1601 | 1583 | ||
| 1602 | test "coerce enum literal to union in result loc" { | 1584 | test "coerce enum literal to union in result loc" { |
| 1603 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1585 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1604 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1605 | 1586 | ||
| 1606 | const U = union(enum) { | 1587 | const U = union(enum) { |
| 1607 | a, | 1588 | a, |
| ... | @@ -1864,7 +1845,6 @@ test "reinterpret extern union" { | ... | @@ -1864,7 +1845,6 @@ test "reinterpret extern union" { |
| 1864 | 1845 | ||
| 1865 | test "reinterpret packed union" { | 1846 | test "reinterpret packed union" { |
| 1866 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1847 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1867 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1868 | 1848 | ||
| 1869 | const U = packed union { | 1849 | const U = packed union { |
| 1870 | foo: u8, | 1850 | foo: u8, |
| ... | @@ -2044,7 +2024,6 @@ test "extern union initialized via reintepreted struct field initializer" { | ... | @@ -2044,7 +2024,6 @@ test "extern union initialized via reintepreted struct field initializer" { |
| 2044 | 2024 | ||
| 2045 | test "packed union initialized via reintepreted struct field initializer" { | 2025 | test "packed union initialized via reintepreted struct field initializer" { |
| 2046 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 2026 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 2047 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 2048 | 2027 | ||
| 2049 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; | 2028 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; |
| 2050 | 2029 | ||
| ... | @@ -2065,7 +2044,6 @@ test "packed union initialized via reintepreted struct field initializer" { | ... | @@ -2065,7 +2044,6 @@ test "packed union initialized via reintepreted struct field initializer" { |
| 2065 | 2044 | ||
| 2066 | test "store of comptime reinterpreted memory to extern union" { | 2045 | test "store of comptime reinterpreted memory to extern union" { |
| 2067 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 2046 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 2068 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 2069 | 2047 | ||
| 2070 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; | 2048 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; |
| 2071 | 2049 | ||
| ... | @@ -2088,7 +2066,6 @@ test "store of comptime reinterpreted memory to extern union" { | ... | @@ -2088,7 +2066,6 @@ test "store of comptime reinterpreted memory to extern union" { |
| 2088 | 2066 | ||
| 2089 | test "store of comptime reinterpreted memory to packed union" { | 2067 | test "store of comptime reinterpreted memory to packed union" { |
| 2090 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 2068 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 2091 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 2092 | 2069 | ||
| 2093 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; | 2070 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; |
| 2094 | 2071 |
test/behavior/vector.zig+1| ... | @@ -1316,6 +1316,7 @@ test "zero multiplicand" { | ... | @@ -1316,6 +1316,7 @@ test "zero multiplicand" { |
| 1316 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1316 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1317 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1317 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1318 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1318 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1319 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | ||
| 1319 | 1320 | ||
| 1320 | const zeros = @Vector(2, u32){ 0.0, 0.0 }; | 1321 | const zeros = @Vector(2, u32){ 0.0, 0.0 }; |
| 1321 | var ones = @Vector(2, u32){ 1.0, 1.0 }; | 1322 | var ones = @Vector(2, u32){ 1.0, 1.0 }; |