From ad096f09fb631331f584121bfe5ee3bfc7f1f951 Mon Sep 17 00:00:00 2001 From: nyef Date: Thu, 11 Oct 2012 18:18:59 +0000 Subject: [PATCH] GENCGC on SPARC/Linux * Tweak make-config.sh to automatically select GENCGC, and to update the fallback message for those poor bsd-using folks. * Copied the gencgc memory map from the SunOS version to use for Linux (the cheneygc maps were identical, we may as well keep the parallelism). * Also tweaked the linker flags to match. Not because it was required to build, but because I don't know why they were changed for SunOS, and in the absence of such knowledge I'd rather keep things more or less parallel. --- NEWS | 4 ++-- make-config.sh | 10 +++++----- src/compiler/sparc/parms.lisp | 16 +++++++++++++++- src/runtime/Config.sparc-linux | 2 +- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index f5c96c6..6ea7167 100644 --- a/NEWS +++ b/NEWS @@ -3,8 +3,8 @@ changes relative to sbcl-1.1.0: * enhancement: WITH-COMPILATION-UNIT no longer grabs the world-lock. (COMPILE and COMPILE-FILE still do.) * optimization: the SPARC backend now supports the precise generational - (GENCGC) garbage collection. Enabled by default on Solaris/SPARC. - Thanks to Raymond Toy (via CMUCL). + (GENCGC) garbage collection. Enabled by default on Solaris/SPARC and + Linux/SPARC. Thanks to Raymond Toy (via CMUCL). * enhancement: add experimental support for the SB-THREAD feature and the timer facility on Windows. Thanks to Dmitry Kalyanov and Anton Kovalenko. Threads are enabled by default, and this version of SBCL is considered diff --git a/make-config.sh b/make-config.sh index 07b65e3..f804496 100644 --- a/make-config.sh +++ b/make-config.sh @@ -624,14 +624,14 @@ elif [ "$sbcl_arch" = "sparc" ]; then # FUNCDEF macro for assembler. No harm in running this on sparc-linux # as well. sh tools-for-build/sparc-funcdef.sh > src/runtime/sparc-funcdef.h - if [ "$sbcl_os" = "sunos" ]; then + if [ "$sbcl_os" = "sunos" ] || [ "$sbcl_os" = "linux" ]; then printf ' :gencgc' >> $ltf else echo '***' - echo '*** You are running SPARC on non-SunOS. Since GENCGC is' - echo '*** untested on this combination, make-config.sh is falling' - echo '*** back to CHENEYGC. Please consider adjusting parms.lisp' - echo '*** to build with GENCGC instead.' + echo '*** You are running SPARC on non-SunOS, non-Linux. Since' + echo '*** GENCGC is untested on this combination, make-config.sh' + echo '*** is falling back to CHENEYGC. Please consider adjusting' + echo '*** parms.lisp to build with GENCGC instead.' echo '***' printf ' :cheneygc' >> $ltf fi diff --git a/src/compiler/sparc/parms.lisp b/src/compiler/sparc/parms.lisp index 48c236c..d3e843a 100644 --- a/src/compiler/sparc/parms.lisp +++ b/src/compiler/sparc/parms.lisp @@ -96,7 +96,7 @@ ;;;; Description of the target address space. ;;; Where to put the different spaces. Must match the C code! -#!+linux +#!+(and linux cheneygc) (progn (def!constant linkage-table-space-start #x0f800000) (def!constant linkage-table-space-end #x10000000) @@ -113,6 +113,20 @@ (def!constant dynamic-1-space-start #x40000000) (def!constant dynamic-1-space-end #x48000000)) +#!+(and linux gencgc) ; sensibly small read-only and static spaces +(progn + (def!constant linkage-table-space-start #x0f800000) + (def!constant linkage-table-space-end #x10000000) + + (def!constant read-only-space-start #x11000000) + (def!constant read-only-space-end #x110ff000) + + (def!constant static-space-start #x11100000) + (def!constant static-space-end #x111ff000) + + (def!constant dynamic-space-start #x30000000) + (def!constant dynamic-space-end (!configure-dynamic-space-end))) + #!+(and sunos cheneygc) ; might as well start by trying the same numbers (progn (def!constant linkage-table-space-start #x0f800000) diff --git a/src/runtime/Config.sparc-linux b/src/runtime/Config.sparc-linux index 89840b9..224ee33 100644 --- a/src/runtime/Config.sparc-linux +++ b/src/runtime/Config.sparc-linux @@ -9,7 +9,7 @@ # provided with absolutely no warranty. See the COPYING and CREDITS # files for more information. -ASFLAGS = -g -Wall +ASFLAGS = -g -Wall -Wa,-xarch=v8plus LINKFLAGS += -v -rdynamic NM = ./linux-nm -- 1.7.10.4