[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 09/13] arch/x86: Rename MARCH_* of x86_64 to MARCH_X86_64_*



Add architecture name to the processor macros. This will avoid the
name conflict of different architectures. For instance, both arm64
and x86_64 have "generic" option for select processors. If we don't
add architecture name to the macros. Both of these "generic" option
will generate a macro: MARCH_GENERIC. In this case, the build scripts
can't distinguish between arm64/generic and x86_64/generic

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
 Config.uk                   |  2 +-
 arch/x86/x86_64/Config.uk   | 34 ++++++++++++-------------
 arch/x86/x86_64/Makefile.uk | 60 ++++++++++++++++++++++-----------------------
 3 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/Config.uk b/Config.uk
index a1ced33..5a17f16 100644
--- a/Config.uk
+++ b/Config.uk
@@ -65,7 +65,7 @@ config OPTIMIZE_SIZE
 endchoice
 
 comment "Hint: Specify a CPU type to get most benefits from performance 
optimization"
-       depends on OPTIMIZE_PERF && (MARCH_GENERIC || MARCH_ARM64_GENERIC)
+       depends on OPTIMIZE_PERF && (MARCH_X86_64_GENERIC || 
MARCH_ARM64_GENERIC)
 
 config OPTIMIZE_DEADELIM
        bool "Drop unused functions and data"
diff --git a/arch/x86/x86_64/Config.uk b/arch/x86/x86_64/Config.uk
index ca49eed..b18566b 100644
--- a/arch/x86/x86_64/Config.uk
+++ b/arch/x86/x86_64/Config.uk
@@ -1,88 +1,88 @@
 choice
        prompt "Processor Optimization"
-       default MARCH_GENERIC
+       default MARCH_X86_64_GENERIC
        help
                Optimize the code for selected target processor
                Generic x86_64 does not enable any additional CPU features
                (e.g., SSE, 3DNow!) and produces highly protable code for x86.
 
-config MARCH_NATIVE
+config MARCH_X86_64_NATIVE
        bool "Auto-detect host CPU"
        help
                Optimize compilation to host CPU
                Please note that this option will fail in case of 
cross-compilation
 
-config MARCH_GENERIC
+config MARCH_X86_64_GENERIC
        bool "Generic 64-bit"
        help
                Compile for 64-bit compatible x86 CPUs
 
-config MARCH_NOCONA
+config MARCH_X86_64_NOCONA
        bool "Intel Pentium 4/Xeon (Nocona)"
        help
                Improved version of Intel Pentium 4 CPU with 64-bit extensions, 
MMX, SSE, SSE2 and SSE3 instruction set support.
 
-config MARCH_CORE2
+config MARCH_X86_64_CORE2
        bool "Intel Core 2/Xeon"
        help
                Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 
and SSSE3 instruction set support.
 
-config MARCH_COREI7
+config MARCH_X86_64_COREI7
        bool "Intel Core i7/Xeon"
        help
                Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, 
SSSE3, SSE4.1 and SSE4.2 instruction set support.
 
-config MARCH_COREI7AVX
+config MARCH_X86_64_COREI7AVX
        bool "Intel Core i7/Xeon +AVX"
        help
                Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, 
SSSE3, SSE4.1, SSE4.2, AVX, AES and PCLMUL instruction set support.
 
-config MARCH_COREI7AVXI
+config MARCH_X86_64_COREI7AVXI
        bool "Intel Core/Xeon +AVX +RDRND"
        help
                Intel Core CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, 
SSSE3, SSE4.1, SSE4.2, AVX, AES, PCLMUL, FSGSBASE, RDRND and F16C instruction 
set support.
 
-config MARCH_ATOM
+config MARCH_X86_64_ATOM
        bool "Intel Atom 64-bit"
        help
                Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and 
SSSE3 instruction set support.
 
-config MARCH_K8
+config MARCH_X86_64_K8
        bool "AMD Athlon64/Opteron"
        help
                Processors based on the AMD K8 core with x86-64 instruction set 
support, including the AMD Opteron, Athlon 64, and Athlon 64 FX processors. 
(This supersets MMX, SSE, SSE2, 3DNow!, enhanced 3DNow! and 64-bit instruction 
set extensions.)
 
-config MARCH_K8SSE3
+config MARCH_X86_64_K8SSE3
        bool "AMD Athlon64/Opteron +SSE3"
        help
                Improved versions of AMD K8 cores with SSE3 instruction set 
support.
 
-config MARCH_AMDFAM10
+config MARCH_X86_64_AMDFAM10
        bool "AMD Family 10h cores"
        help
                CPUs based on AMD Family 10h cores with x86-64 instruction set 
support. (This supersets MMX, SSE, SSE2, SSE3, SSE4A, 3DNow!, enhanced 3DNow!, 
ABM and 64-bit instruction set extensions.)
 
-config MARCH_BTVER1
+config MARCH_X86_64_BTVER1
        bool "AMD Family 14h cores"
        help
                CPUs based on AMD Family 14h cores with x86-64 instruction set 
support. (This supersets MMX, SSE, SSE2, SSE3, SSSE3, SSE4A, CX16, ABM and 
64-bit instruction set extensions.)
 
-config MARCH_BDVER1
+config MARCH_X86_64_BDVER1
        bool "AMD Family 15h cores (bdver1)"
        help
                CPUs based on AMD Family 15h cores with x86-64 instruction set 
support. (This supersets FMA4, AVX, XOP, LWP, AES, PCL_MUL, CX16, MMX, SSE, 
SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and 64-bit instruction set 
extensions.)
 
-config MARCH_BDVER2
+config MARCH_X86_64_BDVER2
        bool "AMD Family 15h cores (bdver2)"
        help
                AMD Family 15h core based CPUs with x86-64 instruction set 
support. (This supersets BMI, TBM, F16C, FMA, AVX, XOP, LWP, AES, PCL_MUL, 
CX16, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and 64-bit 
instruction set extensions.)
 
-config MARCH_BDVER3
+config MARCH_X86_64_BDVER3
        bool "AMD Family 15h cores (bdver3)"
        help
                AMD Family 15h core based CPUs with x86-64 instruction set 
support. (This supersets BMI, TBM, F16C, FMA, AVX, XOP, LWP, AES, PCL_MUL, 
CX16, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and 64-bit 
instruction set extensions.
 
-config MARCH_BTVER2
+config MARCH_X86_64_BTVER2
        bool "AMD Family 16h cores"
        help
                CPUs based on AMD Family 16h cores with x86-64 instruction set 
support. This includes MOVBE, F16C, BMI, AVX, PCL_MUL, AES, SSE4.2, SSE4.1, 
CX16, ABM, SSE4A, SSSE3, SSE3, SSE2, SSE, MMX and 64-bit instruction set 
extensions.
diff --git a/arch/x86/x86_64/Makefile.uk b/arch/x86/x86_64/Makefile.uk
index 8c9bfe3..122cb74 100644
--- a/arch/x86/x86_64/Makefile.uk
+++ b/arch/x86/x86_64/Makefile.uk
@@ -5,33 +5,33 @@ CFLAGS   += -m64 -mno-red-zone -fno-reorder-blocks 
-fno-asynchronous-unwind-tabl
 CXXFLAGS += -D__X86_64__
 CXXFLAGS += -m64 -mno-red-zone -fno-reorder-blocks 
-fno-asynchronous-unwind-tables
 
-CFLAGS-$(MARCH_GENERIC)      += -mtune=generic
-CXXFLAGS-$(MARCH_GENERIC)    += -mtune=generic
-CFLAGS-$(MARCH_NOCONA)       += -march=nocona
-CXXFLAGS-$(MARCH_NOCONA)     += -march=nocona
-CFLAGS-$(MARCH_CORE2)        += -march=core2
-CXXFLAGS-$(MARCH_CORE2)      += -march=core2
-CFLAGS-$(MARCH_COREI7)       += -march=corei7
-CXXFLAGS-$(MARCH_COREI7)     += -march=corei7
-CFLAGS-$(MARCH_COREI7AVX)    += -march=corei7-avx
-CXXFLAGS-$(MARCH_COREI7AVX)  += -march=corei7-avx
-CFLAGS-$(MARCH_COREI7AVXI)   += -march=core-avx-i
-CXXFLAGS-$(MARCH_COREI7AVXI) += -march=core-avx-i
-CFLAGS-$(MARCH_ATOM)         += -march=atom
-CXXFLAGS-$(MARCH_ATOM)       += -march=atom
-CFLAGS-$(MARCH_K8)           += -march=k8
-CXXFLAGS-$(MARCH_K8)         += -march=k8
-CFLAGS-$(MARCH_K8SSE3)       += -march=k8-sse3
-CXXFLAGS-$(MARCH_K8SSE3)     += -march=k8-sse3
-CFLAGS-$(MARCH_AMDFAM10)     += -march=amdfam10
-CXXFLAGS-$(MARCH_AMDFAM10)   += -march=amdfam10
-CFLAGS-$(MARCH_BDVER1)       += -march=bdver1
-CXXFLAGS-$(MARCH_BDVER1)     += -march=bdver1
-CFLAGS-$(MARCH_BDVER2)       += -march=bdver2
-CXXFLAGS-$(MARCH_BDVER2)     += -march=bdver2
-CFLAGS-$(MARCH_BDVER3)       += -march=bdver3
-CXXFLAGS-$(MARCH_BDVER3)     += -march=bdver3
-CFLAGS-$(MARCH_BTVER1)       += -march=btver1
-CXXFLAGS-$(MARCH_BTVER1)     += -march=btver1
-CFLAGS-$(MARCH_BTVER2)       += -march=btver2
-CXXFLAGS-$(MARCH_BTVER2)     += -march=btver2
+CFLAGS-$(MARCH_X86_64_GENERIC)      += -mtune=generic
+CXXFLAGS-$(MARCH_X86_64_GENERIC)    += -mtune=generic
+CFLAGS-$(MARCH_X86_64_NOCONA)       += -march=nocona
+CXXFLAGS-$(MARCH_X86_64_NOCONA)     += -march=nocona
+CFLAGS-$(MARCH_X86_64_CORE2)        += -march=core2
+CXXFLAGS-$(MARCH_X86_64_CORE2)      += -march=core2
+CFLAGS-$(MARCH_X86_64_COREI7)       += -march=corei7
+CXXFLAGS-$(MARCH_X86_64_COREI7)     += -march=corei7
+CFLAGS-$(MARCH_X86_64_COREI7AVX)    += -march=corei7-avx
+CXXFLAGS-$(MARCH_X86_64_COREI7AVX)  += -march=corei7-avx
+CFLAGS-$(MARCH_X86_64_COREI7AVXI)   += -march=core-avx-i
+CXXFLAGS-$(MARCH_X86_64_COREI7AVXI) += -march=core-avx-i
+CFLAGS-$(MARCH_X86_64_ATOM)         += -march=atom
+CXXFLAGS-$(MARCH_X86_64_ATOM)       += -march=atom
+CFLAGS-$(MARCH_X86_64_K8)           += -march=k8
+CXXFLAGS-$(MARCH_X86_64_K8)         += -march=k8
+CFLAGS-$(MARCH_X86_64_K8SSE3)       += -march=k8-sse3
+CXXFLAGS-$(MARCH_X86_64_K8SSE3)     += -march=k8-sse3
+CFLAGS-$(MARCH_X86_64_AMDFAM10)     += -march=amdfam10
+CXXFLAGS-$(MARCH_X86_64_AMDFAM10)   += -march=amdfam10
+CFLAGS-$(MARCH_X86_64_BDVER1)       += -march=bdver1
+CXXFLAGS-$(MARCH_X86_64_BDVER1)     += -march=bdver1
+CFLAGS-$(MARCH_X86_64_BDVER2)       += -march=bdver2
+CXXFLAGS-$(MARCH_X86_64_BDVER2)     += -march=bdver2
+CFLAGS-$(MARCH_X86_64_BDVER3)       += -march=bdver3
+CXXFLAGS-$(MARCH_X86_64_BDVER3)     += -march=bdver3
+CFLAGS-$(MARCH_X86_64_BTVER1)       += -march=btver1
+CXXFLAGS-$(MARCH_X86_64_BTVER1)     += -march=btver1
+CFLAGS-$(MARCH_X86_64_BTVER2)       += -march=btver2
+CXXFLAGS-$(MARCH_X86_64_BTVER2)     += -march=btver2
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.