From 2261b17729d7807558fe6442bc635877715e6165 Mon Sep 17 00:00:00 2001 From: "Bernhard C. Schrenk" Date: Mon, 29 Nov 2004 19:04:18 +0000 Subject: [PATCH] Bernhard C. Schrenk: Added x86_64 optimization support for Athlon64 and Intel Nocona in gcc options and kernel config [2004112012523901815] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@4880 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- architecture/x86/config.in | 3 +- architecture/x86/gcc-options | 4 ++ architecture/x86/kernel.conf.sh | 66 +++++++++++++++++++-------------- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/architecture/x86/config.in b/architecture/x86/config.in index a03877c11..9c654ae22 100644 --- a/architecture/x86/config.in +++ b/architecture/x86/config.in @@ -51,7 +51,8 @@ if [ "$ROCKCFG_X86_BITS" = 32 ] ; then else choice ROCKCFG_X86_OPT generic \ generic "No special optimisation" \ - athlon "Optimised for AMD Athlon" + athlon "Optimised for AMD Athlon64" \ + intel "Optimised for Intel EMT64 (Nocona)" fi if [ $ROCKCFG_X86_OPT != generic ] ; then diff --git a/architecture/x86/gcc-options b/architecture/x86/gcc-options index caeff3399..9f5a81cbc 100644 --- a/architecture/x86/gcc-options +++ b/architecture/x86/gcc-options @@ -37,6 +37,10 @@ else case "$ROCKCFG_X86_OPT" in generic) ;; + intel) + var_append GCC2_WRAPPER_INSERT " " "-march=x86_64" + var_append GCC3_WRAPPER_INSERT " " "-march=nocona" + ;; athlon) var_append GCC2_WRAPPER_INSERT " " "-march=x86_64" var_append GCC3_WRAPPER_INSERT " " "-march=k8" diff --git a/architecture/x86/kernel.conf.sh b/architecture/x86/kernel.conf.sh index 6d75e8b66..72194b1ec 100644 --- a/architecture/x86/kernel.conf.sh +++ b/architecture/x86/kernel.conf.sh @@ -8,41 +8,51 @@ CONFIG_X86_GENERIC=y EOT - linux_arch=486 - for x in "i386 386" \ - "i486 486" \ - "via-c3 MCYRIXIII" \ - "via-c3-2 MVIAC3_2" \ - "pentium 586" \ - "pentium-mmx 586MMX" \ - "pentiumpro 686" \ - "pentium2 PENTIUMII" \ - "pentium3 PENTIUMIII" \ - "pentium4 PENTIUM4" \ - "k6 K6" \ - "k6-2 K6" \ - "k6-3 K6" \ - "athlon K7" \ - "athlon-tbird K7" \ - "athlon4 K7" \ - "athlon-xp K7" \ - "athlon-mp K7" - do - set $x - [ "$1" = "$ROCKCFG_X86_OPT" ] && linux_arch=$2 - done + if [ "$ROCKCFG_X86_BITS" = 32 ] ; then + linux_arch="M486" + for x in "i386 M386" \ + "i486 M486" \ + "via-c3 MCYRIXIII" \ + "via-c3-2 MVIAC3_2" \ + "pentium M586" \ + "pentium-mmx M586MMX" \ + "pentiumpro M686" \ + "pentium2 MPENTIUMII" \ + "pentium3 MPENTIUMIII" \ + "pentium4 MPENTIUM4" \ + "k6 MK6" \ + "k6-2 MK6" \ + "k6-3 MK6" \ + "athlon MK7" \ + "athlon-tbird MK7" \ + "athlon4 MK7" \ + "athlon-xp MK7" \ + "athlon-mp MK7" + do + set $x + [ "$1" = "$ROCKCFG_X86_OPT" ] && linux_arch=$2 + done + else + linux_arch="GENERIC_CPU" + for x in "athlon MK8" \ + "intel MPSC" + do + set $x + [ "$1" = "$ROCKCFG_X86_OPT" ] && linux_arch=$2 + done + fi # echo `grep -A 20 'Processor family' \ # /usr/src/linux/arch/i386/config.in | expand | \ # cut -c 57- | cut -f1 -d' ' | tr -d '"'` # - for x in 386 486 586 586TSC 586MMX 686 PENTIUMIII PENTIUM4 \ - K6 K7 K8 ELAN CRUSOE WINCHIPC6 WINCHIP2 WINCHIP3D \ - CYRIXIII VIAC3_2 + for x in M386 M486 M586 M586TSC M586MMX M686 MPENTIUMIII MPENTIUM4 \ + MK6 MK7 MK8 MELAN MCRUSOE MWINCHIPC6 MWINCHIP2 MWINCHIP3D \ + MCYRIXIII MVIAC3_2 MPSC GENERIC_CPU do if [ "$linux_arch" != "$x" ] - then echo "# CONFIG_M$x is not set" - else echo "CONFIG_M$x=y" ; fi + then echo "# CONFIG_$x is not set" + else echo "CONFIG_$x=y" ; fi done echo