aboutsummaryrefslogtreecommitdiff
path: root/lib/std/target.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2022-10-29 05:58:41 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2022-10-29 05:58:41 -0400
commit48a2783969b0a43200514a5b4e9cce57be4e5b46 (patch)
tree0f7cc577dd9090938d842250e1d1986d3d05aa0e /lib/std/target.zig
parente20d2b3151607fe078b43331ea27d5b34f95360b (diff)
parent20925b2f5c5c0ae20fdc0574e5d4e5740d17b4d6 (diff)
downloadzig-48a2783969b0a43200514a5b4e9cce57be4e5b46.tar.gz
zig-48a2783969b0a43200514a5b4e9cce57be4e5b46.zip
cbe: implement optional slice representation change
Diffstat (limited to 'lib/std/target.zig')
-rw-r--r--lib/std/target.zig75
1 files changed, 5 insertions, 70 deletions
diff --git a/lib/std/target.zig b/lib/std/target.zig
index d791e3b035..342e535c27 100644
--- a/lib/std/target.zig
+++ b/lib/std/target.zig
@@ -276,14 +276,14 @@ pub const Target = struct {
.macos => return switch (arch) {
.aarch64 => VersionRange{
.semver = .{
- .min = .{ .major = 11, .minor = 6, .patch = 6 },
- .max = .{ .major = 12, .minor = 4 },
+ .min = .{ .major = 11, .minor = 7, .patch = 1 },
+ .max = .{ .major = 13, .minor = 0 },
},
},
.x86_64 => VersionRange{
.semver = .{
- .min = .{ .major = 10, .minor = 15, .patch = 7 },
- .max = .{ .major = 12, .minor = 4 },
+ .min = .{ .major = 11, .minor = 7, .patch = 1 },
+ .max = .{ .major = 13, .minor = 0 },
},
},
else => unreachable,
@@ -1780,71 +1780,6 @@ pub const Target = struct {
};
}
- pub inline fn longDoubleIs(target: Target, comptime F: type) bool {
- if (target.abi == .msvc or (target.abi == .android and target.cpu.arch == .i386)) {
- return F == f64;
- }
- return switch (F) {
- f128 => switch (target.cpu.arch) {
- .aarch64 => {
- // According to Apple's official guide:
- // > The long double type is a double precision IEEE754 binary floating-point type,
- // > which makes it identical to the double type. This behavior contrasts to the
- // > standard specification, in which a long double is a quad-precision, IEEE754
- // > binary, floating-point type.
- // https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
- return !target.isDarwin();
- },
-
- .riscv64,
- .aarch64_be,
- .aarch64_32,
- .s390x,
- .mips64,
- .mips64el,
- .sparc,
- .sparc64,
- .sparcel,
- .powerpc,
- .powerpcle,
- .powerpc64,
- .powerpc64le,
- .wasm32,
- .wasm64,
- => true,
-
- else => false,
- },
- f80 => switch (target.cpu.arch) {
- .x86_64, .i386 => true,
- else => false,
- },
- f64 => switch (target.cpu.arch) {
- .aarch64 => target.isDarwin(),
-
- .x86_64,
- .i386,
- .riscv64,
- .aarch64_be,
- .aarch64_32,
- .s390x,
- .mips64,
- .mips64el,
- .sparc,
- .sparc64,
- .sparcel,
- .powerpc,
- .powerpcle,
- .powerpc64,
- .powerpc64le,
- => false,
-
- else => true,
- },
- else => false,
- };
- }
-
pub inline fn maxIntAlignment(target: Target) u16 {
return switch (target.cpu.arch) {
.avr => 1,
@@ -1872,7 +1807,7 @@ pub const Target = struct {
=> 8,
.i386 => return switch (target.os.tag) {
- .windows => 8,
+ .windows, .uefi => 8,
else => 4,
},