Add a new x86(_64) arch variant "goldmont-without-xsaves"

Its target arch is goldmont, but without xsaves support.
This ensures efficient execution on a broad range of Intel/AMD CPUs used
in Chromebooks, including those lacking xsaves support.
(e.g. Kaby Lake, Gemini Lake, Alder Lake and AMD Zen series)

Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-xsaves
Change-Id: I9963cc3356394815f068fc998a9708bdb30c8266
This commit is contained in:
Satoshi Niwa
2023-12-14 17:33:36 +09:00
parent a53330a525
commit c41f21121c
5 changed files with 52 additions and 19 deletions

View File

@@ -34,6 +34,11 @@ var archVariants = map[ArchType][]string{
"broadwell",
"goldmont",
"goldmont-plus",
// Target arch is goldmont, but without xsaves support.
// This ensures efficient execution on a broad range of Intel/AMD CPUs used
// in Chromebooks, including those lacking xsaves support.
// (e.g. Kaby Lake, Gemini Lake, Alder Lake and AMD Zen series)
"goldmont-without-xsaves",
"haswell",
"icelake",
"ivybridge",
@@ -52,6 +57,7 @@ var archVariants = map[ArchType][]string{
"broadwell",
"goldmont",
"goldmont-plus",
"goldmont-without-xsaves",
"haswell",
"icelake",
"ivybridge",
@@ -197,6 +203,15 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{
"popcnt",
"movbe",
},
"goldmont-without-xsaves": {
"ssse3",
"sse4",
"sse4_1",
"sse4_2",
"aes_ni",
"popcnt",
"movbe",
},
"haswell": {
"ssse3",
"sse4",
@@ -358,6 +373,14 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{
"aes_ni",
"popcnt",
},
"goldmont-without-xsaves": {
"ssse3",
"sse4",
"sse4_1",
"sse4_2",
"aes_ni",
"popcnt",
},
"haswell": {
"ssse3",
"sse4",