| author | |
| committer | |
| log | 6021edd7cee104f69c9ceb1af27e46637cab79e3 |
| tree | 2eeb2f36c219ca24b44b6d24e5d68879a0228e47 |
| parent | 54326cc55485fa71ce729cd553cb9af9ea816faa |
9 files changed, 76 insertions(+), 81 deletions(-)
lib/include/zig.h+2-2| ... | @@ -340,7 +340,7 @@ zig_int_operators(64) | ... | @@ -340,7 +340,7 @@ zig_int_operators(64) |
| 340 | 340 | ||
| 341 | #define zig_int_helpers(w) \ | 341 | #define zig_int_helpers(w) \ |
| 342 | static inline zig_i##w zig_shr_i##w(zig_i##w lhs, zig_u8 rhs) { \ | 342 | static inline zig_i##w zig_shr_i##w(zig_i##w lhs, zig_u8 rhs) { \ |
| 343 | zig_i##w sign_mask = lhs < zig_as_i##w(0) ? zig_as_i##w(-1) : zig_as_i##w(0); \ | 343 | zig_i##w sign_mask = lhs < zig_as_i##w(0) ? -zig_as_i##w(1) : zig_as_i##w(0); \ |
| 344 | return ((lhs ^ sign_mask) >> rhs) ^ sign_mask; \ | 344 | return ((lhs ^ sign_mask) >> rhs) ^ sign_mask; \ |
| 345 | } \ | 345 | } \ |
| 346 | \ | 346 | \ |
| ... | @@ -1166,7 +1166,7 @@ static inline zig_i128 zig_mod_i128(zig_i128 lhs, zig_i128 rhs) { | ... | @@ -1166,7 +1166,7 @@ static inline zig_i128 zig_mod_i128(zig_i128 lhs, zig_i128 rhs) { |
| 1166 | #define zig_mod_u128 zig_rem_u128 | 1166 | #define zig_mod_u128 zig_rem_u128 |
| 1167 | 1167 | ||
| 1168 | static inline zig_i128 zig_shr_i128(zig_i128 lhs, zig_u8 rhs) { | 1168 | static inline zig_i128 zig_shr_i128(zig_i128 lhs, zig_u8 rhs) { |
| 1169 | zig_i128 sign_mask = zig_cmp_i128(lhs, zig_as_i128(0, 0)) < zig_as_i8(0) ? zig_as_i128(-1, UINT64_MAX) : zig_as_i128(0, 0); | 1169 | zig_i128 sign_mask = zig_cmp_i128(lhs, zig_as_i128(0, 0)) < zig_as_i8(0) ? -zig_as_i128(0, 1) : zig_as_i128(0, 0); |
| 1170 | return zig_xor_i128(zig_bitcast_i128(zig_shr_u128(zig_bitcast_u128(zig_xor_i128(lhs, sign_mask)), rhs)), sign_mask); | 1170 | return zig_xor_i128(zig_bitcast_i128(zig_shr_u128(zig_bitcast_u128(zig_xor_i128(lhs, sign_mask)), rhs)), sign_mask); |
| 1171 | } | 1171 | } |
| 1172 | 1172 |
src/codegen/c.zig+74-64| ... | @@ -415,26 +415,6 @@ pub const Function = struct { | ... | @@ -415,26 +415,6 @@ pub const Function = struct { |
| 415 | }, | 415 | }, |
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| 418 | |||
| 419 | fn renderFloatFnName(f: *Function, writer: anytype, operation: []const u8, float_ty: Type) !void { | ||
| 420 | const target = f.object.dg.module.getTarget(); | ||
| 421 | const float_bits = float_ty.floatBits(target); | ||
| 422 | const is_longdouble = float_bits == CType.longdouble.sizeInBits(target); | ||
| 423 | try writer.writeAll("__"); | ||
| 424 | if (is_longdouble or float_bits != 80) { | ||
| 425 | try writer.writeAll("builtin_"); | ||
| 426 | } | ||
| 427 | try writer.writeAll(operation); | ||
| 428 | if (is_longdouble) { | ||
| 429 | try writer.writeByte('l'); | ||
| 430 | } else switch (float_bits) { | ||
| 431 | 16, 32 => try writer.writeByte('f'), | ||
| 432 | 64 => {}, | ||
| 433 | 80 => try writer.writeByte('x'), | ||
| 434 | 128 => try writer.writeByte('q'), | ||
| 435 | else => unreachable, | ||
| 436 | } | ||
| 437 | } | ||
| 438 | }; | 418 | }; |
| 439 | 419 | ||
| 440 | /// This data is available when outputting .c code for a `Module`. | 420 | /// This data is available when outputting .c code for a `Module`. |
| ... | @@ -674,14 +654,18 @@ pub const DeclGen = struct { | ... | @@ -674,14 +654,18 @@ pub const DeclGen = struct { |
| 674 | // bool b = 0xaa; evals to true, but memcpy(&b, 0xaa, 1); evals to false. | 654 | // bool b = 0xaa; evals to true, but memcpy(&b, 0xaa, 1); evals to false. |
| 675 | .Bool => return dg.renderValue(writer, ty, Value.@"false", location), | 655 | .Bool => return dg.renderValue(writer, ty, Value.@"false", location), |
| 676 | .Int, .Enum, .ErrorSet => return writer.print("{x}", .{try dg.fmtIntLiteral(ty, val)}), | 656 | .Int, .Enum, .ErrorSet => return writer.print("{x}", .{try dg.fmtIntLiteral(ty, val)}), |
| 677 | .Float => switch (ty.tag()) { | 657 | .Float => { |
| 678 | .f32 => return writer.print("zig_bitcast_f32_u32({x})", .{ | 658 | try writer.writeByte('('); |
| 679 | try dg.fmtIntLiteral(Type.u32, val), | 659 | try dg.renderTypecast(writer, ty); |
| 680 | }), | 660 | try writer.writeByte(')'); |
| 681 | .f64 => return writer.print("zig_bitcast_f64_u64({x})", .{ | 661 | switch (ty.floatBits(target)) { |
| 682 | try dg.fmtIntLiteral(Type.u64, val), | 662 | 16 => return writer.print("{x}f", .{@bitCast(f16, undefPattern(u16))}), |
| 683 | }), | 663 | 32 => return writer.print("{x}f", .{@bitCast(f32, undefPattern(u32))}), |
| 684 | else => return dg.fail("TODO float types > 64 bits are not support in renderValue() as of now", .{}), | 664 | 64 => return writer.print("{x}", .{@bitCast(f64, undefPattern(u64))}), |
| 665 | 80 => return writer.print("{x}l", .{@bitCast(f80, undefPattern(u80))}), | ||
| 666 | 128 => return writer.print("{x}l", .{@bitCast(f128, undefPattern(u128))}), | ||
| 667 | else => unreachable, | ||
| 668 | } | ||
| 685 | }, | 669 | }, |
| 686 | .Pointer => switch (ty.ptrSize()) { | 670 | .Pointer => switch (ty.ptrSize()) { |
| 687 | .Slice => { | 671 | .Slice => { |
| ... | @@ -833,37 +817,41 @@ pub const DeclGen = struct { | ... | @@ -833,37 +817,41 @@ pub const DeclGen = struct { |
| 833 | else => try writer.print("{}", .{try dg.fmtIntLiteral(ty, val)}), | 817 | else => try writer.print("{}", .{try dg.fmtIntLiteral(ty, val)}), |
| 834 | }, | 818 | }, |
| 835 | .Float => { | 819 | .Float => { |
| 836 | if (ty.floatBits(target) <= 64) { | 820 | try writer.writeByte('('); |
| 837 | if (std.math.isNan(val.toFloat(f64)) or std.math.isInf(val.toFloat(f64))) { | 821 | try dg.renderTypecast(writer, ty); |
| 838 | // just generate a bit cast (exactly like we do in airBitcast) | 822 | try writer.writeByte(')'); |
| 839 | switch (ty.tag()) { | 823 | const f128_val = val.toFloat(f128); |
| 840 | .f32 => { | 824 | if (!std.math.isFinite(f128_val)) { |
| 841 | var bitcast_pl = Value.Payload.U64{ | 825 | if (std.math.signbit(f128_val)) try writer.writeByte('-'); |
| 842 | .base = .{ .tag = .int_u64 }, | 826 | const fn_name = if (std.math.isSignalNan(f128_val)) |
| 843 | .data = @bitCast(u32, val.toFloat(f32)), | 827 | "nans" |
| 844 | }; | 828 | else if (std.math.isNan(f128_val)) |
| 845 | const bitcast_val = Value.initPayload(&bitcast_pl.base); | 829 | "nan" |
| 846 | return writer.print("zig_bitcast_f32_u32({x})", .{ | 830 | else if (std.math.isInf(f128_val)) |
| 847 | try dg.fmtIntLiteral(Type.u32, bitcast_val), | 831 | "inf" |
| 848 | }); | 832 | else |
| 849 | }, | 833 | unreachable; |
| 850 | .f64 => { | 834 | try dg.renderFloatFnName(writer, fn_name, ty); |
| 851 | var bitcast_pl = Value.Payload.U64{ | 835 | try writer.writeByte('('); |
| 852 | .base = .{ .tag = .int_u64 }, | 836 | if (std.math.isNan(f128_val)) switch (ty.floatBits(target)) { |
| 853 | .data = @bitCast(u64, val.toFloat(f64)), | 837 | // We only actually need to pass the significant, but it will get |
| 854 | }; | 838 | // properly masked anyway, so just pass the whole value. |
| 855 | const bitcast_val = Value.initPayload(&bitcast_pl.base); | 839 | 16 => try writer.print("\"0x{x}\"", .{@bitCast(u16, val.toFloat(f16))}), |
| 856 | return writer.print("zig_bitcast_f64_u64({x})", .{ | 840 | 32 => try writer.print("\"0x{x}\"", .{@bitCast(u32, val.toFloat(f32))}), |
| 857 | try dg.fmtIntLiteral(Type.u64, bitcast_val), | 841 | 64 => try writer.print("\"0x{x}\"", .{@bitCast(u64, val.toFloat(f64))}), |
| 858 | }); | 842 | 80 => try writer.print("\"0x{x}\"", .{@bitCast(u80, val.toFloat(f80))}), |
| 859 | }, | 843 | 128 => try writer.print("\"0x{x}\"", .{@bitCast(u128, f128_val)}), |
| 860 | else => return dg.fail("TODO float types > 64 bits are not support in renderValue() as of now", .{}), | 844 | else => unreachable, |
| 861 | } | 845 | }; |
| 862 | } else { | 846 | return writer.writeByte(')'); |
| 863 | return writer.print("{x}", .{val.toFloat(f64)}); | 847 | } else switch (ty.floatBits(target)) { |
| 864 | } | 848 | 16 => return writer.print("{x}f", .{val.toFloat(f16)}), |
| 849 | 32 => return writer.print("{x}f", .{val.toFloat(f32)}), | ||
| 850 | 64 => return writer.print("{x}", .{val.toFloat(f64)}), | ||
| 851 | 80 => return writer.print("{x}l", .{val.toFloat(f80)}), | ||
| 852 | 128 => return writer.print("{x}l", .{f128_val}), | ||
| 853 | else => unreachable, | ||
| 865 | } | 854 | } |
| 866 | return dg.fail("TODO: C backend: implement lowering large float values", .{}); | ||
| 867 | }, | 855 | }, |
| 868 | .Pointer => switch (val.tag()) { | 856 | .Pointer => switch (val.tag()) { |
| 869 | .null_value, .zero => { | 857 | .null_value, .zero => { |
| ... | @@ -2053,6 +2041,26 @@ pub const DeclGen = struct { | ... | @@ -2053,6 +2041,26 @@ pub const DeclGen = struct { |
| 2053 | } | 2041 | } |
| 2054 | } | 2042 | } |
| 2055 | 2043 | ||
| 2044 | fn renderFloatFnName(dg: *DeclGen, writer: anytype, operation: []const u8, float_ty: Type) !void { | ||
| 2045 | const target = dg.module.getTarget(); | ||
| 2046 | const float_bits = float_ty.floatBits(target); | ||
| 2047 | const is_longdouble = float_bits == CType.longdouble.sizeInBits(target); | ||
| 2048 | try writer.writeAll("__"); | ||
| 2049 | if (is_longdouble or float_bits != 80) { | ||
| 2050 | try writer.writeAll("builtin_"); | ||
| 2051 | } | ||
| 2052 | try writer.writeAll(operation); | ||
| 2053 | if (is_longdouble) { | ||
| 2054 | try writer.writeByte('l'); | ||
| 2055 | } else switch (float_bits) { | ||
| 2056 | 16, 32 => try writer.writeByte('f'), | ||
| 2057 | 64 => {}, | ||
| 2058 | 80 => try writer.writeByte('x'), | ||
| 2059 | 128 => try writer.writeByte('q'), | ||
| 2060 | else => unreachable, | ||
| 2061 | } | ||
| 2062 | } | ||
| 2063 | |||
| 2056 | fn fmtIntLiteral( | 2064 | fn fmtIntLiteral( |
| 2057 | dg: *DeclGen, | 2065 | dg: *DeclGen, |
| 2058 | ty: Type, | 2066 | ty: Type, |
| ... | @@ -5169,7 +5177,7 @@ fn airUnFloatOp(f: *Function, inst: Air.Inst.Index, operation: []const u8) !CVal | ... | @@ -5169,7 +5177,7 @@ fn airUnFloatOp(f: *Function, inst: Air.Inst.Index, operation: []const u8) !CVal |
| 5169 | const operand = try f.resolveInst(un_op); | 5177 | const operand = try f.resolveInst(un_op); |
| 5170 | const local = try f.allocLocal(inst_ty, .Const); | 5178 | const local = try f.allocLocal(inst_ty, .Const); |
| 5171 | try writer.writeAll(" = "); | 5179 | try writer.writeAll(" = "); |
| 5172 | try f.renderFloatFnName(writer, operation, inst_ty); | 5180 | try f.object.dg.renderFloatFnName(writer, operation, inst_ty); |
| 5173 | try writer.writeByte('('); | 5181 | try writer.writeByte('('); |
| 5174 | try f.writeCValue(writer, operand, .FunctionArgument); | 5182 | try f.writeCValue(writer, operand, .FunctionArgument); |
| 5175 | try writer.writeAll(");\n"); | 5183 | try writer.writeAll(");\n"); |
| ... | @@ -5185,7 +5193,7 @@ fn airBinFloatOp(f: *Function, inst: Air.Inst.Index, operation: []const u8) !CVa | ... | @@ -5185,7 +5193,7 @@ fn airBinFloatOp(f: *Function, inst: Air.Inst.Index, operation: []const u8) !CVa |
| 5185 | const rhs = try f.resolveInst(bin_op.rhs); | 5193 | const rhs = try f.resolveInst(bin_op.rhs); |
| 5186 | const local = try f.allocLocal(inst_ty, .Const); | 5194 | const local = try f.allocLocal(inst_ty, .Const); |
| 5187 | try writer.writeAll(" = "); | 5195 | try writer.writeAll(" = "); |
| 5188 | try f.renderFloatFnName(writer, operation, inst_ty); | 5196 | try f.object.dg.renderFloatFnName(writer, operation, inst_ty); |
| 5189 | try writer.writeByte('('); | 5197 | try writer.writeByte('('); |
| 5190 | try f.writeCValue(writer, lhs, .FunctionArgument); | 5198 | try f.writeCValue(writer, lhs, .FunctionArgument); |
| 5191 | try writer.writeAll(", "); | 5199 | try writer.writeAll(", "); |
| ... | @@ -5205,7 +5213,7 @@ fn airMulAdd(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -5205,7 +5213,7 @@ fn airMulAdd(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5205 | const writer = f.object.writer(); | 5213 | const writer = f.object.writer(); |
| 5206 | const local = try f.allocLocal(inst_ty, .Const); | 5214 | const local = try f.allocLocal(inst_ty, .Const); |
| 5207 | try writer.writeAll(" = "); | 5215 | try writer.writeAll(" = "); |
| 5208 | try f.renderFloatFnName(writer, "fma", inst_ty); | 5216 | try f.object.dg.renderFloatFnName(writer, "fma", inst_ty); |
| 5209 | try writer.writeByte('('); | 5217 | try writer.writeByte('('); |
| 5210 | try f.writeCValue(writer, mulend1, .FunctionArgument); | 5218 | try f.writeCValue(writer, mulend1, .FunctionArgument); |
| 5211 | try writer.writeAll(", "); | 5219 | try writer.writeAll(", "); |
| ... | @@ -5342,6 +5350,10 @@ fn fmtStringLiteral(str: []const u8) std.fmt.Formatter(formatStringLiteral) { | ... | @@ -5342,6 +5350,10 @@ fn fmtStringLiteral(str: []const u8) std.fmt.Formatter(formatStringLiteral) { |
| 5342 | return .{ .data = str }; | 5350 | return .{ .data = str }; |
| 5343 | } | 5351 | } |
| 5344 | 5352 | ||
| 5353 | fn undefPattern(comptime T: type) T { | ||
| 5354 | return (1 << (@bitSizeOf(T) | 1)) / 3; | ||
| 5355 | } | ||
| 5356 | |||
| 5345 | const FormatIntLiteralContext = struct { | 5357 | const FormatIntLiteralContext = struct { |
| 5346 | ty: Type, | 5358 | ty: Type, |
| 5347 | val: Value, | 5359 | val: Value, |
| ... | @@ -5379,9 +5391,7 @@ fn formatIntLiteral( | ... | @@ -5379,9 +5391,7 @@ fn formatIntLiteral( |
| 5379 | var int_buf: Value.BigIntSpace = undefined; | 5391 | var int_buf: Value.BigIntSpace = undefined; |
| 5380 | const int = if (data.val.isUndefDeep()) blk: { | 5392 | const int = if (data.val.isUndefDeep()) blk: { |
| 5381 | undef_limbs = try allocator.alloc(Limb, BigInt.calcTwosCompLimbCount(int_info.bits)); | 5393 | undef_limbs = try allocator.alloc(Limb, BigInt.calcTwosCompLimbCount(int_info.bits)); |
| 5382 | 5394 | std.mem.set(Limb, undef_limbs, undefPattern(Limb)); | |
| 5383 | const undef_pattern: Limb = (1 << (@bitSizeOf(Limb) | 1)) / 3; | ||
| 5384 | std.mem.set(Limb, undef_limbs, undef_pattern); | ||
| 5385 | 5395 | ||
| 5386 | var undef_int = BigInt.Mutable{ | 5396 | var undef_int = BigInt.Mutable{ |
| 5387 | .limbs = undef_limbs, | 5397 | .limbs = undef_limbs, |
test/behavior/bugs/12891.zig-1| ... | @@ -8,7 +8,6 @@ test "issue12891" { | ... | @@ -8,7 +8,6 @@ test "issue12891" { |
| 8 | } | 8 | } |
| 9 | test "nan" { | 9 | test "nan" { |
| 10 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | 10 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 12 | 11 | ||
| 13 | const f = comptime std.math.nan(f64); | 12 | const f = comptime std.math.nan(f64); |
| 14 | var i: usize = 0; | 13 | var i: usize = 0; |
test/behavior/cast.zig-2| ... | @@ -1283,7 +1283,6 @@ fn boolToStr(b: bool) []const u8 { | ... | @@ -1283,7 +1283,6 @@ fn boolToStr(b: bool) []const u8 { |
| 1283 | 1283 | ||
| 1284 | test "cast f16 to wider types" { | 1284 | test "cast f16 to wider types" { |
| 1285 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1285 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1286 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 1287 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1286 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1288 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1287 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1289 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1288 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | @@ -1302,7 +1301,6 @@ test "cast f16 to wider types" { | ... | @@ -1302,7 +1301,6 @@ test "cast f16 to wider types" { |
| 1302 | 1301 | ||
| 1303 | test "cast f128 to narrower types" { | 1302 | test "cast f128 to narrower types" { |
| 1304 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1303 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1305 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 1306 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1304 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1307 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1305 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1308 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1306 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
test/behavior/floatop.zig-6| ... | @@ -147,7 +147,6 @@ fn testSqrt() !void { | ... | @@ -147,7 +147,6 @@ fn testSqrt() !void { |
| 147 | 147 | ||
| 148 | test "more @sqrt f16 tests" { | 148 | test "more @sqrt f16 tests" { |
| 149 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 149 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 150 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 151 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 152 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 151 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 153 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 152 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -608,7 +607,6 @@ test "negation f80" { | ... | @@ -608,7 +607,6 @@ test "negation f80" { |
| 608 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 607 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 609 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 608 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 610 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 609 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 611 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 612 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 610 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 613 | 611 | ||
| 614 | const S = struct { | 612 | const S = struct { |
| ... | @@ -629,7 +627,6 @@ test "negation f128" { | ... | @@ -629,7 +627,6 @@ test "negation f128" { |
| 629 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 627 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 630 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 628 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 631 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 629 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 632 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 633 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 630 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 634 | 631 | ||
| 635 | const S = struct { | 632 | const S = struct { |
| ... | @@ -709,7 +706,6 @@ test "nan negation f16" { | ... | @@ -709,7 +706,6 @@ test "nan negation f16" { |
| 709 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 706 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 710 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 707 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 711 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 708 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 712 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 713 | 709 | ||
| 714 | const nan_comptime = comptime math.nan(f16); | 710 | const nan_comptime = comptime math.nan(f16); |
| 715 | const neg_nan_comptime = -nan_comptime; | 711 | const neg_nan_comptime = -nan_comptime; |
| ... | @@ -729,7 +725,6 @@ test "nan negation f32" { | ... | @@ -729,7 +725,6 @@ test "nan negation f32" { |
| 729 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 725 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 730 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 726 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 731 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 727 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 732 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 733 | 728 | ||
| 734 | const nan_comptime = comptime math.nan(f32); | 729 | const nan_comptime = comptime math.nan(f32); |
| 735 | const neg_nan_comptime = -nan_comptime; | 730 | const neg_nan_comptime = -nan_comptime; |
| ... | @@ -749,7 +744,6 @@ test "nan negation f64" { | ... | @@ -749,7 +744,6 @@ test "nan negation f64" { |
| 749 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 744 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 750 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 745 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 751 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 746 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 752 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 753 | 747 | ||
| 754 | const nan_comptime = comptime math.nan(f64); | 748 | const nan_comptime = comptime math.nan(f64); |
| 755 | const neg_nan_comptime = -nan_comptime; | 749 | const neg_nan_comptime = -nan_comptime; |
test/behavior/math.zig-2| ... | @@ -1316,7 +1316,6 @@ test "@fabs f80" { | ... | @@ -1316,7 +1316,6 @@ test "@fabs f80" { |
| 1316 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1316 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1317 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1317 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1318 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1318 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1319 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 1320 | 1319 | ||
| 1321 | try testFabs(f80, 12.0); | 1320 | try testFabs(f80, 12.0); |
| 1322 | comptime try testFabs(f80, 12.0); | 1321 | comptime try testFabs(f80, 12.0); |
| ... | @@ -1625,7 +1624,6 @@ test "compare undefined literal with comptime_int" { | ... | @@ -1625,7 +1624,6 @@ test "compare undefined literal with comptime_int" { |
| 1625 | } | 1624 | } |
| 1626 | 1625 | ||
| 1627 | test "signed zeros are represented properly" { | 1626 | test "signed zeros are represented properly" { |
| 1628 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 1629 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1627 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1630 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1628 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1631 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1629 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/muladd.zig-1| ... | @@ -44,7 +44,6 @@ fn testMulAdd16() !void { | ... | @@ -44,7 +44,6 @@ fn testMulAdd16() !void { |
| 44 | 44 | ||
| 45 | test "@mulAdd f80" { | 45 | test "@mulAdd f80" { |
| 46 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 46 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 47 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 48 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 47 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 49 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 48 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 50 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/pointers.zig-1| ... | @@ -335,7 +335,6 @@ test "pointer sentinel with optional element" { | ... | @@ -335,7 +335,6 @@ test "pointer sentinel with optional element" { |
| 335 | 335 | ||
| 336 | test "pointer sentinel with +inf" { | 336 | test "pointer sentinel with +inf" { |
| 337 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 337 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 338 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | ||
| 339 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 338 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 340 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 339 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 341 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 340 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
test/behavior/tuple.zig-2| ... | @@ -205,7 +205,6 @@ test "initializing anon struct with explicit type" { | ... | @@ -205,7 +205,6 @@ test "initializing anon struct with explicit type" { |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | test "fieldParentPtr of tuple" { | 207 | test "fieldParentPtr of tuple" { |
| 208 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | ||
| 209 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 208 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 210 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 209 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 211 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 210 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -216,7 +215,6 @@ test "fieldParentPtr of tuple" { | ... | @@ -216,7 +215,6 @@ test "fieldParentPtr of tuple" { |
| 216 | } | 215 | } |
| 217 | 216 | ||
| 218 | test "fieldParentPtr of anon struct" { | 217 | test "fieldParentPtr of anon struct" { |
| 219 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | ||
| 220 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 218 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 221 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 219 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 222 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 220 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |