GENCGC on SPARC/Linux
authornyef <nyef@sunblade100.lisphacker.com>
Thu, 11 Oct 2012 18:18:59 +0000 (18:18 +0000)
committerAlastair Bridgewater <nyef@kana.lisphacker.com>
Fri, 19 Oct 2012 18:50:34 +0000 (14:50 -0400)
  * 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
make-config.sh
src/compiler/sparc/parms.lisp
src/runtime/Config.sparc-linux

diff --git a/NEWS b/NEWS
index f5c96c6..6ea7167 100644 (file)
--- 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
index 07b65e3..f804496 100644 (file)
@@ -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
index 48c236c..d3e843a 100644 (file)
@@ -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)
   (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)
index 89840b9..224ee33 100644 (file)
@@ -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