| author | |
| committer | |
| log | 90059a12e0ffe433132450f9f43221a198a22106 |
| tree | 9a5f89b41994cc10700df77d503be9f446b6f5fb |
| parent | 87dc60e8de58a392fe6e5e6b4dd5c41f487d367a |
| parent | 1bf8da19e1b58159b27033d415b7289cf455b870 |
| signature |
stage2 ARM: pass more behavior tests30 files changed, 83 insertions(+), 171 deletions(-)
src/arch/arm/CodeGen.zig+29-5| ... | @@ -433,7 +433,9 @@ fn gen(self: *Self) !void { | ... | @@ -433,7 +433,9 @@ fn gen(self: *Self) !void { |
| 433 | }); | 433 | }); |
| 434 | 434 | ||
| 435 | // exitlude jumps | 435 | // exitlude jumps |
| 436 | if (self.exitlude_jump_relocs.items.len == 1) { | 436 | const only_one_exitlude_jump = self.exitlude_jump_relocs.items.len == 1 and |
| 437 | self.exitlude_jump_relocs.items[0] == self.mir_instructions.len - 1; | ||
| 438 | if (only_one_exitlude_jump) { | ||
| 437 | // There is only one relocation. Hence, | 439 | // There is only one relocation. Hence, |
| 438 | // this relocation must be at the end of | 440 | // this relocation must be at the end of |
| 439 | // the code. Therefore, we can just delete | 441 | // the code. Therefore, we can just delete |
| ... | @@ -1066,7 +1068,17 @@ fn airMax(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -1066,7 +1068,17 @@ fn airMax(self: *Self, inst: Air.Inst.Index) !void { |
| 1066 | fn airSlice(self: *Self, inst: Air.Inst.Index) !void { | 1068 | fn airSlice(self: *Self, inst: Air.Inst.Index) !void { |
| 1067 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; | 1069 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; |
| 1068 | const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; | 1070 | const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; |
| 1069 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement slice for {}", .{self.target.cpu.arch}); | 1071 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 1072 | const ptr = try self.resolveInst(bin_op.lhs); | ||
| 1073 | const ptr_ty = self.air.typeOf(bin_op.lhs); | ||
| 1074 | const len = try self.resolveInst(bin_op.rhs); | ||
| 1075 | const len_ty = self.air.typeOf(bin_op.rhs); | ||
| 1076 | |||
| 1077 | const stack_offset = try self.allocMem(inst, 8, 8); | ||
| 1078 | try self.genSetStack(ptr_ty, stack_offset + 4, ptr); | ||
| 1079 | try self.genSetStack(len_ty, stack_offset, len); | ||
| 1080 | break :result MCValue{ .stack_offset = stack_offset }; | ||
| 1081 | }; | ||
| 1070 | return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none }); | 1082 | return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none }); |
| 1071 | } | 1083 | } |
| 1072 | 1084 | ||
| ... | @@ -1359,6 +1371,7 @@ fn airSliceElemVal(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -1359,6 +1371,7 @@ fn airSliceElemVal(self: *Self, inst: Air.Inst.Index) !void { |
| 1359 | 1371 | ||
| 1360 | const base_mcv: MCValue = switch (slice_mcv) { | 1372 | const base_mcv: MCValue = switch (slice_mcv) { |
| 1361 | .stack_offset => |off| .{ .register = try self.copyToTmpRegister(slice_ptr_field_type, .{ .stack_offset = off + 4 }) }, | 1373 | .stack_offset => |off| .{ .register = try self.copyToTmpRegister(slice_ptr_field_type, .{ .stack_offset = off + 4 }) }, |
| 1374 | .stack_argument_offset => |off| .{ .register = try self.copyToTmpRegister(slice_ptr_field_type, .{ .stack_argument_offset = off + 4 }) }, | ||
| 1362 | else => return self.fail("TODO slice_elem_val when slice is {}", .{slice_mcv}), | 1375 | else => return self.fail("TODO slice_elem_val when slice is {}", .{slice_mcv}), |
| 1363 | }; | 1376 | }; |
| 1364 | self.register_manager.freezeRegs(&.{base_mcv.register}); | 1377 | self.register_manager.freezeRegs(&.{base_mcv.register}); |
| ... | @@ -3854,9 +3867,17 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3854,9 +3867,17 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void { |
| 3854 | 3867 | ||
| 3855 | fn airArrayToSlice(self: *Self, inst: Air.Inst.Index) !void { | 3868 | fn airArrayToSlice(self: *Self, inst: Air.Inst.Index) !void { |
| 3856 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 3869 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 3857 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement airArrayToSlice for {}", .{ | 3870 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 3858 | self.target.cpu.arch, | 3871 | const ptr_ty = self.air.typeOf(ty_op.operand); |
| 3859 | }); | 3872 | const ptr = try self.resolveInst(ty_op.operand); |
| 3873 | const array_ty = ptr_ty.childType(); | ||
| 3874 | const array_len = @intCast(u32, array_ty.arrayLenIncludingSentinel()); | ||
| 3875 | |||
| 3876 | const stack_offset = try self.allocMem(inst, 8, 8); | ||
| 3877 | try self.genSetStack(ptr_ty, stack_offset + 4, ptr); | ||
| 3878 | try self.genSetStack(Type.initTag(.usize), stack_offset, .{ .immediate = array_len }); | ||
| 3879 | break :result MCValue{ .stack_offset = stack_offset }; | ||
| 3880 | }; | ||
| 3860 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); | 3881 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 3861 | } | 3882 | } |
| 3862 | 3883 | ||
| ... | @@ -4077,6 +4098,9 @@ fn genTypedValue(self: *Self, typed_value: TypedValue) InnerError!MCValue { | ... | @@ -4077,6 +4098,9 @@ fn genTypedValue(self: *Self, typed_value: TypedValue) InnerError!MCValue { |
| 4077 | } | 4098 | } |
| 4078 | 4099 | ||
| 4079 | switch (typed_value.ty.zigTypeTag()) { | 4100 | switch (typed_value.ty.zigTypeTag()) { |
| 4101 | .Array => { | ||
| 4102 | return self.lowerUnnamedConst(typed_value); | ||
| 4103 | }, | ||
| 4080 | .Pointer => switch (typed_value.ty.ptrSize()) { | 4104 | .Pointer => switch (typed_value.ty.ptrSize()) { |
| 4081 | .Slice => { | 4105 | .Slice => { |
| 4082 | return self.lowerUnnamedConst(typed_value); | 4106 | return self.lowerUnnamedConst(typed_value); |
src/arch/arm/Mir.zig+5-7| ... | @@ -118,8 +118,6 @@ pub const Inst = struct { | ... | @@ -118,8 +118,6 @@ pub const Inst = struct { |
| 118 | /// All instructions have a 8-byte payload, which is contained within | 118 | /// All instructions have a 8-byte payload, which is contained within |
| 119 | /// this union. `Tag` determines which union field is active, as well as | 119 | /// this union. `Tag` determines which union field is active, as well as |
| 120 | /// how to interpret the data within. | 120 | /// how to interpret the data within. |
| 121 | // TODO flatten down Data (remove use of tagged unions) to make it | ||
| 122 | // 8 bytes only | ||
| 123 | pub const Data = union { | 121 | pub const Data = union { |
| 124 | /// No additional data | 122 | /// No additional data |
| 125 | /// | 123 | /// |
| ... | @@ -231,11 +229,11 @@ pub const Inst = struct { | ... | @@ -231,11 +229,11 @@ pub const Inst = struct { |
| 231 | 229 | ||
| 232 | // Make sure we don't accidentally make instructions bigger than expected. | 230 | // Make sure we don't accidentally make instructions bigger than expected. |
| 233 | // Note that in Debug builds, Zig is allowed to insert a secret field for safety checks. | 231 | // Note that in Debug builds, Zig is allowed to insert a secret field for safety checks. |
| 234 | // comptime { | 232 | comptime { |
| 235 | // if (builtin.mode != .Debug) { | 233 | if (builtin.mode != .Debug) { |
| 236 | // assert(@sizeOf(Data) == 8); | 234 | assert(@sizeOf(Data) == 8); |
| 237 | // } | 235 | } |
| 238 | // } | 236 | } |
| 239 | }; | 237 | }; |
| 240 | 238 | ||
| 241 | pub fn deinit(mir: *Mir, gpa: std.mem.Allocator) void { | 239 | pub fn deinit(mir: *Mir, gpa: std.mem.Allocator) void { |
src/arch/arm/bits.zig+49-28| ... | @@ -469,6 +469,23 @@ pub const Instruction = union(enum) { | ... | @@ -469,6 +469,23 @@ pub const Instruction = union(enum) { |
| 469 | } | 469 | } |
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | pub const AddressingMode = enum { | ||
| 473 | /// [<Rn>, <offset>] | ||
| 474 | /// | ||
| 475 | /// Address = Rn + offset | ||
| 476 | offset, | ||
| 477 | /// [<Rn>, <offset>]! | ||
| 478 | /// | ||
| 479 | /// Address = Rn + offset | ||
| 480 | /// Rn = Rn + offset | ||
| 481 | pre_index, | ||
| 482 | /// [<Rn>], <offset> | ||
| 483 | /// | ||
| 484 | /// Address = Rn | ||
| 485 | /// Rn = Rn + offset | ||
| 486 | post_index, | ||
| 487 | }; | ||
| 488 | |||
| 472 | /// Represents the offset operand of a load or store | 489 | /// Represents the offset operand of a load or store |
| 473 | /// instruction. Data can be loaded from memory with either an | 490 | /// instruction. Data can be loaded from memory with either an |
| 474 | /// immediate offset or an offset that is stored in some register. | 491 | /// immediate offset or an offset that is stored in some register. |
| ... | @@ -730,10 +747,9 @@ pub const Instruction = union(enum) { | ... | @@ -730,10 +747,9 @@ pub const Instruction = union(enum) { |
| 730 | rd: Register, | 747 | rd: Register, |
| 731 | rn: Register, | 748 | rn: Register, |
| 732 | offset: Offset, | 749 | offset: Offset, |
| 733 | pre_index: bool, | 750 | mode: AddressingMode, |
| 734 | positive: bool, | 751 | positive: bool, |
| 735 | byte_word: u1, | 752 | byte_word: u1, |
| 736 | write_back: bool, | ||
| 737 | load_store: u1, | 753 | load_store: u1, |
| 738 | ) Instruction { | 754 | ) Instruction { |
| 739 | return Instruction{ | 755 | return Instruction{ |
| ... | @@ -743,10 +759,16 @@ pub const Instruction = union(enum) { | ... | @@ -743,10 +759,16 @@ pub const Instruction = union(enum) { |
| 743 | .rd = rd.id(), | 759 | .rd = rd.id(), |
| 744 | .offset = offset.toU12(), | 760 | .offset = offset.toU12(), |
| 745 | .load_store = load_store, | 761 | .load_store = load_store, |
| 746 | .write_back = @boolToInt(write_back), | 762 | .write_back = switch (mode) { |
| 763 | .offset => 0b0, | ||
| 764 | .pre_index, .post_index => 0b1, | ||
| 765 | }, | ||
| 747 | .byte_word = byte_word, | 766 | .byte_word = byte_word, |
| 748 | .up_down = @boolToInt(positive), | 767 | .up_down = @boolToInt(positive), |
| 749 | .pre_post = @boolToInt(pre_index), | 768 | .pre_post = switch (mode) { |
| 769 | .offset, .pre_index => 0b1, | ||
| 770 | .post_index => 0b0, | ||
| 771 | }, | ||
| 750 | .imm = @boolToInt(offset != .immediate), | 772 | .imm = @boolToInt(offset != .immediate), |
| 751 | }, | 773 | }, |
| 752 | }; | 774 | }; |
| ... | @@ -754,9 +776,8 @@ pub const Instruction = union(enum) { | ... | @@ -754,9 +776,8 @@ pub const Instruction = union(enum) { |
| 754 | 776 | ||
| 755 | fn extraLoadStore( | 777 | fn extraLoadStore( |
| 756 | cond: Condition, | 778 | cond: Condition, |
| 757 | pre_index: bool, | 779 | mode: AddressingMode, |
| 758 | positive: bool, | 780 | positive: bool, |
| 759 | write_back: bool, | ||
| 760 | o1: u1, | 781 | o1: u1, |
| 761 | op2: u2, | 782 | op2: u2, |
| 762 | rn: Register, | 783 | rn: Register, |
| ... | @@ -780,10 +801,16 @@ pub const Instruction = union(enum) { | ... | @@ -780,10 +801,16 @@ pub const Instruction = union(enum) { |
| 780 | .rt = rt.id(), | 801 | .rt = rt.id(), |
| 781 | .rn = rn.id(), | 802 | .rn = rn.id(), |
| 782 | .o1 = o1, | 803 | .o1 = o1, |
| 783 | .write_back = @boolToInt(write_back), | 804 | .write_back = switch (mode) { |
| 805 | .offset => 0b0, | ||
| 806 | .pre_index, .post_index => 0b1, | ||
| 807 | }, | ||
| 784 | .imm = @boolToInt(offset == .immediate), | 808 | .imm = @boolToInt(offset == .immediate), |
| 785 | .up_down = @boolToInt(positive), | 809 | .up_down = @boolToInt(positive), |
| 786 | .pre_index = @boolToInt(pre_index), | 810 | .pre_index = switch (mode) { |
| 811 | .offset, .pre_index => 0b1, | ||
| 812 | .post_index => 0b0, | ||
| 813 | }, | ||
| 787 | .cond = @enumToInt(cond), | 814 | .cond = @enumToInt(cond), |
| 788 | }, | 815 | }, |
| 789 | }; | 816 | }; |
| ... | @@ -1091,51 +1118,49 @@ pub const Instruction = union(enum) { | ... | @@ -1091,51 +1118,49 @@ pub const Instruction = union(enum) { |
| 1091 | // Single data transfer | 1118 | // Single data transfer |
| 1092 | 1119 | ||
| 1093 | pub const OffsetArgs = struct { | 1120 | pub const OffsetArgs = struct { |
| 1094 | pre_index: bool = true, | 1121 | mode: AddressingMode = .offset, |
| 1095 | positive: bool = true, | 1122 | positive: bool = true, |
| 1096 | offset: Offset, | 1123 | offset: Offset, |
| 1097 | write_back: bool = false, | ||
| 1098 | }; | 1124 | }; |
| 1099 | 1125 | ||
| 1100 | pub fn ldr(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { | 1126 | pub fn ldr(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { |
| 1101 | return singleDataTransfer(cond, rd, rn, args.offset, args.pre_index, args.positive, 0, args.write_back, 1); | 1127 | return singleDataTransfer(cond, rd, rn, args.offset, args.mode, args.positive, 0, 1); |
| 1102 | } | 1128 | } |
| 1103 | 1129 | ||
| 1104 | pub fn ldrb(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { | 1130 | pub fn ldrb(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { |
| 1105 | return singleDataTransfer(cond, rd, rn, args.offset, args.pre_index, args.positive, 1, args.write_back, 1); | 1131 | return singleDataTransfer(cond, rd, rn, args.offset, args.mode, args.positive, 1, 1); |
| 1106 | } | 1132 | } |
| 1107 | 1133 | ||
| 1108 | pub fn str(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { | 1134 | pub fn str(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { |
| 1109 | return singleDataTransfer(cond, rd, rn, args.offset, args.pre_index, args.positive, 0, args.write_back, 0); | 1135 | return singleDataTransfer(cond, rd, rn, args.offset, args.mode, args.positive, 0, 0); |
| 1110 | } | 1136 | } |
| 1111 | 1137 | ||
| 1112 | pub fn strb(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { | 1138 | pub fn strb(cond: Condition, rd: Register, rn: Register, args: OffsetArgs) Instruction { |
| 1113 | return singleDataTransfer(cond, rd, rn, args.offset, args.pre_index, args.positive, 1, args.write_back, 0); | 1139 | return singleDataTransfer(cond, rd, rn, args.offset, args.mode, args.positive, 1, 0); |
| 1114 | } | 1140 | } |
| 1115 | 1141 | ||
| 1116 | // Extra load/store | 1142 | // Extra load/store |
| 1117 | 1143 | ||
| 1118 | pub const ExtraLoadStoreOffsetArgs = struct { | 1144 | pub const ExtraLoadStoreOffsetArgs = struct { |
| 1119 | pre_index: bool = true, | 1145 | mode: AddressingMode = .offset, |
| 1120 | positive: bool = true, | 1146 | positive: bool = true, |
| 1121 | offset: ExtraLoadStoreOffset, | 1147 | offset: ExtraLoadStoreOffset, |
| 1122 | write_back: bool = false, | ||
| 1123 | }; | 1148 | }; |
| 1124 | 1149 | ||
| 1125 | pub fn strh(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { | 1150 | pub fn strh(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { |
| 1126 | return extraLoadStore(cond, args.pre_index, args.positive, args.write_back, 0b0, 0b01, rn, rt, args.offset); | 1151 | return extraLoadStore(cond, args.mode, args.positive, 0b0, 0b01, rn, rt, args.offset); |
| 1127 | } | 1152 | } |
| 1128 | 1153 | ||
| 1129 | pub fn ldrh(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { | 1154 | pub fn ldrh(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { |
| 1130 | return extraLoadStore(cond, args.pre_index, args.positive, args.write_back, 0b1, 0b01, rn, rt, args.offset); | 1155 | return extraLoadStore(cond, args.mode, args.positive, 0b1, 0b01, rn, rt, args.offset); |
| 1131 | } | 1156 | } |
| 1132 | 1157 | ||
| 1133 | pub fn ldrsh(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { | 1158 | pub fn ldrsh(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { |
| 1134 | return extraLoadStore(cond, args.pre_index, args.positive, args.write_back, 0b1, 0b11, rn, rt, args.offset); | 1159 | return extraLoadStore(cond, args.mode, args.positive, 0b1, 0b11, rn, rt, args.offset); |
| 1135 | } | 1160 | } |
| 1136 | 1161 | ||
| 1137 | pub fn ldrsb(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { | 1162 | pub fn ldrsb(cond: Condition, rt: Register, rn: Register, args: ExtraLoadStoreOffsetArgs) Instruction { |
| 1138 | return extraLoadStore(cond, args.pre_index, args.positive, args.write_back, 0b1, 0b10, rn, rt, args.offset); | 1163 | return extraLoadStore(cond, args.mode, args.positive, 0b1, 0b10, rn, rt, args.offset); |
| 1139 | } | 1164 | } |
| 1140 | 1165 | ||
| 1141 | // Block data transfer | 1166 | // Block data transfer |
| ... | @@ -1234,10 +1259,9 @@ pub const Instruction = union(enum) { | ... | @@ -1234,10 +1259,9 @@ pub const Instruction = union(enum) { |
| 1234 | } else if (args.len == 1) { | 1259 | } else if (args.len == 1) { |
| 1235 | const reg = args[0]; | 1260 | const reg = args[0]; |
| 1236 | return ldr(cond, reg, .sp, .{ | 1261 | return ldr(cond, reg, .sp, .{ |
| 1237 | .pre_index = false, | 1262 | .mode = .post_index, |
| 1238 | .positive = true, | 1263 | .positive = true, |
| 1239 | .offset = Offset.imm(4), | 1264 | .offset = Offset.imm(4), |
| 1240 | .write_back = false, | ||
| 1241 | }); | 1265 | }); |
| 1242 | } else { | 1266 | } else { |
| 1243 | var register_list: u16 = 0; | 1267 | var register_list: u16 = 0; |
| ... | @@ -1259,10 +1283,9 @@ pub const Instruction = union(enum) { | ... | @@ -1259,10 +1283,9 @@ pub const Instruction = union(enum) { |
| 1259 | } else if (args.len == 1) { | 1283 | } else if (args.len == 1) { |
| 1260 | const reg = args[0]; | 1284 | const reg = args[0]; |
| 1261 | return str(cond, reg, .sp, .{ | 1285 | return str(cond, reg, .sp, .{ |
| 1262 | .pre_index = true, | 1286 | .mode = .pre_index, |
| 1263 | .positive = false, | 1287 | .positive = false, |
| 1264 | .offset = Offset.imm(4), | 1288 | .offset = Offset.imm(4), |
| 1265 | .write_back = true, | ||
| 1266 | }); | 1289 | }); |
| 1267 | } else { | 1290 | } else { |
| 1268 | var register_list: u16 = 0; | 1291 | var register_list: u16 = 0; |
| ... | @@ -1447,10 +1470,9 @@ test "aliases" { | ... | @@ -1447,10 +1470,9 @@ test "aliases" { |
| 1447 | .{ // pop { r6 } | 1470 | .{ // pop { r6 } |
| 1448 | .actual = Instruction.pop(.al, .{.r6}), | 1471 | .actual = Instruction.pop(.al, .{.r6}), |
| 1449 | .expected = Instruction.ldr(.al, .r6, .sp, .{ | 1472 | .expected = Instruction.ldr(.al, .r6, .sp, .{ |
| 1450 | .pre_index = false, | 1473 | .mode = .post_index, |
| 1451 | .positive = true, | 1474 | .positive = true, |
| 1452 | .offset = Instruction.Offset.imm(4), | 1475 | .offset = Instruction.Offset.imm(4), |
| 1453 | .write_back = false, | ||
| 1454 | }), | 1476 | }), |
| 1455 | }, | 1477 | }, |
| 1456 | .{ // pop { r1, r5 } | 1478 | .{ // pop { r1, r5 } |
| ... | @@ -1460,10 +1482,9 @@ test "aliases" { | ... | @@ -1460,10 +1482,9 @@ test "aliases" { |
| 1460 | .{ // push { r3 } | 1482 | .{ // push { r3 } |
| 1461 | .actual = Instruction.push(.al, .{.r3}), | 1483 | .actual = Instruction.push(.al, .{.r3}), |
| 1462 | .expected = Instruction.str(.al, .r3, .sp, .{ | 1484 | .expected = Instruction.str(.al, .r3, .sp, .{ |
| 1463 | .pre_index = true, | 1485 | .mode = .pre_index, |
| 1464 | .positive = false, | 1486 | .positive = false, |
| 1465 | .offset = Instruction.Offset.imm(4), | 1487 | .offset = Instruction.Offset.imm(4), |
| 1466 | .write_back = true, | ||
| 1467 | }), | 1488 | }), |
| 1468 | }, | 1489 | }, |
| 1469 | .{ // push { r0, r2 } | 1490 | .{ // push { r0, r2 } |
test/behavior/align.zig-2| ... | @@ -6,8 +6,6 @@ const native_arch = builtin.target.cpu.arch; | ... | @@ -6,8 +6,6 @@ const native_arch = builtin.target.cpu.arch; |
| 6 | var foo: u8 align(4) = 100; | 6 | var foo: u8 align(4) = 100; |
| 7 | 7 | ||
| 8 | test "global variable alignment" { | 8 | test "global variable alignment" { |
| 9 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 10 | |||
| 11 | comptime try expect(@typeInfo(@TypeOf(&foo)).Pointer.alignment == 4); | 9 | comptime try expect(@typeInfo(@TypeOf(&foo)).Pointer.alignment == 4); |
| 12 | comptime try expect(@TypeOf(&foo) == *align(4) u8); | 10 | comptime try expect(@TypeOf(&foo) == *align(4) u8); |
| 13 | { | 11 | { |
test/behavior/array.zig-5| ... | @@ -49,7 +49,6 @@ fn getArrayLen(a: []const u32) usize { | ... | @@ -49,7 +49,6 @@ fn getArrayLen(a: []const u32) usize { |
| 49 | 49 | ||
| 50 | test "array init with mult" { | 50 | test "array init with mult" { |
| 51 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 51 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 52 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 53 | 52 | ||
| 54 | const a = 'a'; | 53 | const a = 'a'; |
| 55 | var i: [8]u8 = [2]u8{ a, 'b' } ** 4; | 54 | var i: [8]u8 = [2]u8{ a, 'b' } ** 4; |
| ... | @@ -70,8 +69,6 @@ test "array literal with explicit type" { | ... | @@ -70,8 +69,6 @@ test "array literal with explicit type" { |
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | test "array literal with inferred length" { | 71 | test "array literal with inferred length" { |
| 73 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 74 | |||
| 75 | const hex_mult = [_]u16{ 4096, 256, 16, 1 }; | 72 | const hex_mult = [_]u16{ 4096, 256, 16, 1 }; |
| 76 | 73 | ||
| 77 | try expect(hex_mult.len == 4); | 74 | try expect(hex_mult.len == 4); |
| ... | @@ -100,7 +97,6 @@ test "array literal with specified size" { | ... | @@ -100,7 +97,6 @@ test "array literal with specified size" { |
| 100 | 97 | ||
| 101 | test "array len field" { | 98 | test "array len field" { |
| 102 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 99 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 103 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 104 | 100 | ||
| 105 | var arr = [4]u8{ 0, 0, 0, 0 }; | 101 | var arr = [4]u8{ 0, 0, 0, 0 }; |
| 106 | var ptr = &arr; | 102 | var ptr = &arr; |
| ... | @@ -142,7 +138,6 @@ test "array with sentinels" { | ... | @@ -142,7 +138,6 @@ test "array with sentinels" { |
| 142 | 138 | ||
| 143 | test "void arrays" { | 139 | test "void arrays" { |
| 144 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 140 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 145 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 146 | 141 | ||
| 147 | var array: [4]void = undefined; | 142 | var array: [4]void = undefined; |
| 148 | array[0] = void{}; | 143 | array[0] = void{}; |
test/behavior/basic.zig-7| ... | @@ -120,14 +120,12 @@ test "return string from function" { | ... | @@ -120,14 +120,12 @@ test "return string from function" { |
| 120 | 120 | ||
| 121 | test "hex escape" { | 121 | test "hex escape" { |
| 122 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 122 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 123 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 124 | 123 | ||
| 125 | try expect(mem.eql(u8, "\x68\x65\x6c\x6c\x6f", "hello")); | 124 | try expect(mem.eql(u8, "\x68\x65\x6c\x6c\x6f", "hello")); |
| 126 | } | 125 | } |
| 127 | 126 | ||
| 128 | test "multiline string" { | 127 | test "multiline string" { |
| 129 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 128 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 130 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 131 | 129 | ||
| 132 | const s1 = | 130 | const s1 = |
| 133 | \\one | 131 | \\one |
| ... | @@ -140,7 +138,6 @@ test "multiline string" { | ... | @@ -140,7 +138,6 @@ test "multiline string" { |
| 140 | 138 | ||
| 141 | test "multiline string comments at start" { | 139 | test "multiline string comments at start" { |
| 142 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 140 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 143 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 144 | 141 | ||
| 145 | const s1 = | 142 | const s1 = |
| 146 | //\\one | 143 | //\\one |
| ... | @@ -153,7 +150,6 @@ test "multiline string comments at start" { | ... | @@ -153,7 +150,6 @@ test "multiline string comments at start" { |
| 153 | 150 | ||
| 154 | test "multiline string comments at end" { | 151 | test "multiline string comments at end" { |
| 155 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 152 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 156 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 157 | 153 | ||
| 158 | const s1 = | 154 | const s1 = |
| 159 | \\one | 155 | \\one |
| ... | @@ -166,7 +162,6 @@ test "multiline string comments at end" { | ... | @@ -166,7 +162,6 @@ test "multiline string comments at end" { |
| 166 | 162 | ||
| 167 | test "multiline string comments in middle" { | 163 | test "multiline string comments in middle" { |
| 168 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 164 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 169 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 170 | 165 | ||
| 171 | const s1 = | 166 | const s1 = |
| 172 | \\one | 167 | \\one |
| ... | @@ -179,7 +174,6 @@ test "multiline string comments in middle" { | ... | @@ -179,7 +174,6 @@ test "multiline string comments in middle" { |
| 179 | 174 | ||
| 180 | test "multiline string comments at multiple places" { | 175 | test "multiline string comments at multiple places" { |
| 181 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 176 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 182 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 183 | 177 | ||
| 184 | const s1 = | 178 | const s1 = |
| 185 | \\one | 179 | \\one |
| ... | @@ -198,7 +192,6 @@ test "string concatenation" { | ... | @@ -198,7 +192,6 @@ test "string concatenation" { |
| 198 | 192 | ||
| 199 | test "array mult operator" { | 193 | test "array mult operator" { |
| 200 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 194 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 201 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 202 | 195 | ||
| 203 | try expect(mem.eql(u8, "ab" ** 5, "ababababab")); | 196 | try expect(mem.eql(u8, "ab" ** 5, "ababababab")); |
| 204 | } | 197 | } |
test/behavior/bitcast.zig-6| ... | @@ -76,7 +76,6 @@ fn conv_uN(comptime N: usize, x: std.meta.Int(.unsigned, N)) std.meta.Int(.signe | ... | @@ -76,7 +76,6 @@ fn conv_uN(comptime N: usize, x: std.meta.Int(.unsigned, N)) std.meta.Int(.signe |
| 76 | 76 | ||
| 77 | test "nested bitcast" { | 77 | test "nested bitcast" { |
| 78 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 78 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 79 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 80 | 79 | ||
| 81 | const S = struct { | 80 | const S = struct { |
| 82 | fn moo(x: isize) !void { | 81 | fn moo(x: isize) !void { |
| ... | @@ -96,7 +95,6 @@ test "nested bitcast" { | ... | @@ -96,7 +95,6 @@ test "nested bitcast" { |
| 96 | 95 | ||
| 97 | test "@bitCast enum to its integer type" { | 96 | test "@bitCast enum to its integer type" { |
| 98 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 97 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 99 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 100 | 98 | ||
| 101 | const SOCK = enum(c_int) { | 99 | const SOCK = enum(c_int) { |
| 102 | A, | 100 | A, |
| ... | @@ -116,7 +114,6 @@ test "@bitCast enum to its integer type" { | ... | @@ -116,7 +114,6 @@ test "@bitCast enum to its integer type" { |
| 116 | // issue #3010: compiler segfault | 114 | // issue #3010: compiler segfault |
| 117 | test "bitcast literal [4]u8 param to u32" { | 115 | test "bitcast literal [4]u8 param to u32" { |
| 118 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 116 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 119 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 120 | 117 | ||
| 121 | const ip = @bitCast(u32, [_]u8{ 255, 255, 255, 255 }); | 118 | const ip = @bitCast(u32, [_]u8{ 255, 255, 255, 255 }); |
| 122 | try expect(ip == maxInt(u32)); | 119 | try expect(ip == maxInt(u32)); |
| ... | @@ -124,7 +121,6 @@ test "bitcast literal [4]u8 param to u32" { | ... | @@ -124,7 +121,6 @@ test "bitcast literal [4]u8 param to u32" { |
| 124 | 121 | ||
| 125 | test "bitcast generates a temporary value" { | 122 | test "bitcast generates a temporary value" { |
| 126 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 123 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 127 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 128 | 124 | ||
| 129 | var y = @as(u16, 0x55AA); | 125 | var y = @as(u16, 0x55AA); |
| 130 | const x = @bitCast(u16, @bitCast([2]u8, y)); | 126 | const x = @bitCast(u16, @bitCast([2]u8, y)); |
| ... | @@ -247,7 +243,6 @@ test "bitcast packed struct literal to byte" { | ... | @@ -247,7 +243,6 @@ test "bitcast packed struct literal to byte" { |
| 247 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 243 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 248 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 244 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 249 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 245 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 250 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 251 | 246 | ||
| 252 | const Foo = packed struct { | 247 | const Foo = packed struct { |
| 253 | value: u8, | 248 | value: u8, |
| ... | @@ -261,7 +256,6 @@ test "comptime bitcast used in expression has the correct type" { | ... | @@ -261,7 +256,6 @@ test "comptime bitcast used in expression has the correct type" { |
| 261 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 256 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 262 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 257 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 263 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 258 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 264 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 265 | 259 | ||
| 266 | const Foo = packed struct { | 260 | const Foo = packed struct { |
| 267 | value: u8, | 261 | value: u8, |
test/behavior/bitreverse.zig-1| ... | @@ -7,7 +7,6 @@ test "@bitReverse large exotic integer" { | ... | @@ -7,7 +7,6 @@ test "@bitReverse large exotic integer" { |
| 7 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 7 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 8 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 8 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 9 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 9 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 10 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 11 | // Currently failing on stage1 for big-endian targets | 10 | // Currently failing on stage1 for big-endian targets |
| 12 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 11 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; |
| 13 | 12 |
test/behavior/bugs/3367.zig-1| ... | @@ -12,7 +12,6 @@ const Mixin = struct { | ... | @@ -12,7 +12,6 @@ const Mixin = struct { |
| 12 | test "container member access usingnamespace decls" { | 12 | test "container member access usingnamespace decls" { |
| 13 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 13 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 14 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 14 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 15 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 16 | var foo = Foo{}; | 15 | var foo = Foo{}; |
| 17 | foo.two(); | 16 | foo.two(); |
| 18 | } | 17 | } |
test/behavior/bugs/3586.zig-1| ... | @@ -7,7 +7,6 @@ const Container = struct { | ... | @@ -7,7 +7,6 @@ const Container = struct { |
| 7 | }; | 7 | }; |
| 8 | 8 | ||
| 9 | test "fixed" { | 9 | test "fixed" { |
| 10 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 11 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 12 | 11 | ||
| 13 | var ctr = Container{ | 12 | var ctr = Container{ |
test/behavior/bugs/4560.zig-1| ... | @@ -2,7 +2,6 @@ const std = @import("std"); | ... | @@ -2,7 +2,6 @@ const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | 2 | const builtin = @import("builtin"); |
| 3 | 3 | ||
| 4 | test "fixed" { | 4 | test "fixed" { |
| 5 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 6 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 7 | 6 | ||
| 8 | var s: S = .{ | 7 | var s: S = .{ |
test/behavior/bugs/704.zig-1| ... | @@ -6,7 +6,6 @@ const xxx = struct { | ... | @@ -6,7 +6,6 @@ const xxx = struct { |
| 6 | } | 6 | } |
| 7 | }; | 7 | }; |
| 8 | test "bug 704" { | 8 | test "bug 704" { |
| 9 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 11 | 10 | ||
| 12 | var x: xxx = undefined; | 11 | var x: xxx = undefined; |
test/behavior/cast.zig-6| ... | @@ -273,7 +273,6 @@ test "*const ?[*]const T to [*c]const [*c]const T" { | ... | @@ -273,7 +273,6 @@ test "*const ?[*]const T to [*c]const [*c]const T" { |
| 273 | 273 | ||
| 274 | test "array coersion to undefined at runtime" { | 274 | test "array coersion to undefined at runtime" { |
| 275 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 275 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 276 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 277 | 276 | ||
| 278 | @setRuntimeSafety(true); | 277 | @setRuntimeSafety(true); |
| 279 | 278 | ||
| ... | @@ -337,7 +336,6 @@ test "peer type unsigned int to signed" { | ... | @@ -337,7 +336,6 @@ test "peer type unsigned int to signed" { |
| 337 | 336 | ||
| 338 | test "expected [*c]const u8, found [*:0]const u8" { | 337 | test "expected [*c]const u8, found [*:0]const u8" { |
| 339 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 338 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 340 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 341 | 339 | ||
| 342 | var a: [*:0]const u8 = "hello"; | 340 | var a: [*:0]const u8 = "hello"; |
| 343 | var b: [*c]const u8 = a; | 341 | var b: [*c]const u8 = a; |
| ... | @@ -648,7 +646,6 @@ test "peer cast *[0]T to []const T" { | ... | @@ -648,7 +646,6 @@ test "peer cast *[0]T to []const T" { |
| 648 | test "peer cast *[N]T to [*]T" { | 646 | test "peer cast *[N]T to [*]T" { |
| 649 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 647 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 650 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 648 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 651 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 649 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 653 | 650 | ||
| 654 | var array = [4:99]i32{ 1, 2, 3, 4 }; | 651 | var array = [4:99]i32{ 1, 2, 3, 4 }; |
| ... | @@ -1067,7 +1064,6 @@ test "implicit cast *[0]T to E![]const u8" { | ... | @@ -1067,7 +1064,6 @@ test "implicit cast *[0]T to E![]const u8" { |
| 1067 | 1064 | ||
| 1068 | var global_array: [4]u8 = undefined; | 1065 | var global_array: [4]u8 = undefined; |
| 1069 | test "cast from array reference to fn: comptime fn ptr" { | 1066 | test "cast from array reference to fn: comptime fn ptr" { |
| 1070 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 1071 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1067 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1072 | 1068 | ||
| 1073 | const f = @ptrCast(*const fn () callconv(.C) void, &global_array); | 1069 | const f = @ptrCast(*const fn () callconv(.C) void, &global_array); |
| ... | @@ -1075,7 +1071,6 @@ test "cast from array reference to fn: comptime fn ptr" { | ... | @@ -1075,7 +1071,6 @@ test "cast from array reference to fn: comptime fn ptr" { |
| 1075 | } | 1071 | } |
| 1076 | test "cast from array reference to fn: runtime fn ptr" { | 1072 | test "cast from array reference to fn: runtime fn ptr" { |
| 1077 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 1073 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 1078 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 1079 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1074 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1080 | 1075 | ||
| 1081 | var f = @ptrCast(*const fn () callconv(.C) void, &global_array); | 1076 | var f = @ptrCast(*const fn () callconv(.C) void, &global_array); |
| ... | @@ -1100,7 +1095,6 @@ test "*const [N]null u8 to ?[]const u8" { | ... | @@ -1100,7 +1095,6 @@ test "*const [N]null u8 to ?[]const u8" { |
| 1100 | } | 1095 | } |
| 1101 | 1096 | ||
| 1102 | test "cast between [*c]T and ?[*:0]T on fn parameter" { | 1097 | test "cast between [*c]T and ?[*:0]T on fn parameter" { |
| 1103 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 1104 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1098 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1105 | 1099 | ||
| 1106 | const S = struct { | 1100 | const S = struct { |
test/behavior/defer.zig-2| ... | @@ -5,7 +5,6 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -5,7 +5,6 @@ const expectEqual = std.testing.expectEqual; |
| 5 | const expectError = std.testing.expectError; | 5 | const expectError = std.testing.expectError; |
| 6 | 6 | ||
| 7 | test "break and continue inside loop inside defer expression" { | 7 | test "break and continue inside loop inside defer expression" { |
| 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 10 | 9 | ||
| 11 | testBreakContInDefer(10); | 10 | testBreakContInDefer(10); |
| ... | @@ -24,7 +23,6 @@ fn testBreakContInDefer(x: usize) void { | ... | @@ -24,7 +23,6 @@ fn testBreakContInDefer(x: usize) void { |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | test "defer and labeled break" { | 25 | test "defer and labeled break" { |
| 27 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 28 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 26 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 29 | 27 | ||
| 30 | var i = @as(usize, 0); | 28 | var i = @as(usize, 0); |
test/behavior/enum.zig-21| ... | @@ -11,7 +11,6 @@ fn shouldEqual(n: Number, expected: u3) !void { | ... | @@ -11,7 +11,6 @@ fn shouldEqual(n: Number, expected: u3) !void { |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | test "enum to int" { | 13 | test "enum to int" { |
| 14 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 16 | 15 | ||
| 17 | try shouldEqual(Number.Zero, 0); | 16 | try shouldEqual(Number.Zero, 0); |
| ... | @@ -559,7 +558,6 @@ const ValueCount257 = enum { | ... | @@ -559,7 +558,6 @@ const ValueCount257 = enum { |
| 559 | }; | 558 | }; |
| 560 | 559 | ||
| 561 | test "enum sizes" { | 560 | test "enum sizes" { |
| 562 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 563 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 561 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 564 | 562 | ||
| 565 | comptime { | 563 | comptime { |
| ... | @@ -571,7 +569,6 @@ test "enum sizes" { | ... | @@ -571,7 +569,6 @@ test "enum sizes" { |
| 571 | } | 569 | } |
| 572 | 570 | ||
| 573 | test "enum literal equality" { | 571 | test "enum literal equality" { |
| 574 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 575 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 572 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 576 | 573 | ||
| 577 | const x = .hi; | 574 | const x = .hi; |
| ... | @@ -583,7 +580,6 @@ test "enum literal equality" { | ... | @@ -583,7 +580,6 @@ test "enum literal equality" { |
| 583 | } | 580 | } |
| 584 | 581 | ||
| 585 | test "enum literal cast to enum" { | 582 | test "enum literal cast to enum" { |
| 586 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 587 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 583 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 588 | 584 | ||
| 589 | const Color = enum { Auto, Off, On }; | 585 | const Color = enum { Auto, Off, On }; |
| ... | @@ -594,7 +590,6 @@ test "enum literal cast to enum" { | ... | @@ -594,7 +590,6 @@ test "enum literal cast to enum" { |
| 594 | } | 590 | } |
| 595 | 591 | ||
| 596 | test "peer type resolution with enum literal" { | 592 | test "peer type resolution with enum literal" { |
| 597 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 598 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 593 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 599 | 594 | ||
| 600 | const Items = enum { one, two }; | 595 | const Items = enum { one, two }; |
| ... | @@ -675,7 +670,6 @@ test "non-exhaustive enum" { | ... | @@ -675,7 +670,6 @@ test "non-exhaustive enum" { |
| 675 | } | 670 | } |
| 676 | 671 | ||
| 677 | test "empty non-exhaustive enum" { | 672 | test "empty non-exhaustive enum" { |
| 678 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 679 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 673 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 680 | 674 | ||
| 681 | const S = struct { | 675 | const S = struct { |
| ... | @@ -741,7 +735,6 @@ const EnumWithTagValues = enum(u4) { | ... | @@ -741,7 +735,6 @@ const EnumWithTagValues = enum(u4) { |
| 741 | D = 1 << 3, | 735 | D = 1 << 3, |
| 742 | }; | 736 | }; |
| 743 | test "enum with tag values don't require parens" { | 737 | test "enum with tag values don't require parens" { |
| 744 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 745 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 738 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 746 | 739 | ||
| 747 | try expect(@enumToInt(EnumWithTagValues.C) == 0b0100); | 740 | try expect(@enumToInt(EnumWithTagValues.C) == 0b0100); |
| ... | @@ -760,7 +753,6 @@ const MultipleChoice2 = enum(u32) { | ... | @@ -760,7 +753,6 @@ const MultipleChoice2 = enum(u32) { |
| 760 | }; | 753 | }; |
| 761 | 754 | ||
| 762 | test "cast integer literal to enum" { | 755 | test "cast integer literal to enum" { |
| 763 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 764 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 756 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 765 | 757 | ||
| 766 | try expect(@intToEnum(MultipleChoice2, 0) == MultipleChoice2.Unspecified1); | 758 | try expect(@intToEnum(MultipleChoice2, 0) == MultipleChoice2.Unspecified1); |
| ... | @@ -795,7 +787,6 @@ const Small2 = enum(u2) { One, Two }; | ... | @@ -795,7 +787,6 @@ const Small2 = enum(u2) { One, Two }; |
| 795 | const Small = enum(u2) { One, Two, Three, Four }; | 787 | const Small = enum(u2) { One, Two, Three, Four }; |
| 796 | 788 | ||
| 797 | test "set enum tag type" { | 789 | test "set enum tag type" { |
| 798 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 799 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 790 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 800 | 791 | ||
| 801 | { | 792 | { |
| ... | @@ -811,7 +802,6 @@ test "set enum tag type" { | ... | @@ -811,7 +802,6 @@ test "set enum tag type" { |
| 811 | } | 802 | } |
| 812 | 803 | ||
| 813 | test "casting enum to its tag type" { | 804 | test "casting enum to its tag type" { |
| 814 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 815 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 805 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 816 | 806 | ||
| 817 | try testCastEnumTag(Small2.Two); | 807 | try testCastEnumTag(Small2.Two); |
| ... | @@ -823,7 +813,6 @@ fn testCastEnumTag(value: Small2) !void { | ... | @@ -823,7 +813,6 @@ fn testCastEnumTag(value: Small2) !void { |
| 823 | } | 813 | } |
| 824 | 814 | ||
| 825 | test "enum with 1 field but explicit tag type should still have the tag type" { | 815 | test "enum with 1 field but explicit tag type should still have the tag type" { |
| 826 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 827 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 816 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 828 | 817 | ||
| 829 | const Enum = enum(u8) { | 818 | const Enum = enum(u8) { |
| ... | @@ -833,7 +822,6 @@ test "enum with 1 field but explicit tag type should still have the tag type" { | ... | @@ -833,7 +822,6 @@ test "enum with 1 field but explicit tag type should still have the tag type" { |
| 833 | } | 822 | } |
| 834 | 823 | ||
| 835 | test "signed integer as enum tag" { | 824 | test "signed integer as enum tag" { |
| 836 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 837 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 825 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 838 | 826 | ||
| 839 | const SignedEnum = enum(i2) { | 827 | const SignedEnum = enum(i2) { |
| ... | @@ -848,7 +836,6 @@ test "signed integer as enum tag" { | ... | @@ -848,7 +836,6 @@ test "signed integer as enum tag" { |
| 848 | } | 836 | } |
| 849 | 837 | ||
| 850 | test "enum with one member and custom tag type" { | 838 | test "enum with one member and custom tag type" { |
| 851 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 852 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 839 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 853 | 840 | ||
| 854 | const E = enum(u2) { | 841 | const E = enum(u2) { |
| ... | @@ -862,7 +849,6 @@ test "enum with one member and custom tag type" { | ... | @@ -862,7 +849,6 @@ test "enum with one member and custom tag type" { |
| 862 | } | 849 | } |
| 863 | 850 | ||
| 864 | test "enum with one member and u1 tag type @enumToInt" { | 851 | test "enum with one member and u1 tag type @enumToInt" { |
| 865 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 866 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 852 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 867 | 853 | ||
| 868 | const Enum = enum(u1) { | 854 | const Enum = enum(u1) { |
| ... | @@ -872,7 +858,6 @@ test "enum with one member and u1 tag type @enumToInt" { | ... | @@ -872,7 +858,6 @@ test "enum with one member and u1 tag type @enumToInt" { |
| 872 | } | 858 | } |
| 873 | 859 | ||
| 874 | test "enum with comptime_int tag type" { | 860 | test "enum with comptime_int tag type" { |
| 875 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 876 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 861 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 877 | 862 | ||
| 878 | const Enum = enum(comptime_int) { | 863 | const Enum = enum(comptime_int) { |
| ... | @@ -884,7 +869,6 @@ test "enum with comptime_int tag type" { | ... | @@ -884,7 +869,6 @@ test "enum with comptime_int tag type" { |
| 884 | } | 869 | } |
| 885 | 870 | ||
| 886 | test "enum with one member default to u0 tag type" { | 871 | test "enum with one member default to u0 tag type" { |
| 887 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 888 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 872 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 889 | 873 | ||
| 890 | const E0 = enum { X }; | 874 | const E0 = enum { X }; |
| ... | @@ -903,7 +887,6 @@ fn doALoopThing(id: EnumWithOneMember) void { | ... | @@ -903,7 +887,6 @@ fn doALoopThing(id: EnumWithOneMember) void { |
| 903 | } | 887 | } |
| 904 | 888 | ||
| 905 | test "comparison operator on enum with one member is comptime known" { | 889 | test "comparison operator on enum with one member is comptime known" { |
| 906 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 907 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 890 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 908 | 891 | ||
| 909 | doALoopThing(EnumWithOneMember.Eof); | 892 | doALoopThing(EnumWithOneMember.Eof); |
| ... | @@ -911,7 +894,6 @@ test "comparison operator on enum with one member is comptime known" { | ... | @@ -911,7 +894,6 @@ test "comparison operator on enum with one member is comptime known" { |
| 911 | 894 | ||
| 912 | const State = enum { Start }; | 895 | const State = enum { Start }; |
| 913 | test "switch on enum with one member is comptime known" { | 896 | test "switch on enum with one member is comptime known" { |
| 914 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 915 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 897 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 916 | 898 | ||
| 917 | var state = State.Start; | 899 | var state = State.Start; |
| ... | @@ -922,7 +904,6 @@ test "switch on enum with one member is comptime known" { | ... | @@ -922,7 +904,6 @@ test "switch on enum with one member is comptime known" { |
| 922 | } | 904 | } |
| 923 | 905 | ||
| 924 | test "method call on an enum" { | 906 | test "method call on an enum" { |
| 925 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 926 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 907 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 927 | 908 | ||
| 928 | const S = struct { | 909 | const S = struct { |
| ... | @@ -1117,7 +1098,6 @@ test "tag name with assigned enum values" { | ... | @@ -1117,7 +1098,6 @@ test "tag name with assigned enum values" { |
| 1117 | } | 1098 | } |
| 1118 | 1099 | ||
| 1119 | test "@tagName on enum literals" { | 1100 | test "@tagName on enum literals" { |
| 1120 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 1121 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1101 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1122 | 1102 | ||
| 1123 | try expect(mem.eql(u8, @tagName(.FooBar), "FooBar")); | 1103 | try expect(mem.eql(u8, @tagName(.FooBar), "FooBar")); |
| ... | @@ -1184,7 +1164,6 @@ fn getC(data: *const BitFieldOfEnums) C { | ... | @@ -1184,7 +1164,6 @@ fn getC(data: *const BitFieldOfEnums) C { |
| 1184 | } | 1164 | } |
| 1185 | 1165 | ||
| 1186 | test "enum literal in array literal" { | 1166 | test "enum literal in array literal" { |
| 1187 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 1188 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1167 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1189 | 1168 | ||
| 1190 | const Items = enum { one, two }; | 1169 | const Items = enum { one, two }; |
test/behavior/error.zig-7| ... | @@ -6,7 +6,6 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -6,7 +6,6 @@ const expectEqual = std.testing.expectEqual; |
| 6 | const mem = std.mem; | 6 | const mem = std.mem; |
| 7 | 7 | ||
| 8 | test "error values" { | 8 | test "error values" { |
| 9 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 11 | 10 | ||
| 12 | const a = @errorToInt(error.err1); | 11 | const a = @errorToInt(error.err1); |
| ... | @@ -15,7 +14,6 @@ test "error values" { | ... | @@ -15,7 +14,6 @@ test "error values" { |
| 15 | } | 14 | } |
| 16 | 15 | ||
| 17 | test "redefinition of error values allowed" { | 16 | test "redefinition of error values allowed" { |
| 18 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 19 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 17 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 20 | 18 | ||
| 21 | shouldBeNotEqual(error.AnError, error.SecondError); | 19 | shouldBeNotEqual(error.AnError, error.SecondError); |
| ... | @@ -39,7 +37,6 @@ fn errBinaryOperatorG(x: bool) anyerror!isize { | ... | @@ -39,7 +37,6 @@ fn errBinaryOperatorG(x: bool) anyerror!isize { |
| 39 | } | 37 | } |
| 40 | 38 | ||
| 41 | test "empty error union" { | 39 | test "empty error union" { |
| 42 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 43 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 40 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 44 | 41 | ||
| 45 | const x = error{} || error{}; | 42 | const x = error{} || error{}; |
| ... | @@ -98,7 +95,6 @@ fn makeANonErr() anyerror!i32 { | ... | @@ -98,7 +95,6 @@ fn makeANonErr() anyerror!i32 { |
| 98 | } | 95 | } |
| 99 | 96 | ||
| 100 | test "syntax: optional operator in front of error union operator" { | 97 | test "syntax: optional operator in front of error union operator" { |
| 101 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 102 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 98 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 103 | 99 | ||
| 104 | comptime { | 100 | comptime { |
| ... | @@ -157,7 +153,6 @@ test "implicit cast to optional to error union to return result loc" { | ... | @@ -157,7 +153,6 @@ test "implicit cast to optional to error union to return result loc" { |
| 157 | } | 153 | } |
| 158 | 154 | ||
| 159 | test "error: fn returning empty error set can be passed as fn returning any error" { | 155 | test "error: fn returning empty error set can be passed as fn returning any error" { |
| 160 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 161 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 156 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 162 | 157 | ||
| 163 | entry(); | 158 | entry(); |
| ... | @@ -178,7 +173,6 @@ fn bar2() (error{}!void) {} | ... | @@ -178,7 +173,6 @@ fn bar2() (error{}!void) {} |
| 178 | test "error union type " { | 173 | test "error union type " { |
| 179 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 174 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 180 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 175 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 181 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 182 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 176 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 183 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 177 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 184 | 178 | ||
| ... | @@ -197,7 +191,6 @@ fn testErrorUnionType() !void { | ... | @@ -197,7 +191,6 @@ fn testErrorUnionType() !void { |
| 197 | test "error set type" { | 191 | test "error set type" { |
| 198 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 192 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 199 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 193 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 200 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 201 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 194 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 202 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 195 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 203 | 196 |
test/behavior/fn.zig-15| ... | @@ -5,7 +5,6 @@ const expect = testing.expect; | ... | @@ -5,7 +5,6 @@ const expect = testing.expect; |
| 5 | const expectEqual = testing.expectEqual; | 5 | const expectEqual = testing.expectEqual; |
| 6 | 6 | ||
| 7 | test "params" { | 7 | test "params" { |
| 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 10 | 9 | ||
| 11 | try expect(testParamsAdd(22, 11) == 33); | 10 | try expect(testParamsAdd(22, 11) == 33); |
| ... | @@ -15,7 +14,6 @@ fn testParamsAdd(a: i32, b: i32) i32 { | ... | @@ -15,7 +14,6 @@ fn testParamsAdd(a: i32, b: i32) i32 { |
| 15 | } | 14 | } |
| 16 | 15 | ||
| 17 | test "local variables" { | 16 | test "local variables" { |
| 18 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 19 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 17 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 20 | 18 | ||
| 21 | testLocVars(2); | 19 | testLocVars(2); |
| ... | @@ -26,7 +24,6 @@ fn testLocVars(b: i32) void { | ... | @@ -26,7 +24,6 @@ fn testLocVars(b: i32) void { |
| 26 | } | 24 | } |
| 27 | 25 | ||
| 28 | test "mutable local variables" { | 26 | test "mutable local variables" { |
| 29 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 30 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 27 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 31 | 28 | ||
| 32 | var zero: i32 = 0; | 29 | var zero: i32 = 0; |
| ... | @@ -40,7 +37,6 @@ test "mutable local variables" { | ... | @@ -40,7 +37,6 @@ test "mutable local variables" { |
| 40 | } | 37 | } |
| 41 | 38 | ||
| 42 | test "separate block scopes" { | 39 | test "separate block scopes" { |
| 43 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 44 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 40 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 45 | 41 | ||
| 46 | { | 42 | { |
| ... | @@ -59,14 +55,12 @@ fn @"weird function name"() i32 { | ... | @@ -59,14 +55,12 @@ fn @"weird function name"() i32 { |
| 59 | return 1234; | 55 | return 1234; |
| 60 | } | 56 | } |
| 61 | test "weird function name" { | 57 | test "weird function name" { |
| 62 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 63 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 58 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 64 | 59 | ||
| 65 | try expect(@"weird function name"() == 1234); | 60 | try expect(@"weird function name"() == 1234); |
| 66 | } | 61 | } |
| 67 | 62 | ||
| 68 | test "assign inline fn to const variable" { | 63 | test "assign inline fn to const variable" { |
| 69 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 70 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 64 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 71 | 65 | ||
| 72 | const a = inlineFn; | 66 | const a = inlineFn; |
| ... | @@ -86,7 +80,6 @@ fn outer(y: u32) *const fn (u32) u32 { | ... | @@ -86,7 +80,6 @@ fn outer(y: u32) *const fn (u32) u32 { |
| 86 | } | 80 | } |
| 87 | 81 | ||
| 88 | test "return inner function which references comptime variable of outer function" { | 82 | test "return inner function which references comptime variable of outer function" { |
| 89 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 90 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 83 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 91 | 84 | ||
| 92 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 85 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; |
| ... | @@ -156,7 +149,6 @@ test "inline function call that calls optional function pointer, return pointer | ... | @@ -156,7 +149,6 @@ test "inline function call that calls optional function pointer, return pointer |
| 156 | } | 149 | } |
| 157 | 150 | ||
| 158 | test "implicit cast function unreachable return" { | 151 | test "implicit cast function unreachable return" { |
| 159 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 160 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 152 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 161 | 153 | ||
| 162 | wantsFnWithVoid(fnWithUnreachable); | 154 | wantsFnWithVoid(fnWithUnreachable); |
| ... | @@ -209,7 +201,6 @@ test "function with complex callconv and return type expressions" { | ... | @@ -209,7 +201,6 @@ test "function with complex callconv and return type expressions" { |
| 209 | } | 201 | } |
| 210 | 202 | ||
| 211 | test "pass by non-copying value" { | 203 | test "pass by non-copying value" { |
| 212 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 213 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 204 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 214 | 205 | ||
| 215 | try expect(addPointCoords(Point{ .x = 1, .y = 2 }) == 3); | 206 | try expect(addPointCoords(Point{ .x = 1, .y = 2 }) == 3); |
| ... | @@ -238,7 +229,6 @@ fn addPointCoordsVar(pt: anytype) !i32 { | ... | @@ -238,7 +229,6 @@ fn addPointCoordsVar(pt: anytype) !i32 { |
| 238 | } | 229 | } |
| 239 | 230 | ||
| 240 | test "pass by non-copying value as method" { | 231 | test "pass by non-copying value as method" { |
| 241 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 242 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 232 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 243 | 233 | ||
| 244 | var pt = Point2{ .x = 1, .y = 2 }; | 234 | var pt = Point2{ .x = 1, .y = 2 }; |
| ... | @@ -255,7 +245,6 @@ const Point2 = struct { | ... | @@ -255,7 +245,6 @@ const Point2 = struct { |
| 255 | }; | 245 | }; |
| 256 | 246 | ||
| 257 | test "pass by non-copying value as method, which is generic" { | 247 | test "pass by non-copying value as method, which is generic" { |
| 258 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 259 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 248 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 260 | 249 | ||
| 261 | var pt = Point3{ .x = 1, .y = 2 }; | 250 | var pt = Point3{ .x = 1, .y = 2 }; |
| ... | @@ -273,7 +262,6 @@ const Point3 = struct { | ... | @@ -273,7 +262,6 @@ const Point3 = struct { |
| 273 | }; | 262 | }; |
| 274 | 263 | ||
| 275 | test "pass by non-copying value as method, at comptime" { | 264 | test "pass by non-copying value as method, at comptime" { |
| 276 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 277 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 265 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 278 | 266 | ||
| 279 | comptime { | 267 | comptime { |
| ... | @@ -325,7 +313,6 @@ fn voidFun(a: i32, b: void, c: i32, d: void) !void { | ... | @@ -325,7 +313,6 @@ fn voidFun(a: i32, b: void, c: i32, d: void) !void { |
| 325 | } | 313 | } |
| 326 | 314 | ||
| 327 | test "call function with empty string" { | 315 | test "call function with empty string" { |
| 328 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 329 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 316 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 330 | 317 | ||
| 331 | acceptsString(""); | 318 | acceptsString(""); |
| ... | @@ -362,7 +349,6 @@ fn fn4() u32 { | ... | @@ -362,7 +349,6 @@ fn fn4() u32 { |
| 362 | } | 349 | } |
| 363 | 350 | ||
| 364 | test "number literal as an argument" { | 351 | test "number literal as an argument" { |
| 365 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 366 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 352 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 367 | 353 | ||
| 368 | try numberLiteralArg(3); | 354 | try numberLiteralArg(3); |
| ... | @@ -395,7 +381,6 @@ test "function call with anon list literal" { | ... | @@ -395,7 +381,6 @@ test "function call with anon list literal" { |
| 395 | } | 381 | } |
| 396 | 382 | ||
| 397 | test "ability to give comptime types and non comptime types to same parameter" { | 383 | test "ability to give comptime types and non comptime types to same parameter" { |
| 398 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 399 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 384 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 400 | 385 | ||
| 401 | const S = struct { | 386 | const S = struct { |
test/behavior/for.zig-3| ... | @@ -21,7 +21,6 @@ test "continue in for loop" { | ... | @@ -21,7 +21,6 @@ test "continue in for loop" { |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | test "break from outer for loop" { | 23 | test "break from outer for loop" { |
| 24 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 25 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 24 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 26 | 25 | ||
| 27 | try testBreakOuter(); | 26 | try testBreakOuter(); |
| ... | @@ -41,7 +40,6 @@ fn testBreakOuter() !void { | ... | @@ -41,7 +40,6 @@ fn testBreakOuter() !void { |
| 41 | } | 40 | } |
| 42 | 41 | ||
| 43 | test "continue outer for loop" { | 42 | test "continue outer for loop" { |
| 44 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 45 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 43 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 46 | 44 | ||
| 47 | try testContinueOuter(); | 45 | try testContinueOuter(); |
| ... | @@ -61,7 +59,6 @@ fn testContinueOuter() !void { | ... | @@ -61,7 +59,6 @@ fn testContinueOuter() !void { |
| 61 | } | 59 | } |
| 62 | 60 | ||
| 63 | test "ignore lval with underscore (for loop)" { | 61 | test "ignore lval with underscore (for loop)" { |
| 64 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 65 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 62 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 66 | 63 | ||
| 67 | for ([_]void{}) |_, i| { | 64 | for ([_]void{}) |_, i| { |
test/behavior/generics.zig-6| ... | @@ -5,7 +5,6 @@ const expect = testing.expect; | ... | @@ -5,7 +5,6 @@ const expect = testing.expect; |
| 5 | const expectEqual = testing.expectEqual; | 5 | const expectEqual = testing.expectEqual; |
| 6 | 6 | ||
| 7 | test "one param, explicit comptime" { | 7 | test "one param, explicit comptime" { |
| 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 10 | 9 | ||
| 11 | var x: usize = 0; | 10 | var x: usize = 0; |
| ... | @@ -43,7 +42,6 @@ fn add(comptime a: i32, b: i32) i32 { | ... | @@ -43,7 +42,6 @@ fn add(comptime a: i32, b: i32) i32 { |
| 43 | 42 | ||
| 44 | const the_max = max(u32, 1234, 5678); | 43 | const the_max = max(u32, 1234, 5678); |
| 45 | test "compile time generic eval" { | 44 | test "compile time generic eval" { |
| 46 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 47 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 45 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 48 | 46 | ||
| 49 | try expect(the_max == 5678); | 47 | try expect(the_max == 5678); |
| ... | @@ -144,7 +142,6 @@ pub fn SmallList(comptime T: type, comptime STATIC_SIZE: usize) type { | ... | @@ -144,7 +142,6 @@ pub fn SmallList(comptime T: type, comptime STATIC_SIZE: usize) type { |
| 144 | } | 142 | } |
| 145 | 143 | ||
| 146 | test "const decls in struct" { | 144 | test "const decls in struct" { |
| 147 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 148 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 145 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 149 | 146 | ||
| 150 | try expect(GenericDataThing(3).count_plus_one == 4); | 147 | try expect(GenericDataThing(3).count_plus_one == 4); |
| ... | @@ -156,7 +153,6 @@ fn GenericDataThing(comptime count: isize) type { | ... | @@ -156,7 +153,6 @@ fn GenericDataThing(comptime count: isize) type { |
| 156 | } | 153 | } |
| 157 | 154 | ||
| 158 | test "use generic param in generic param" { | 155 | test "use generic param in generic param" { |
| 159 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 160 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 156 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 161 | 157 | ||
| 162 | try expect(aGenericFn(i32, 3, 4) == 7); | 158 | try expect(aGenericFn(i32, 3, 4) == 7); |
| ... | @@ -201,7 +197,6 @@ test "generic fn keeps non-generic parameter types" { | ... | @@ -201,7 +197,6 @@ test "generic fn keeps non-generic parameter types" { |
| 201 | } | 197 | } |
| 202 | 198 | ||
| 203 | test "array of generic fns" { | 199 | test "array of generic fns" { |
| 204 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 205 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 200 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 206 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 201 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 207 | 202 | ||
| ... | @@ -223,7 +218,6 @@ fn foo2(arg: anytype) bool { | ... | @@ -223,7 +218,6 @@ fn foo2(arg: anytype) bool { |
| 223 | 218 | ||
| 224 | test "generic struct" { | 219 | test "generic struct" { |
| 225 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 220 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 226 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 227 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 221 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 228 | var a1 = GenNode(i32){ | 222 | var a1 = GenNode(i32){ |
| 229 | .value = 13, | 223 | .value = 13, |
test/behavior/if.zig-4| ... | @@ -4,7 +4,6 @@ const expect = std.testing.expect; | ... | @@ -4,7 +4,6 @@ const expect = std.testing.expect; |
| 4 | const expectEqual = std.testing.expectEqual; | 4 | const expectEqual = std.testing.expectEqual; |
| 5 | 5 | ||
| 6 | test "if statements" { | 6 | test "if statements" { |
| 7 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 7 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 9 | 8 | ||
| 10 | shouldBeEqual(1, 1); | 9 | shouldBeEqual(1, 1); |
| ... | @@ -30,7 +29,6 @@ fn firstEqlThird(a: i32, b: i32, c: i32) void { | ... | @@ -30,7 +29,6 @@ fn firstEqlThird(a: i32, b: i32, c: i32) void { |
| 30 | } | 29 | } |
| 31 | 30 | ||
| 32 | test "else if expression" { | 31 | test "else if expression" { |
| 33 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 34 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 32 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 35 | 33 | ||
| 36 | try expect(elseIfExpressionF(1) == 1); | 34 | try expect(elseIfExpressionF(1) == 1); |
| ... | @@ -67,7 +65,6 @@ test "unwrap mutable global var" { | ... | @@ -67,7 +65,6 @@ test "unwrap mutable global var" { |
| 67 | } | 65 | } |
| 68 | 66 | ||
| 69 | test "labeled break inside comptime if inside runtime if" { | 67 | test "labeled break inside comptime if inside runtime if" { |
| 70 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 71 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 68 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 72 | 69 | ||
| 73 | var answer: i32 = 0; | 70 | var answer: i32 = 0; |
| ... | @@ -81,7 +78,6 @@ test "labeled break inside comptime if inside runtime if" { | ... | @@ -81,7 +78,6 @@ test "labeled break inside comptime if inside runtime if" { |
| 81 | } | 78 | } |
| 82 | 79 | ||
| 83 | test "const result loc, runtime if cond, else unreachable" { | 80 | test "const result loc, runtime if cond, else unreachable" { |
| 84 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 85 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 81 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 86 | 82 | ||
| 87 | const Num = enum { One, Two }; | 83 | const Num = enum { One, Two }; |
test/behavior/slice.zig-4| ... | @@ -220,7 +220,6 @@ test "compile time slice of pointer to hard coded address" { | ... | @@ -220,7 +220,6 @@ test "compile time slice of pointer to hard coded address" { |
| 220 | 220 | ||
| 221 | test "slice string literal has correct type" { | 221 | test "slice string literal has correct type" { |
| 222 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 222 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 223 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 224 | 223 | ||
| 225 | comptime { | 224 | comptime { |
| 226 | try expect(@TypeOf("aoeu"[0..]) == *const [4:0]u8); | 225 | try expect(@TypeOf("aoeu"[0..]) == *const [4:0]u8); |
| ... | @@ -258,7 +257,6 @@ fn sliceFromLenToLen(a_slice: []u8, start: usize, end: usize) []u8 { | ... | @@ -258,7 +257,6 @@ fn sliceFromLenToLen(a_slice: []u8, start: usize, end: usize) []u8 { |
| 258 | 257 | ||
| 259 | test "C pointer" { | 258 | test "C pointer" { |
| 260 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 259 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 261 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 262 | 260 | ||
| 263 | var buf: [*c]const u8 = "kjdhfkjdhfdkjhfkfjhdfkjdhfkdjhfdkjhf"; | 261 | var buf: [*c]const u8 = "kjdhfkjdhfdkjhfkfjhdfkjdhfkdjhfdkjhf"; |
| 264 | var len: u32 = 10; | 262 | var len: u32 = 10; |
| ... | @@ -357,7 +355,6 @@ test "empty array to slice" { | ... | @@ -357,7 +355,6 @@ test "empty array to slice" { |
| 357 | 355 | ||
| 358 | test "@ptrCast slice to pointer" { | 356 | test "@ptrCast slice to pointer" { |
| 359 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 357 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 360 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 361 | 358 | ||
| 362 | const S = struct { | 359 | const S = struct { |
| 363 | fn doTheTest() !void { | 360 | fn doTheTest() !void { |
| ... | @@ -565,7 +562,6 @@ test "array concat of slices gives slice" { | ... | @@ -565,7 +562,6 @@ test "array concat of slices gives slice" { |
| 565 | } | 562 | } |
| 566 | 563 | ||
| 567 | test "slice bounds in comptime concatenation" { | 564 | test "slice bounds in comptime concatenation" { |
| 568 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 569 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 565 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 570 | 566 | ||
| 571 | const bs = comptime blk: { | 567 | const bs = comptime blk: { |
test/behavior/struct.zig-7| ... | @@ -215,7 +215,6 @@ fn makeBar2(x: i32, y: i32) Bar { | ... | @@ -215,7 +215,6 @@ fn makeBar2(x: i32, y: i32) Bar { |
| 215 | 215 | ||
| 216 | test "call method with mutable reference to struct with no fields" { | 216 | test "call method with mutable reference to struct with no fields" { |
| 217 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 217 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 218 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 219 | 218 | ||
| 220 | const S = struct { | 219 | const S = struct { |
| 221 | fn doC(s: *const @This()) bool { | 220 | fn doC(s: *const @This()) bool { |
| ... | @@ -343,7 +342,6 @@ test "pass slice of empty struct to fn" { | ... | @@ -343,7 +342,6 @@ test "pass slice of empty struct to fn" { |
| 343 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 342 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 344 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 343 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 345 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 344 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 346 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 347 | 345 | ||
| 348 | try expect(testPassSliceOfEmptyStructToFn(&[_]EmptyStruct2{EmptyStruct2{}}) == 1); | 346 | try expect(testPassSliceOfEmptyStructToFn(&[_]EmptyStruct2{EmptyStruct2{}}) == 1); |
| 349 | } | 347 | } |
| ... | @@ -369,7 +367,6 @@ test "self-referencing struct via array member" { | ... | @@ -369,7 +367,6 @@ test "self-referencing struct via array member" { |
| 369 | test "empty struct method call" { | 367 | test "empty struct method call" { |
| 370 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 368 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 371 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 369 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 372 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 373 | 370 | ||
| 374 | const es = EmptyStruct{}; | 371 | const es = EmptyStruct{}; |
| 375 | try expect(es.method() == 1234); | 372 | try expect(es.method() == 1234); |
| ... | @@ -567,7 +564,6 @@ test "implicit cast packed struct field to const ptr" { | ... | @@ -567,7 +564,6 @@ test "implicit cast packed struct field to const ptr" { |
| 567 | test "zero-bit field in packed struct" { | 564 | test "zero-bit field in packed struct" { |
| 568 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 565 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 569 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 566 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 570 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 571 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 567 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 572 | 568 | ||
| 573 | const S = packed struct { | 569 | const S = packed struct { |
| ... | @@ -645,7 +641,6 @@ test "default struct initialization fields" { | ... | @@ -645,7 +641,6 @@ test "default struct initialization fields" { |
| 645 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 641 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 646 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 642 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 647 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 643 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 648 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 649 | 644 | ||
| 650 | const S = struct { | 645 | const S = struct { |
| 651 | a: i32 = 1234, | 646 | a: i32 = 1234, |
| ... | @@ -776,7 +771,6 @@ test "pointer to packed struct member in a stack variable" { | ... | @@ -776,7 +771,6 @@ test "pointer to packed struct member in a stack variable" { |
| 776 | test "packed struct with u0 field access" { | 771 | test "packed struct with u0 field access" { |
| 777 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 772 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 778 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 773 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 779 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 780 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 774 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 781 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 775 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 782 | 776 | ||
| ... | @@ -915,7 +909,6 @@ test "anonymous struct literal syntax" { | ... | @@ -915,7 +909,6 @@ test "anonymous struct literal syntax" { |
| 915 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 909 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 916 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 910 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 917 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 911 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 918 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | ||
| 919 | 912 | ||
| 920 | const S = struct { | 913 | const S = struct { |
| 921 | const Point = struct { | 914 | const Point = struct { |
test/behavior/this.zig-1| ... | @@ -21,7 +21,6 @@ fn add(x: i32, y: i32) i32 { | ... | @@ -21,7 +21,6 @@ fn add(x: i32, y: i32) i32 { |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | test "this refer to module call private fn" { | 23 | test "this refer to module call private fn" { |
| 24 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 25 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 24 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 26 | 25 | ||
| 27 | try expect(module.add(1, 2) == 3); | 26 | try expect(module.add(1, 2) == 3); |
test/behavior/try.zig-2| ... | @@ -25,7 +25,6 @@ fn returnsTen() anyerror!i32 { | ... | @@ -25,7 +25,6 @@ fn returnsTen() anyerror!i32 { |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | test "try without vars" { | 27 | test "try without vars" { |
| 28 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 29 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 28 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 30 | 29 | ||
| 31 | const result1 = if (failIfTrue(true)) 1 else |_| @as(i32, 2); | 30 | const result1 = if (failIfTrue(true)) 1 else |_| @as(i32, 2); |
| ... | @@ -44,7 +43,6 @@ fn failIfTrue(ok: bool) anyerror!void { | ... | @@ -44,7 +43,6 @@ fn failIfTrue(ok: bool) anyerror!void { |
| 44 | } | 43 | } |
| 45 | 44 | ||
| 46 | test "try then not executed with assignment" { | 45 | test "try then not executed with assignment" { |
| 47 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 48 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 46 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 49 | 47 | ||
| 50 | if (failIfTrue(true)) { | 48 | if (failIfTrue(true)) { |
test/behavior/type_info.zig-1| ... | @@ -287,7 +287,6 @@ fn testUnion() !void { | ... | @@ -287,7 +287,6 @@ fn testUnion() !void { |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | test "type info: struct info" { | 289 | test "type info: struct info" { |
| 290 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 291 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 290 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 292 | 291 | ||
| 293 | try testStruct(); | 292 | try testStruct(); |
test/behavior/undefined.zig-1| ... | @@ -77,7 +77,6 @@ test "assign undefined to struct with method" { | ... | @@ -77,7 +77,6 @@ test "assign undefined to struct with method" { |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | test "type name of undefined" { | 79 | test "type name of undefined" { |
| 80 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 81 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 80 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 82 | 81 | ||
| 83 | const x = undefined; | 82 | const x = undefined; |
test/behavior/union.zig-20| ... | @@ -43,8 +43,6 @@ fn setInt(foo: *Foo, x: i32) void { | ... | @@ -43,8 +43,6 @@ fn setInt(foo: *Foo, x: i32) void { |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | test "comptime union field access" { | 45 | test "comptime union field access" { |
| 46 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 47 | |||
| 48 | comptime { | 46 | comptime { |
| 49 | var foo = Foo{ .int = 0 }; | 47 | var foo = Foo{ .int = 0 }; |
| 50 | try expect(foo.int == 0); | 48 | try expect(foo.int == 0); |
| ... | @@ -75,14 +73,10 @@ const ExternPtrOrInt = extern union { | ... | @@ -75,14 +73,10 @@ const ExternPtrOrInt = extern union { |
| 75 | int: u64, | 73 | int: u64, |
| 76 | }; | 74 | }; |
| 77 | test "extern union size" { | 75 | test "extern union size" { |
| 78 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 79 | |||
| 80 | comptime try expect(@sizeOf(ExternPtrOrInt) == 8); | 76 | comptime try expect(@sizeOf(ExternPtrOrInt) == 8); |
| 81 | } | 77 | } |
| 82 | 78 | ||
| 83 | test "0-sized extern union definition" { | 79 | test "0-sized extern union definition" { |
| 84 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 85 | |||
| 86 | const U = extern union { | 80 | const U = extern union { |
| 87 | a: void, | 81 | a: void, |
| 88 | const f = 1; | 82 | const f = 1; |
| ... | @@ -112,8 +106,6 @@ const err = @as(anyerror!Agg, Agg{ | ... | @@ -112,8 +106,6 @@ const err = @as(anyerror!Agg, Agg{ |
| 112 | const array = [_]Value{ v1, v2, v1, v2 }; | 106 | const array = [_]Value{ v1, v2, v1, v2 }; |
| 113 | 107 | ||
| 114 | test "unions embedded in aggregate types" { | 108 | test "unions embedded in aggregate types" { |
| 115 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 116 | |||
| 117 | switch (array[1]) { | 109 | switch (array[1]) { |
| 118 | Value.Array => |arr| try expect(arr[4] == 3), | 110 | Value.Array => |arr| try expect(arr[4] == 3), |
| 119 | else => unreachable, | 111 | else => unreachable, |
| ... | @@ -125,8 +117,6 @@ test "unions embedded in aggregate types" { | ... | @@ -125,8 +117,6 @@ test "unions embedded in aggregate types" { |
| 125 | } | 117 | } |
| 126 | 118 | ||
| 127 | test "access a member of tagged union with conflicting enum tag name" { | 119 | test "access a member of tagged union with conflicting enum tag name" { |
| 128 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 129 | |||
| 130 | const Bar = union(enum) { | 120 | const Bar = union(enum) { |
| 131 | A: A, | 121 | A: A, |
| 132 | B: B, | 122 | B: B, |
| ... | @@ -169,8 +159,6 @@ const TaggedUnionWithPayload = union(enum) { | ... | @@ -169,8 +159,6 @@ const TaggedUnionWithPayload = union(enum) { |
| 169 | }; | 159 | }; |
| 170 | 160 | ||
| 171 | test "union alignment" { | 161 | test "union alignment" { |
| 172 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 173 | |||
| 174 | comptime { | 162 | comptime { |
| 175 | try expect(@alignOf(AlignTestTaggedUnion) >= @alignOf([9]u8)); | 163 | try expect(@alignOf(AlignTestTaggedUnion) >= @alignOf([9]u8)); |
| 176 | try expect(@alignOf(AlignTestTaggedUnion) >= @alignOf(u64)); | 164 | try expect(@alignOf(AlignTestTaggedUnion) >= @alignOf(u64)); |
| ... | @@ -268,8 +256,6 @@ fn testCastUnionToTag() !void { | ... | @@ -268,8 +256,6 @@ fn testCastUnionToTag() !void { |
| 268 | } | 256 | } |
| 269 | 257 | ||
| 270 | test "union field access gives the enum values" { | 258 | test "union field access gives the enum values" { |
| 271 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 272 | |||
| 273 | try expect(TheUnion.A == TheTag.A); | 259 | try expect(TheUnion.A == TheTag.A); |
| 274 | try expect(TheUnion.B == TheTag.B); | 260 | try expect(TheUnion.B == TheTag.B); |
| 275 | try expect(TheUnion.C == TheTag.C); | 261 | try expect(TheUnion.C == TheTag.C); |
| ... | @@ -343,8 +329,6 @@ const PackedPtrOrInt = packed union { | ... | @@ -343,8 +329,6 @@ const PackedPtrOrInt = packed union { |
| 343 | int: u64, | 329 | int: u64, |
| 344 | }; | 330 | }; |
| 345 | test "packed union size" { | 331 | test "packed union size" { |
| 346 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 347 | |||
| 348 | comptime try expect(@sizeOf(PackedPtrOrInt) == 8); | 332 | comptime try expect(@sizeOf(PackedPtrOrInt) == 8); |
| 349 | } | 333 | } |
| 350 | 334 | ||
| ... | @@ -352,8 +336,6 @@ const ZeroBits = union { | ... | @@ -352,8 +336,6 @@ const ZeroBits = union { |
| 352 | OnlyField: void, | 336 | OnlyField: void, |
| 353 | }; | 337 | }; |
| 354 | test "union with only 1 field which is void should be zero bits" { | 338 | test "union with only 1 field which is void should be zero bits" { |
| 355 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 356 | |||
| 357 | comptime try expect(@sizeOf(ZeroBits) == 0); | 339 | comptime try expect(@sizeOf(ZeroBits) == 0); |
| 358 | } | 340 | } |
| 359 | 341 | ||
| ... | @@ -411,8 +393,6 @@ test "union with only 1 field casted to its enum type" { | ... | @@ -411,8 +393,6 @@ test "union with only 1 field casted to its enum type" { |
| 411 | } | 393 | } |
| 412 | 394 | ||
| 413 | test "union with one member defaults to u0 tag type" { | 395 | test "union with one member defaults to u0 tag type" { |
| 414 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 415 | |||
| 416 | const U0 = union(enum) { | 396 | const U0 = union(enum) { |
| 417 | X: u32, | 397 | X: u32, |
| 418 | }; | 398 | }; |
test/behavior/usingnamespace.zig-4| ... | @@ -11,7 +11,6 @@ const C = struct { | ... | @@ -11,7 +11,6 @@ const C = struct { |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | test "basic usingnamespace" { | 13 | test "basic usingnamespace" { |
| 14 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 16 | 15 | ||
| 17 | try std.testing.expect(C.B == bool); | 16 | try std.testing.expect(C.B == bool); |
| ... | @@ -24,7 +23,6 @@ fn Foo(comptime T: type) type { | ... | @@ -24,7 +23,6 @@ fn Foo(comptime T: type) type { |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | test "usingnamespace inside a generic struct" { | 25 | test "usingnamespace inside a generic struct" { |
| 27 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 28 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 26 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 29 | 27 | ||
| 30 | const std2 = Foo(std); | 28 | const std2 = Foo(std); |
| ... | @@ -38,7 +36,6 @@ usingnamespace struct { | ... | @@ -38,7 +36,6 @@ usingnamespace struct { |
| 38 | }; | 36 | }; |
| 39 | 37 | ||
| 40 | test "usingnamespace does not redeclare an imported variable" { | 38 | test "usingnamespace does not redeclare an imported variable" { |
| 41 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 42 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 39 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 43 | 40 | ||
| 44 | comptime try std.testing.expect(@This().foo == 42); | 41 | comptime try std.testing.expect(@This().foo == 42); |
| ... | @@ -57,7 +54,6 @@ fn privateFunction() bool { | ... | @@ -57,7 +54,6 @@ fn privateFunction() bool { |
| 57 | } | 54 | } |
| 58 | 55 | ||
| 59 | test { | 56 | test { |
| 60 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 61 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 57 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 62 | 58 | ||
| 63 | _ = @import("usingnamespace/import_segregation.zig"); | 59 | _ = @import("usingnamespace/import_segregation.zig"); |
test/behavior/void.zig-1| ... | @@ -43,7 +43,6 @@ test "void optional" { | ... | @@ -43,7 +43,6 @@ test "void optional" { |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | test "void array as a local variable initializer" { | 45 | test "void array as a local variable initializer" { |
| 46 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 47 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 46 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 48 | 47 | ||
| 49 | var x = [_]void{{}} ** 1004; | 48 | var x = [_]void{{}} ** 1004; |
test/behavior/while.zig-1| ... | @@ -249,7 +249,6 @@ fn returnTrue() bool { | ... | @@ -249,7 +249,6 @@ fn returnTrue() bool { |
| 249 | 249 | ||
| 250 | test "return with implicit cast from while loop" { | 250 | test "return with implicit cast from while loop" { |
| 251 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 251 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 252 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | ||
| 253 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 252 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 254 | 253 | ||
| 255 | returnWithImplicitCastFromWhileLoopTest() catch unreachable; | 254 | returnWithImplicitCastFromWhileLoopTest() catch unreachable; |