diff --git a/android/arch.go b/android/arch.go index 151cabded..797c84caf 100644 --- a/android/arch.go +++ b/android/arch.go @@ -155,18 +155,32 @@ var archVariants = map[ArchType][]string{ "mips64r6", }, X86: { + "amberlake", "atom", + "broadwell", "haswell", + "icelake", "ivybridge", + "kabylake", "sandybridge", "silvermont", + "skylake", + "tigerlake", + "whiskeylake", "x86_64", }, X86_64: { + "amberlake", + "broadwell", "haswell", + "icelake", "ivybridge", + "kabylake", "sandybridge", "silvermont", + "skylake", + "tigerlake", + "whiskeylake", }, } @@ -190,6 +204,8 @@ var archFeatures = map[ArchType][]string{ "sse4_2", "aes_ni", "avx", + "avx2", + "avx512", "popcnt", "movbe", }, @@ -200,6 +216,8 @@ var archFeatures = map[ArchType][]string{ "sse4_2", "aes_ni", "avx", + "avx2", + "avx512", "popcnt", }, } @@ -230,10 +248,30 @@ var archFeatureMap = map[ArchType]map[string][]string{ }, }, X86: { + "amberlake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "aes_ni", + "popcnt", + }, "atom": { "ssse3", "movbe", }, + "broadwell": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "aes_ni", + "popcnt", + }, "haswell": { "ssse3", "sse4", @@ -244,6 +282,17 @@ var archFeatureMap = map[ArchType]map[string][]string{ "popcnt", "movbe", }, + "icelake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, "ivybridge": { "ssse3", "sse4", @@ -253,6 +302,16 @@ var archFeatureMap = map[ArchType]map[string][]string{ "avx", "popcnt", }, + "kabylake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "aes_ni", + "popcnt", + }, "sandybridge": { "ssse3", "sse4", @@ -269,6 +328,39 @@ var archFeatureMap = map[ArchType]map[string][]string{ "popcnt", "movbe", }, + "skylake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, + "tigerlake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, + "whiskeylake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, "x86_64": { "ssse3", "sse4", @@ -278,6 +370,26 @@ var archFeatureMap = map[ArchType]map[string][]string{ }, }, X86_64: { + "amberlake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "aes_ni", + "popcnt", + }, + "broadwell": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "aes_ni", + "popcnt", + }, "haswell": { "ssse3", "sse4", @@ -287,6 +399,17 @@ var archFeatureMap = map[ArchType]map[string][]string{ "avx", "popcnt", }, + "icelake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, "ivybridge": { "ssse3", "sse4", @@ -296,6 +419,16 @@ var archFeatureMap = map[ArchType]map[string][]string{ "avx", "popcnt", }, + "kabylake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "aes_ni", + "popcnt", + }, "sandybridge": { "ssse3", "sse4", @@ -311,6 +444,39 @@ var archFeatureMap = map[ArchType]map[string][]string{ "aes_ni", "popcnt", }, + "skylake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, + "tigerlake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, + "whiskeylake": { + "ssse3", + "sse4", + "sse4_1", + "sse4_2", + "avx", + "avx2", + "avx512", + "aes_ni", + "popcnt", + }, }, } diff --git a/cc/config/x86_64_device.go b/cc/config/x86_64_device.go index 4264edaa4..8a86db451 100644 --- a/cc/config/x86_64_device.go +++ b/cc/config/x86_64_device.go @@ -38,6 +38,10 @@ var ( "": []string{ "-march=x86-64", }, + "broadwell": []string{ + "-march=broadwell", + }, + "haswell": []string{ "-march=core-avx2", }, @@ -50,6 +54,9 @@ var ( "silvermont": []string{ "-march=slm", }, + "skylake": []string{ + "-march=skylake", + }, } x86_64ArchFeatureCflags = map[string][]string{ @@ -59,6 +66,8 @@ var ( "sse4_2": []string{"-msse4.2"}, "popcnt": []string{"-mpopcnt"}, "avx": []string{"-mavx"}, + "avx2": []string{"-mavx2"}, + "avx512": []string{"-mavx512"}, "aes_ni": []string{"-maes"}, } ) diff --git a/cc/config/x86_device.go b/cc/config/x86_device.go index 34e7df896..b3d6a4dd3 100644 --- a/cc/config/x86_device.go +++ b/cc/config/x86_device.go @@ -51,6 +51,10 @@ var ( "-march=atom", "-mfpmath=sse", }, + "broadwell": []string{ + "-march=broadwell", + "-mfpmath=sse", + }, "haswell": []string{ "-march=core-avx2", "-mfpmath=sse", @@ -67,6 +71,10 @@ var ( "-march=slm", "-mfpmath=sse", }, + "skylake": []string{ + "-march=skylake", + "-mfpmath=sse", + }, } x86ArchFeatureCflags = map[string][]string{