authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-07 12:41:02-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-07 12:41:46-05:00
log9e5b2489913f72764ded2089bccd7e612a3cc347
tree5bc596e3965020512b6ab0190de13605c57b3449
parenta1576225ca670f729711d906ef37e47c5bad3ae4
signaturelock-open Commit is signed but in an unrecognized format.

remove workarounds for Windows native CPU features

bug fixed in LLVM 10 closes #508

17 files changed, 1 insertions(+), 84 deletions(-)

lib/std/fmt/parse_float.zig-4
......@@ -382,10 +382,6 @@ pub fn parseFloat(comptime T: type, s: []const u8) !T {
382382}
383383
384384test "fmt.parseFloat" {
385 if (std.Target.current.isWindows()) {
386 // TODO https://github.com/ziglang/zig/issues/508
387 return error.SkipZigTest;
388 }
389385 const testing = std.testing;
390386 const expect = testing.expect;
391387 const expectEqual = testing.expectEqual;
lib/std/io/test.zig-4
......@@ -547,10 +547,6 @@ fn testSerializerDeserializer(comptime endian: builtin.Endian, comptime packing:
547547}
548548
549549test "Serializer/Deserializer generic" {
550 if (std.Target.current.isWindows()) {
551 // TODO https://github.com/ziglang/zig/issues/508
552 return error.SkipZigTest;
553 }
554550 try testSerializerDeserializer(builtin.Endian.Big, .Byte);
555551 try testSerializerDeserializer(builtin.Endian.Little, .Byte);
556552 try testSerializerDeserializer(builtin.Endian.Big, .Bit);
lib/std/math/fabs.zig-4
......@@ -95,10 +95,6 @@ test "math.fabs64.special" {
9595}
9696
9797test "math.fabs128.special" {
98 if (std.Target.current.isWindows()) {
99 // TODO https://github.com/ziglang/zig/issues/508
100 return error.SkipZigTest;
101 }
10298 expect(math.isPositiveInf(fabs(math.inf(f128))));
10399 expect(math.isPositiveInf(fabs(-math.inf(f128))));
104100 expect(math.isNan(fabs(math.nan(f128))));
lib/std/math/isinf.zig-12
......@@ -74,10 +74,6 @@ pub fn isNegativeInf(x: var) bool {
7474}
7575
7676test "math.isInf" {
77 if (std.Target.current.isWindows()) {
78 // TODO https://github.com/ziglang/zig/issues/508
79 return error.SkipZigTest;
80 }
8177 expect(!isInf(@as(f16, 0.0)));
8278 expect(!isInf(@as(f16, -0.0)));
8379 expect(!isInf(@as(f32, 0.0)));
......@@ -97,10 +93,6 @@ test "math.isInf" {
9793}
9894
9995test "math.isPositiveInf" {
100 if (std.Target.current.isWindows()) {
101 // TODO https://github.com/ziglang/zig/issues/508
102 return error.SkipZigTest;
103 }
10496 expect(!isPositiveInf(@as(f16, 0.0)));
10597 expect(!isPositiveInf(@as(f16, -0.0)));
10698 expect(!isPositiveInf(@as(f32, 0.0)));
......@@ -120,10 +112,6 @@ test "math.isPositiveInf" {
120112}
121113
122114test "math.isNegativeInf" {
123 if (std.Target.current.isWindows()) {
124 // TODO https://github.com/ziglang/zig/issues/508
125 return error.SkipZigTest;
126 }
127115 expect(!isNegativeInf(@as(f16, 0.0)));
128116 expect(!isNegativeInf(@as(f16, -0.0)));
129117 expect(!isNegativeInf(@as(f32, 0.0)));
lib/std/math/isnan.zig-4
......@@ -16,10 +16,6 @@ pub fn isSignalNan(x: var) bool {
1616}
1717
1818test "math.isNan" {
19 if (std.Target.current.isWindows()) {
20 // TODO https://github.com/ziglang/zig/issues/508
21 return error.SkipZigTest;
22 }
2319 expect(isNan(math.nan(f16)));
2420 expect(isNan(math.nan(f32)));
2521 expect(isNan(math.nan(f64)));
lib/std/special/compiler_rt/addXf3_test.zig-8
......@@ -31,10 +31,6 @@ fn test__addtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) void {
3131}
3232
3333test "addtf3" {
34 if (@import("std").Target.current.isWindows()) {
35 // TODO https://github.com/ziglang/zig/issues/508
36 return error.SkipZigTest;
37 }
3834 test__addtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
3935
4036 // NaN + any = NaN
......@@ -75,10 +71,6 @@ fn test__subtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) void {
7571}
7672
7773test "subtf3" {
78 if (@import("std").Target.current.isWindows()) {
79 // TODO https://github.com/ziglang/zig/issues/508
80 return error.SkipZigTest;
81 }
8274 // qNaN - any = qNaN
8375 test__subtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
8476
lib/std/special/compiler_rt/fixtfdi_test.zig-4
......@@ -11,10 +11,6 @@ fn test__fixtfdi(a: f128, expected: i64) void {
1111}
1212
1313test "fixtfdi" {
14 if (@import("std").Target.current.isWindows()) {
15 // TODO https://github.com/ziglang/zig/issues/508
16 return error.SkipZigTest;
17 }
1814 //warn("\n", .{});
1915 test__fixtfdi(-math.f128_max, math.minInt(i64));
2016
lib/std/special/compiler_rt/fixtfsi_test.zig-4
......@@ -11,10 +11,6 @@ fn test__fixtfsi(a: f128, expected: i32) void {
1111}
1212
1313test "fixtfsi" {
14 if (@import("std").Target.current.isWindows()) {
15 // TODO https://github.com/ziglang/zig/issues/508
16 return error.SkipZigTest;
17 }
1814 //warn("\n", .{});
1915 test__fixtfsi(-math.f128_max, math.minInt(i32));
2016
lib/std/special/compiler_rt/fixtfti_test.zig-4
......@@ -11,10 +11,6 @@ fn test__fixtfti(a: f128, expected: i128) void {
1111}
1212
1313test "fixtfti" {
14 if (@import("std").Target.current.isWindows()) {
15 // TODO https://github.com/ziglang/zig/issues/508
16 return error.SkipZigTest;
17 }
1814 //warn("\n", .{});
1915 test__fixtfti(-math.f128_max, math.minInt(i128));
2016
lib/std/special/compiler_rt/fixunstfdi_test.zig-4
......@@ -7,10 +7,6 @@ fn test__fixunstfdi(a: f128, expected: u64) void {
77}
88
99test "fixunstfdi" {
10 if (@import("std").Target.current.isWindows()) {
11 // TODO https://github.com/ziglang/zig/issues/508
12 return error.SkipZigTest;
13 }
1410 test__fixunstfdi(0.0, 0);
1511
1612 test__fixunstfdi(0.5, 0);
lib/std/special/compiler_rt/fixunstfsi_test.zig-4
......@@ -9,10 +9,6 @@ fn test__fixunstfsi(a: f128, expected: u32) void {
99const inf128 = @bitCast(f128, @as(u128, 0x7fff0000000000000000000000000000));
1010
1111test "fixunstfsi" {
12 if (@import("std").Target.current.isWindows()) {
13 // TODO https://github.com/ziglang/zig/issues/508
14 return error.SkipZigTest;
15 }
1612 test__fixunstfsi(inf128, 0xffffffff);
1713 test__fixunstfsi(0, 0x0);
1814 test__fixunstfsi(0x1.23456789abcdefp+5, 0x24);
lib/std/special/compiler_rt/fixunstfti_test.zig-4
......@@ -9,10 +9,6 @@ fn test__fixunstfti(a: f128, expected: u128) void {
99const inf128 = @bitCast(f128, @as(u128, 0x7fff0000000000000000000000000000));
1010
1111test "fixunstfti" {
12 if (@import("std").Target.current.isWindows()) {
13 // TODO https://github.com/ziglang/zig/issues/508
14 return error.SkipZigTest;
15 }
1612 test__fixunstfti(inf128, 0xffffffffffffffffffffffffffffffff);
1713
1814 test__fixunstfti(0.0, 0);
lib/std/special/compiler_rt/floattitf_test.zig-4
......@@ -7,10 +7,6 @@ fn test__floattitf(a: i128, expected: f128) void {
77}
88
99test "floattitf" {
10 if (@import("std").Target.current.isWindows()) {
11 // TODO https://github.com/ziglang/zig/issues/508
12 return error.SkipZigTest;
13 }
1410 test__floattitf(0, 0.0);
1511
1612 test__floattitf(1, 1.0);
lib/std/special/compiler_rt/floatuntitf_test.zig-4
......@@ -7,10 +7,6 @@ fn test__floatuntitf(a: u128, expected: f128) void {
77}
88
99test "floatuntitf" {
10 if (@import("std").Target.current.isWindows()) {
11 // TODO https://github.com/ziglang/zig/issues/508
12 return error.SkipZigTest;
13 }
1410 test__floatuntitf(0, 0.0);
1511
1612 test__floatuntitf(1, 1.0);
lib/std/special/compiler_rt/mulXf3_test.zig-4
......@@ -44,10 +44,6 @@ fn makeNaN128(rand: u64) f128 {
4444 return float_result;
4545}
4646test "multf3" {
47 if (@import("std").Target.current.isWindows()) {
48 // TODO https://github.com/ziglang/zig/issues/508
49 return error.SkipZigTest;
50 }
5147 // qNaN * any = qNaN
5248 test__multf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
5349
lib/std/special/compiler_rt/truncXfYf2_test.zig-8
......@@ -151,10 +151,6 @@ fn test__trunctfsf2(a: f128, expected: u32) void {
151151}
152152
153153test "trunctfsf2" {
154 if (@import("std").Target.current.isWindows()) {
155 // TODO https://github.com/ziglang/zig/issues/508
156 return error.SkipZigTest;
157 }
158154 // qnan
159155 test__trunctfsf2(@bitCast(f128, @as(u128, 0x7fff800000000000 << 64)), 0x7fc00000);
160156 // nan
......@@ -190,10 +186,6 @@ fn test__trunctfdf2(a: f128, expected: u64) void {
190186}
191187
192188test "trunctfdf2" {
193 if (@import("std").Target.current.isWindows()) {
194 // TODO https://github.com/ziglang/zig/issues/508
195 return error.SkipZigTest;
196 }
197189 // qnan
198190 test__trunctfdf2(@bitCast(f128, @as(u128, 0x7fff800000000000 << 64)), 0x7ff8000000000000);
199191 // nan
src-self-hosted/compilation.zig+1-4
......@@ -451,14 +451,11 @@ pub const Compilation = struct {
451451
452452 const reloc_mode = if (is_static) llvm.RelocStatic else llvm.RelocPIC;
453453
454 // LLVM creates invalid binaries on Windows sometimes.
455 // See https://github.com/ziglang/zig/issues/508
456 // As a workaround we do not use target native features on Windows.
457454 var target_specific_cpu_args: ?[*:0]u8 = null;
458455 var target_specific_cpu_features: ?[*:0]u8 = null;
459456 defer llvm.DisposeMessage(target_specific_cpu_args);
460457 defer llvm.DisposeMessage(target_specific_cpu_features);
461 if (target == Target.Native and !target.isWindows()) {
458 if (target == Target.Native) {
462459 target_specific_cpu_args = llvm.GetHostCPUName() orelse return error.OutOfMemory;
463460 target_specific_cpu_features = llvm.GetNativeFeatures() orelse return error.OutOfMemory;
464461 }