From 694d8831c31fca5b669b52d3f9f95a8792daee41 Mon Sep 17 00:00:00 2001 From: Jay Petacat Date: Sat, 5 Nov 2022 21:26:33 -0600 Subject: [PATCH] Revert "x86" CPU model (not arch) back to "i386" PR #13101 recently renamed the "i386" architecture to "x86", and it seems the specific CPU model got swept up in that. "x86" is an umbrella term that describes a family of CPUs, and the "i386" is the oldest supported model under that umbrella. --- lib/std/target.zig | 2 +- lib/std/target/x86.zig | 4 ++-- lib/std/zig/system/x86.zig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/std/target.zig b/lib/std/target.zig index 691c5f2447bb8cd79f24a70030a8cc4358240a7f..cbab23644ba79b8ad1e9587b7dfce4442a891957 100644 --- a/lib/std/target.zig +++ b/lib/std/target.zig @@ -1377,7 +1377,7 @@ pub const Target = struct { .sparc, .sparcel => &sparc.cpu.generic, .sparc64 => &sparc.cpu.v9, // 64-bit SPARC needs v9 as the baseline .s390x => &s390x.cpu.generic, - .x86 => &x86.cpu.x86, + .x86 => &x86.cpu.i386, .x86_64 => &x86.cpu.x86_64, .nvptx, .nvptx64 => &nvptx.cpu.sm_20, .ve => &ve.cpu.generic, diff --git a/lib/std/target/x86.zig b/lib/std/target/x86.zig index 0d38e706637f77c23e22c7bd1063f2110133686e..a561c317bd13001cb082082199a6b75564c5878a 100644 --- a/lib/std/target/x86.zig +++ b/lib/std/target/x86.zig @@ -2040,8 +2040,8 @@ pub const cpu = struct { .xsaveopt, }), }; - pub const x86 = CpuModel{ - .name = "x86", + pub const @"i386" = CpuModel{ + .name = "i386", .llvm_name = "i386", .features = featureSet(&[_]Feature{ .slow_unaligned_mem_16, diff --git a/lib/std/zig/system/x86.zig b/lib/std/zig/system/x86.zig index 50198fc654e19659cc6be03d0f15c7515f2b1b7b..66468ba6ff88e1f7b72db4c5d4e13bb1791975b5 100644 --- a/lib/std/zig/system/x86.zig +++ b/lib/std/zig/system/x86.zig @@ -80,7 +80,7 @@ fn detectIntelProcessor(cpu: *Target.Cpu, family: u32, model: u32, brand_id: u32 } switch (family) { 3 => { - cpu.model = &Target.x86.cpu.x86; + cpu.model = &Target.x86.cpu.i386; return; }, 4 => { -- 2.54.0