Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f68c18f7 authored by Ryo Hashimoto's avatar Ryo Hashimoto
Browse files

Add arch variants for Intel Atom CPUs

Bug: 259201836
Test: Build aosp_x86_64-eng with modified build/make/target/board/generic_x86_64/BoardConfig.mk
Change-Id: Ic7410d6874c17af0e4492bf7704066ae9af1a531
parent ed972972
Loading
Loading
Loading
Loading
+57 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ var archVariants = map[ArchType][]string{
		"amberlake",
		"atom",
		"broadwell",
		"goldmont",
		"goldmont-plus",
		"haswell",
		"icelake",
		"ivybridge",
@@ -40,12 +42,15 @@ var archVariants = map[ArchType][]string{
		"skylake",
		"stoneyridge",
		"tigerlake",
		"tremont",
		"whiskeylake",
		"x86_64",
	},
	X86_64: {
		"amberlake",
		"broadwell",
		"goldmont",
		"goldmont-plus",
		"haswell",
		"icelake",
		"ivybridge",
@@ -55,6 +60,7 @@ var archVariants = map[ArchType][]string{
		"skylake",
		"stoneyridge",
		"tigerlake",
		"tremont",
		"whiskeylake",
	},
}
@@ -168,6 +174,24 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{
			"aes_ni",
			"popcnt",
		},
		"goldmont": {
			"ssse3",
			"sse4",
			"sse4_1",
			"sse4_2",
			"aes_ni",
			"popcnt",
			"movbe",
		},
		"goldmont-plus": {
			"ssse3",
			"sse4",
			"sse4_1",
			"sse4_2",
			"aes_ni",
			"popcnt",
			"movbe",
		},
		"haswell": {
			"ssse3",
			"sse4",
@@ -257,6 +281,15 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{
			"aes_ni",
			"popcnt",
		},
		"tremont": {
			"ssse3",
			"sse4",
			"sse4_1",
			"sse4_2",
			"aes_ni",
			"popcnt",
			"movbe",
		},
		"whiskeylake": {
			"ssse3",
			"sse4",
@@ -304,6 +337,22 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{
			"aes_ni",
			"popcnt",
		},
		"goldmont": {
			"ssse3",
			"sse4",
			"sse4_1",
			"sse4_2",
			"aes_ni",
			"popcnt",
		},
		"goldmont-plus": {
			"ssse3",
			"sse4",
			"sse4_1",
			"sse4_2",
			"aes_ni",
			"popcnt",
		},
		"haswell": {
			"ssse3",
			"sse4",
@@ -390,6 +439,14 @@ var androidArchFeatureMap = map[ArchType]map[string][]string{
			"aes_ni",
			"popcnt",
		},
		"tremont": {
			"ssse3",
			"sse4",
			"sse4_1",
			"sse4_2",
			"aes_ni",
			"popcnt",
		},
		"whiskeylake": {
			"ssse3",
			"sse4",
+9 −0
Original line number Diff line number Diff line
@@ -41,6 +41,12 @@ var (
		"broadwell": []string{
			"-march=broadwell",
		},
		"goldmont": []string{
			"-march=goldmont",
		},
		"goldmont-plus": []string{
			"-march=goldmont-plus",
		},
		"haswell": []string{
			"-march=core-avx2",
		},
@@ -59,6 +65,9 @@ var (
		"stoneyridge": []string{
			"-march=bdver4",
		},
		"tremont": []string{
			"-march=tremont",
		},
	}

	x86_64ArchFeatureCflags = map[string][]string{
+9 −0
Original line number Diff line number Diff line
@@ -50,6 +50,12 @@ var (
		"broadwell": []string{
			"-march=broadwell",
		},
		"goldmont": []string{
			"-march=goldmont",
		},
		"goldmont-plus": []string{
			"-march=goldmont-plus",
		},
		"haswell": []string{
			"-march=core-avx2",
		},
@@ -68,6 +74,9 @@ var (
		"stoneyridge": []string{
			"-march=bdver4",
		},
		"tremont": []string{
			"-march=tremont",
		},
	}

	x86ArchFeatureCflags = map[string][]string{
+10 −7
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ var (
	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"},
		"haswell":       []string{"-C target-cpu=haswell"},
		"ivybridge":     []string{"-C target-cpu=ivybridge"},
		"sandybridge":   []string{"-C target-cpu=sandybridge"},
@@ -35,6 +37,7 @@ var (
		"skylake":       []string{"-C target-cpu=skylake"},
		//TODO: Add target-cpu=stoneyridge when rustc supports it.
		"stoneyridge": []string{""},
		"tremont":     []string{"-C target-cpu=tremont"},
	}
)

+11 −8
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ var (
		"":              []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"},
		"haswell":       []string{"-C target-cpu=haswell"},
		"ivybridge":     []string{"-C target-cpu=ivybridge"},
		"sandybridge":   []string{"-C target-cpu=sandybridge"},
@@ -36,6 +38,7 @@ var (
		"skylake":       []string{"-C target-cpu=skylake"},
		//TODO: Add target-cpu=stoneyridge when rustc supports it.
		"stoneyridge": []string{""},
		"tremont":     []string{"-C target-cpu=tremont"},
		// use prescott for x86_64, like cc/config/x86_device.go
		"x86_64": []string{"-C target-cpu=prescott"},
	}