Browse Source

refactor x86_64 cpu choice, so that it can be used for toolchain, too

Waldemar Brodkorb 8 years ago
parent
commit
e3a8d4cc1c
3 changed files with 103 additions and 102 deletions
  1. 0 1
      Config.in
  2. 103 2
      target/config/Config.in.tc
  3. 0 99
      target/config/Config.in.x86_64

+ 0 - 1
Config.in

@@ -24,7 +24,6 @@ source "target/config/Config.in.boards"
 source "target/config/Config.in.kernelfmt"
 source "target/config/Config.in.arch"
 source "target/config/Config.in.system"
-source "target/config/Config.in.x86_64"
 source "target/config/Config.in.subsystem"
 source "target/config/Config.in.tc"
 source "target/config/Config.in.xtensa"

+ 103 - 2
target/config/Config.in.tc

@@ -3,7 +3,7 @@
 
 choice ADK_TARGET_CPU
 prompt "CPU type"
-depends on (ADK_TARGET_TOOLCHAIN || ADK_TARGET_SIM) && \
+depends on (ADK_TARGET_TOOLCHAIN || ADK_TARGET_SIM || ADK_TARGET_SYSTEM_GENERIC_X86_64) && \
 	( ADK_TARGET_ARCH_CRIS \
 	|| ADK_TARGET_ARCH_AARCH64 \
 	|| ADK_TARGET_ARCH_ARC \
@@ -14,7 +14,8 @@ depends on (ADK_TARGET_TOOLCHAIN || ADK_TARGET_SIM) && \
 	|| ADK_TARGET_ARCH_MIPS64 \
 	|| ADK_TARGET_ARCH_SH \
 	|| ADK_TARGET_ARCH_SPARC \
-	|| ADK_TARGET_ARCH_X86 )
+	|| ADK_TARGET_ARCH_X86 \
+	|| ADK_TARGET_ARCH_X86_64 )
 
 config ADK_TARGET_CPU_ARC_ARC700
 	bool "ARC700 (ARCv1)"
@@ -508,6 +509,106 @@ config ADK_TARGET_CPU_X86_ATOM
 	select ADK_CPU_ATOM
 	depends on ADK_TARGET_ARCH_X86
 
+config ADK_TARGET_CPU_X86_64_X86_64
+	bool "Generic x86_64"
+	select ADK_CPU_X86_64
+
+config ADK_TARGET_CPU_X86_64_ATHLON_FX
+	bool "Athlon 64 FX"
+	select ADK_CPU_ATHLON_FX
+
+config ADK_TARGET_CPU_X86_64_ATHLON_64
+	bool "Athlon 64"
+	select ADK_CPU_ATHLON_64
+
+config ADK_TARGET_CPU_X86_64_ATHLON_64_SSE3
+	bool "Athlon 64 with SSE3"
+	select ADK_CPU_ATHLON_64_SSE3
+
+config ADK_TARGET_CPU_X86_64_BARCELONA
+	bool "Barcelona"
+	select ADK_CPU_BARCELONA
+
+config ADK_TARGET_CPU_X86_64_BDVER1
+	bool "bdver1"
+	select ADK_CPU_BDVER1
+
+config ADK_TARGET_CPU_X86_64_BDVER2
+	bool "bdver2"
+	select ADK_CPU_BDVER2
+
+config ADK_TARGET_CPU_X86_64_BDVER3
+	bool "bdver3"
+	select ADK_CPU_BDVER3
+
+config ADK_TARGET_CPU_X86_64_BDVER4
+	bool "bdver4"
+	select ADK_CPU_BDVER4
+
+config ADK_TARGET_CPU_X86_64_BONNELL
+	bool "Bonnell"
+	select ADK_CPU_BONNELL
+
+config ADK_TARGET_CPU_X86_64_BROADWELL
+	bool "Broadwell"
+	select ADK_CPU_BROADWELL
+
+config ADK_TARGET_CPU_X86_64_BTVER1
+	bool "btver1"
+	select ADK_CPU_BTVER1
+
+config ADK_TARGET_CPU_X86_64_BTVER2
+	bool "btver2"
+	select ADK_CPU_BTVER1
+
+config ADK_TARGET_CPU_X86_64_CORE2
+	bool "Core 2"
+	select ADK_CPU_CORE2
+
+config ADK_TARGET_CPU_X86_64_HASWELL
+	bool "Haswell"
+	select ADK_CPU_HASWELL
+
+config ADK_TARGET_CPU_X86_64_IVYBRIDGE
+	bool "Ivybridge"
+	select ADK_CPU_IVYBRIDGE
+
+config ADK_TARGET_CPU_X86_64_K8
+	bool "K8"
+	select ADK_CPU_K8
+
+config ADK_TARGET_CPU_X86_64_K8_SSE3
+	bool "K8 with SSE3"
+	select ADK_CPU_K8_SSE3
+
+config ADK_TARGET_CPU_X86_64_KNL
+	bool "knl"
+	select config ADK_CPU_KNL
+
+config ADK_TARGET_CPU_X86_64_NEHALEM
+	bool "Nehalem"
+	select ADK_CPU_NEHALEM
+
+config ADK_TARGET_CPU_X86_64_OPTERON
+	bool "Opteron"
+	select ADK_CPU_OPTERON
+
+config ADK_TARGET_CPU_X86_64_OPTERON_SSE3
+	bool "Opteron with SSE3"
+	select ADK_CPU_OPTERON_SSE3
+
+config ADK_TARGET_CPU_X86_64_SANDYBRIDGE
+	bool "Sandybridge"
+	select ADK_CPU_SANDYBRIDGE
+
+config ADK_TARGET_CPU_X86_64_SILVERMONT
+	bool "Silvermont"
+	select ADK_CPU_SILVERMONT
+
+config ADK_TARGET_CPU_X86_64_WESTMERE
+	bool "Westmere"
+	select ADK_CPU_WESTMERE
+
 endchoice
 
 choice

+ 0 - 99
target/config/Config.in.x86_64

@@ -10,105 +10,6 @@ help
   For details on the different types, see:
   https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/x86-Options.html#x86-Options
 
-config ADK_TARGET_CPU_X86_64
-	bool "Generic x86_64"
-	select ADK_CPU_X86_64
-
-config ADK_TARGET_CPU_ATHLON_FX
-	bool "Athlon 64 FX"
-	select ADK_CPU_ATHLON_FX
-
-config ADK_TARGET_CPU_ATHLON_64
-	bool "Athlon 64"
-	select ADK_CPU_ATHLON_64
-
-config ADK_TARGET_CPU_ATHLON_64_SSE3
-	bool "Athlon 64 with SSE3"
-	select ADK_CPU_ATHLON_64_SSE3
-
-config ADK_TARGET_CPU_BARCELONA
-	bool "Barcelona"
-	select ADK_CPU_BARCELONA
-
-config ADK_TARGET_CPU_BDVER1
-	bool "bdver1"
-	select ADK_CPU_BDVER1
-
-config ADK_TARGET_CPU_BDVER2
-	bool "bdver2"
-	select ADK_CPU_BDVER2
-
-config ADK_TARGET_CPU_BDVER3
-	bool "bdver3"
-	select ADK_CPU_BDVER3
-
-config ADK_TARGET_CPU_BDVER4
-	bool "bdver4"
-	select ADK_CPU_BDVER4
-
-config ADK_TARGET_CPU_BONNELL
-	bool "Bonnell"
-	select ADK_CPU_BONNELL
-
-config ADK_TARGET_CPU_BROADWELL
-	bool "Broadwell"
-	select ADK_CPU_BROADWELL
-
-config ADK_TARGET_CPU_BTVER1
-	bool "btver1"
-	select ADK_CPU_BTVER1
-
-config ADK_TARGET_CPU_BTVER2
-	bool "btver2"
-	select ADK_CPU_BTVER1
-
-config ADK_TARGET_CPU_CORE2
-	bool "Core 2"
-	select ADK_CPU_CORE2
-
-config ADK_TARGET_CPU_HASWELL
-	bool "Haswell"
-	select ADK_CPU_HASWELL
-
-config ADK_TARGET_CPU_IVYBRIDGE
-	bool "Ivybridge"
-	select ADK_CPU_IVYBRIDGE
-
-config ADK_TARGET_CPU_K8
-	bool "K8"
-	select ADK_CPU_K8
-
-config ADK_TARGET_CPU_K8_SSE3
-	bool "K8 with SSE3"
-	select ADK_CPU_K8_SSE3
-
-config ADK_TARGET_CPU_KNL
-	bool "knl"
-	select config ADK_CPU_KNL
-
-config ADK_TARGET_CPU_NEHALEM
-	bool "Nehalem"
-	select ADK_CPU_NEHALEM
-
-config ADK_TARGET_CPU_OPTERON
-	bool "Opteron"
-	select ADK_CPU_OPTERON
-
-config ADK_TARGET_CPU_OPTERON_SSE3
-	bool "Opteron with SSE3"
-	select ADK_CPU_OPTERON_SSE3
-
-config ADK_TARGET_CPU_SANDYBRIDGE
-	bool "Sandybridge"
-	select ADK_CPU_SANDYBRIDGE
-
-config ADK_TARGET_CPU_SILVERMONT
-	bool "Silvermont"
-	select ADK_CPU_SILVERMONT
-
-config ADK_TARGET_CPU_WESTMERE
-	bool "Westmere"
-	select ADK_CPU_WESTMERE
 
 endchoice