diff --git a/android/arch_list.go b/android/arch_list.go index 801ac49c8..f4409a918 100644 --- a/android/arch_list.go +++ b/android/arch_list.go @@ -34,11 +34,11 @@ var archVariants = map[ArchType][]string{ "broadwell", "goldmont", "goldmont-plus", - // Target arch is goldmont, but without xsaves support. + // Target arch is goldmont, but without supporting SHA and XSAVES. // This ensures efficient execution on a broad range of Intel/AMD CPUs used - // in Chromebooks, including those lacking xsaves support. + // in Chromebooks, including those lacking SHA or XSAVES support. // (e.g. Kaby Lake, Gemini Lake, Alder Lake and AMD Zen series) - "goldmont-without-xsaves", + "goldmont-without-sha-xsaves", "haswell", "icelake", "ivybridge", @@ -57,7 +57,7 @@ var archVariants = map[ArchType][]string{ "broadwell", "goldmont", "goldmont-plus", - "goldmont-without-xsaves", + "goldmont-without-sha-xsaves", "haswell", "icelake", "ivybridge", @@ -203,7 +203,7 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{ "popcnt", "movbe", }, - "goldmont-without-xsaves": { + "goldmont-without-sha-xsaves": { "ssse3", "sse4", "sse4_1", @@ -373,7 +373,7 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{ "aes_ni", "popcnt", }, - "goldmont-without-xsaves": { + "goldmont-without-sha-xsaves": { "ssse3", "sse4", "sse4_1", diff --git a/cc/config/x86_64_device.go b/cc/config/x86_64_device.go index ff0a3b7b6..b97d511b7 100644 --- a/cc/config/x86_64_device.go +++ b/cc/config/x86_64_device.go @@ -49,8 +49,9 @@ var ( "goldmont-plus": []string{ "-march=goldmont-plus", }, - "goldmont-without-xsaves": []string{ + "goldmont-without-sha-xsaves": []string{ "-march=goldmont", + "-mno-sha", "-mno-xsaves", }, "haswell": []string{ diff --git a/cc/config/x86_device.go b/cc/config/x86_device.go index 08be8698c..2faa6709f 100644 --- a/cc/config/x86_device.go +++ b/cc/config/x86_device.go @@ -56,8 +56,9 @@ var ( "goldmont-plus": []string{ "-march=goldmont-plus", }, - "goldmont-without-xsaves": []string{ + "goldmont-without-sha-xsaves": []string{ "-march=goldmont", + "-mno-sha", "-mno-xsaves", }, "haswell": []string{ diff --git a/rust/config/x86_64_device.go b/rust/config/x86_64_device.go index cc1670417..49f7c772e 100644 --- a/rust/config/x86_64_device.go +++ b/rust/config/x86_64_device.go @@ -28,16 +28,16 @@ var ( x86_64LinkFlags = []string{} x86_64ArchVariantRustFlags = map[string][]string{ - "": []string{}, - "broadwell": []string{"-C target-cpu=broadwell"}, - "goldmont": []string{"-C target-cpu=goldmont"}, - "goldmont-plus": []string{"-C target-cpu=goldmont-plus"}, - "goldmont-without-xsaves": []string{"-C target-cpu=goldmont", "-C target-feature=-xsaves"}, - "haswell": []string{"-C target-cpu=haswell"}, - "ivybridge": []string{"-C target-cpu=ivybridge"}, - "sandybridge": []string{"-C target-cpu=sandybridge"}, - "silvermont": []string{"-C target-cpu=silvermont"}, - "skylake": []string{"-C target-cpu=skylake"}, + "": []string{}, + "broadwell": []string{"-C target-cpu=broadwell"}, + "goldmont": []string{"-C target-cpu=goldmont"}, + "goldmont-plus": []string{"-C target-cpu=goldmont-plus"}, + "goldmont-without-sha-xsaves": []string{"-C target-cpu=goldmont", "-C target-feature=-sha,-xsaves"}, + "haswell": []string{"-C target-cpu=haswell"}, + "ivybridge": []string{"-C target-cpu=ivybridge"}, + "sandybridge": []string{"-C target-cpu=sandybridge"}, + "silvermont": []string{"-C target-cpu=silvermont"}, + "skylake": []string{"-C target-cpu=skylake"}, //TODO: Add target-cpu=stoneyridge when rustc supports it. "stoneyridge": []string{""}, "tremont": []string{"-C target-cpu=tremont"}, diff --git a/rust/config/x86_device.go b/rust/config/x86_device.go index e7b575cd5..2a57e73bb 100644 --- a/rust/config/x86_device.go +++ b/rust/config/x86_device.go @@ -26,17 +26,17 @@ var ( x86LinkFlags = []string{} x86ArchVariantRustFlags = map[string][]string{ - "": []string{}, - "atom": []string{"-C target-cpu=atom"}, - "broadwell": []string{"-C target-cpu=broadwell"}, - "goldmont": []string{"-C target-cpu=goldmont"}, - "goldmont-plus": []string{"-C target-cpu=goldmont-plus"}, - "goldmont-without-xsaves": []string{"-C target-cpu=goldmont", "-C target-feature=-xsaves"}, - "haswell": []string{"-C target-cpu=haswell"}, - "ivybridge": []string{"-C target-cpu=ivybridge"}, - "sandybridge": []string{"-C target-cpu=sandybridge"}, - "silvermont": []string{"-C target-cpu=silvermont"}, - "skylake": []string{"-C target-cpu=skylake"}, + "": []string{}, + "atom": []string{"-C target-cpu=atom"}, + "broadwell": []string{"-C target-cpu=broadwell"}, + "goldmont": []string{"-C target-cpu=goldmont"}, + "goldmont-plus": []string{"-C target-cpu=goldmont-plus"}, + "goldmont-without-sha-xsaves": []string{"-C target-cpu=goldmont", "-C target-feature=-sha,-xsaves"}, + "haswell": []string{"-C target-cpu=haswell"}, + "ivybridge": []string{"-C target-cpu=ivybridge"}, + "sandybridge": []string{"-C target-cpu=sandybridge"}, + "silvermont": []string{"-C target-cpu=silvermont"}, + "skylake": []string{"-C target-cpu=skylake"}, //TODO: Add target-cpu=stoneyridge when rustc supports it. "stoneyridge": []string{""}, "tremont": []string{"-C target-cpu=tremont"},