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 {...@@ -382,10 +382,6 @@ pub fn parseFloat(comptime T: type, s: []const u8) !T {
382}382}
383383
384test "fmt.parseFloat" {384test "fmt.parseFloat" {
385 if (std.Target.current.isWindows()) {
386 // TODO https://github.com/ziglang/zig/issues/508
387 return error.SkipZigTest;
388 }
389 const testing = std.testing;385 const testing = std.testing;
390 const expect = testing.expect;386 const expect = testing.expect;
391 const expectEqual = testing.expectEqual;387 const expectEqual = testing.expectEqual;
lib/std/io/test.zig-4
...@@ -547,10 +547,6 @@ fn testSerializerDeserializer(comptime endian: builtin.Endian, comptime packing:...@@ -547,10 +547,6 @@ fn testSerializerDeserializer(comptime endian: builtin.Endian, comptime packing:
547}547}
548548
549test "Serializer/Deserializer generic" {549test "Serializer/Deserializer generic" {
550 if (std.Target.current.isWindows()) {
551 // TODO https://github.com/ziglang/zig/issues/508
552 return error.SkipZigTest;
553 }
554 try testSerializerDeserializer(builtin.Endian.Big, .Byte);550 try testSerializerDeserializer(builtin.Endian.Big, .Byte);
555 try testSerializerDeserializer(builtin.Endian.Little, .Byte);551 try testSerializerDeserializer(builtin.Endian.Little, .Byte);
556 try testSerializerDeserializer(builtin.Endian.Big, .Bit);552 try testSerializerDeserializer(builtin.Endian.Big, .Bit);
lib/std/math/fabs.zig-4
...@@ -95,10 +95,6 @@ test "math.fabs64.special" {...@@ -95,10 +95,6 @@ test "math.fabs64.special" {
95}95}
9696
97test "math.fabs128.special" {97test "math.fabs128.special" {
98 if (std.Target.current.isWindows()) {
99 // TODO https://github.com/ziglang/zig/issues/508
100 return error.SkipZigTest;
101 }
102 expect(math.isPositiveInf(fabs(math.inf(f128))));98 expect(math.isPositiveInf(fabs(math.inf(f128))));
103 expect(math.isPositiveInf(fabs(-math.inf(f128))));99 expect(math.isPositiveInf(fabs(-math.inf(f128))));
104 expect(math.isNan(fabs(math.nan(f128))));100 expect(math.isNan(fabs(math.nan(f128))));
lib/std/math/isinf.zig-12
...@@ -74,10 +74,6 @@ pub fn isNegativeInf(x: var) bool {...@@ -74,10 +74,6 @@ pub fn isNegativeInf(x: var) bool {
74}74}
7575
76test "math.isInf" {76test "math.isInf" {
77 if (std.Target.current.isWindows()) {
78 // TODO https://github.com/ziglang/zig/issues/508
79 return error.SkipZigTest;
80 }
81 expect(!isInf(@as(f16, 0.0)));77 expect(!isInf(@as(f16, 0.0)));
82 expect(!isInf(@as(f16, -0.0)));78 expect(!isInf(@as(f16, -0.0)));
83 expect(!isInf(@as(f32, 0.0)));79 expect(!isInf(@as(f32, 0.0)));
...@@ -97,10 +93,6 @@ test "math.isInf" {...@@ -97,10 +93,6 @@ test "math.isInf" {
97}93}
9894
99test "math.isPositiveInf" {95test "math.isPositiveInf" {
100 if (std.Target.current.isWindows()) {
101 // TODO https://github.com/ziglang/zig/issues/508
102 return error.SkipZigTest;
103 }
104 expect(!isPositiveInf(@as(f16, 0.0)));96 expect(!isPositiveInf(@as(f16, 0.0)));
105 expect(!isPositiveInf(@as(f16, -0.0)));97 expect(!isPositiveInf(@as(f16, -0.0)));
106 expect(!isPositiveInf(@as(f32, 0.0)));98 expect(!isPositiveInf(@as(f32, 0.0)));
...@@ -120,10 +112,6 @@ test "math.isPositiveInf" {...@@ -120,10 +112,6 @@ test "math.isPositiveInf" {
120}112}
121113
122test "math.isNegativeInf" {114test "math.isNegativeInf" {
123 if (std.Target.current.isWindows()) {
124 // TODO https://github.com/ziglang/zig/issues/508
125 return error.SkipZigTest;
126 }
127 expect(!isNegativeInf(@as(f16, 0.0)));115 expect(!isNegativeInf(@as(f16, 0.0)));
128 expect(!isNegativeInf(@as(f16, -0.0)));116 expect(!isNegativeInf(@as(f16, -0.0)));
129 expect(!isNegativeInf(@as(f32, 0.0)));117 expect(!isNegativeInf(@as(f32, 0.0)));
lib/std/math/isnan.zig-4
...@@ -16,10 +16,6 @@ pub fn isSignalNan(x: var) bool {...@@ -16,10 +16,6 @@ pub fn isSignalNan(x: var) bool {
16}16}
1717
18test "math.isNan" {18test "math.isNan" {
19 if (std.Target.current.isWindows()) {
20 // TODO https://github.com/ziglang/zig/issues/508
21 return error.SkipZigTest;
22 }
23 expect(isNan(math.nan(f16)));19 expect(isNan(math.nan(f16)));
24 expect(isNan(math.nan(f32)));20 expect(isNan(math.nan(f32)));
25 expect(isNan(math.nan(f64)));21 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 {...@@ -31,10 +31,6 @@ fn test__addtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) void {
31}31}
3232
33test "addtf3" {33test "addtf3" {
34 if (@import("std").Target.current.isWindows()) {
35 // TODO https://github.com/ziglang/zig/issues/508
36 return error.SkipZigTest;
37 }
38 test__addtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);34 test__addtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
3935
40 // NaN + any = NaN36 // NaN + any = NaN
...@@ -75,10 +71,6 @@ fn test__subtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) void {...@@ -75,10 +71,6 @@ fn test__subtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) void {
75}71}
7672
77test "subtf3" {73test "subtf3" {
78 if (@import("std").Target.current.isWindows()) {
79 // TODO https://github.com/ziglang/zig/issues/508
80 return error.SkipZigTest;
81 }
82 // qNaN - any = qNaN74 // qNaN - any = qNaN
83 test__subtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);75 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 {...@@ -11,10 +11,6 @@ fn test__fixtfdi(a: f128, expected: i64) void {
11}11}
1212
13test "fixtfdi" {13test "fixtfdi" {
14 if (@import("std").Target.current.isWindows()) {
15 // TODO https://github.com/ziglang/zig/issues/508
16 return error.SkipZigTest;
17 }
18 //warn("\n", .{});14 //warn("\n", .{});
19 test__fixtfdi(-math.f128_max, math.minInt(i64));15 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 {...@@ -11,10 +11,6 @@ fn test__fixtfsi(a: f128, expected: i32) void {
11}11}
1212
13test "fixtfsi" {13test "fixtfsi" {
14 if (@import("std").Target.current.isWindows()) {
15 // TODO https://github.com/ziglang/zig/issues/508
16 return error.SkipZigTest;
17 }
18 //warn("\n", .{});14 //warn("\n", .{});
19 test__fixtfsi(-math.f128_max, math.minInt(i32));15 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 {...@@ -11,10 +11,6 @@ fn test__fixtfti(a: f128, expected: i128) void {
11}11}
1212
13test "fixtfti" {13test "fixtfti" {
14 if (@import("std").Target.current.isWindows()) {
15 // TODO https://github.com/ziglang/zig/issues/508
16 return error.SkipZigTest;
17 }
18 //warn("\n", .{});14 //warn("\n", .{});
19 test__fixtfti(-math.f128_max, math.minInt(i128));15 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 {...@@ -7,10 +7,6 @@ fn test__fixunstfdi(a: f128, expected: u64) void {
7}7}
88
9test "fixunstfdi" {9test "fixunstfdi" {
10 if (@import("std").Target.current.isWindows()) {
11 // TODO https://github.com/ziglang/zig/issues/508
12 return error.SkipZigTest;
13 }
14 test__fixunstfdi(0.0, 0);10 test__fixunstfdi(0.0, 0);
1511
16 test__fixunstfdi(0.5, 0);12 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 {...@@ -9,10 +9,6 @@ fn test__fixunstfsi(a: f128, expected: u32) void {
9const inf128 = @bitCast(f128, @as(u128, 0x7fff0000000000000000000000000000));9const inf128 = @bitCast(f128, @as(u128, 0x7fff0000000000000000000000000000));
1010
11test "fixunstfsi" {11test "fixunstfsi" {
12 if (@import("std").Target.current.isWindows()) {
13 // TODO https://github.com/ziglang/zig/issues/508
14 return error.SkipZigTest;
15 }
16 test__fixunstfsi(inf128, 0xffffffff);12 test__fixunstfsi(inf128, 0xffffffff);
17 test__fixunstfsi(0, 0x0);13 test__fixunstfsi(0, 0x0);
18 test__fixunstfsi(0x1.23456789abcdefp+5, 0x24);14 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 {...@@ -9,10 +9,6 @@ fn test__fixunstfti(a: f128, expected: u128) void {
9const inf128 = @bitCast(f128, @as(u128, 0x7fff0000000000000000000000000000));9const inf128 = @bitCast(f128, @as(u128, 0x7fff0000000000000000000000000000));
1010
11test "fixunstfti" {11test "fixunstfti" {
12 if (@import("std").Target.current.isWindows()) {
13 // TODO https://github.com/ziglang/zig/issues/508
14 return error.SkipZigTest;
15 }
16 test__fixunstfti(inf128, 0xffffffffffffffffffffffffffffffff);12 test__fixunstfti(inf128, 0xffffffffffffffffffffffffffffffff);
1713
18 test__fixunstfti(0.0, 0);14 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 {...@@ -7,10 +7,6 @@ fn test__floattitf(a: i128, expected: f128) void {
7}7}
88
9test "floattitf" {9test "floattitf" {
10 if (@import("std").Target.current.isWindows()) {
11 // TODO https://github.com/ziglang/zig/issues/508
12 return error.SkipZigTest;
13 }
14 test__floattitf(0, 0.0);10 test__floattitf(0, 0.0);
1511
16 test__floattitf(1, 1.0);12 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 {...@@ -7,10 +7,6 @@ fn test__floatuntitf(a: u128, expected: f128) void {
7}7}
88
9test "floatuntitf" {9test "floatuntitf" {
10 if (@import("std").Target.current.isWindows()) {
11 // TODO https://github.com/ziglang/zig/issues/508
12 return error.SkipZigTest;
13 }
14 test__floatuntitf(0, 0.0);10 test__floatuntitf(0, 0.0);
1511
16 test__floatuntitf(1, 1.0);12 test__floatuntitf(1, 1.0);
lib/std/special/compiler_rt/mulXf3_test.zig-4
...@@ -44,10 +44,6 @@ fn makeNaN128(rand: u64) f128 {...@@ -44,10 +44,6 @@ fn makeNaN128(rand: u64) f128 {
44 return float_result;44 return float_result;
45}45}
46test "multf3" {46test "multf3" {
47 if (@import("std").Target.current.isWindows()) {
48 // TODO https://github.com/ziglang/zig/issues/508
49 return error.SkipZigTest;
50 }
51 // qNaN * any = qNaN47 // qNaN * any = qNaN
52 test__multf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);48 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 {...@@ -151,10 +151,6 @@ fn test__trunctfsf2(a: f128, expected: u32) void {
151}151}
152152
153test "trunctfsf2" {153test "trunctfsf2" {
154 if (@import("std").Target.current.isWindows()) {
155 // TODO https://github.com/ziglang/zig/issues/508
156 return error.SkipZigTest;
157 }
158 // qnan154 // qnan
159 test__trunctfsf2(@bitCast(f128, @as(u128, 0x7fff800000000000 << 64)), 0x7fc00000);155 test__trunctfsf2(@bitCast(f128, @as(u128, 0x7fff800000000000 << 64)), 0x7fc00000);
160 // nan156 // nan
...@@ -190,10 +186,6 @@ fn test__trunctfdf2(a: f128, expected: u64) void {...@@ -190,10 +186,6 @@ fn test__trunctfdf2(a: f128, expected: u64) void {
190}186}
191187
192test "trunctfdf2" {188test "trunctfdf2" {
193 if (@import("std").Target.current.isWindows()) {
194 // TODO https://github.com/ziglang/zig/issues/508
195 return error.SkipZigTest;
196 }
197 // qnan189 // qnan
198 test__trunctfdf2(@bitCast(f128, @as(u128, 0x7fff800000000000 << 64)), 0x7ff8000000000000);190 test__trunctfdf2(@bitCast(f128, @as(u128, 0x7fff800000000000 << 64)), 0x7ff8000000000000);
199 // nan191 // nan
src-self-hosted/compilation.zig+1-4
...@@ -451,14 +451,11 @@ pub const Compilation = struct {...@@ -451,14 +451,11 @@ pub const Compilation = struct {
451451
452 const reloc_mode = if (is_static) llvm.RelocStatic else llvm.RelocPIC;452 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.
457 var target_specific_cpu_args: ?[*:0]u8 = null;454 var target_specific_cpu_args: ?[*:0]u8 = null;
458 var target_specific_cpu_features: ?[*:0]u8 = null;455 var target_specific_cpu_features: ?[*:0]u8 = null;
459 defer llvm.DisposeMessage(target_specific_cpu_args);456 defer llvm.DisposeMessage(target_specific_cpu_args);
460 defer llvm.DisposeMessage(target_specific_cpu_features);457 defer llvm.DisposeMessage(target_specific_cpu_features);
461 if (target == Target.Native and !target.isWindows()) {458 if (target == Target.Native) {
462 target_specific_cpu_args = llvm.GetHostCPUName() orelse return error.OutOfMemory;459 target_specific_cpu_args = llvm.GetHostCPUName() orelse return error.OutOfMemory;
463 target_specific_cpu_features = llvm.GetNativeFeatures() orelse return error.OutOfMemory;460 target_specific_cpu_features = llvm.GetNativeFeatures() orelse return error.OutOfMemory;
464 }461 }