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