fix unthreaded non-x86oid builds
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 5 Dec 2011 18:33:08 +0000 (20:33 +0200)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 5 Dec 2011 19:48:50 +0000 (21:48 +0200)
 Better representation selection for constants broke things, since it assumed
 that IMMEDIATE is the only immediate boxed SC -- which is true only on
 x86oids: elsewhere there is also NULL and ZERO.

 Add new VM support routine: BOXED-IMMEDIATE-SC-P.

package-data-list.lisp-expr
src/compiler/alpha/vm.lisp
src/compiler/backend.lisp
src/compiler/hppa/vm.lisp
src/compiler/mips/vm.lisp
src/compiler/ppc/vm.lisp
src/compiler/sparc/vm.lisp
src/compiler/tn.lisp
src/compiler/x86-64/vm.lisp
src/compiler/x86/vm.lisp

index 79759bf..d712dd9 100644 (file)
@@ -369,6 +369,7 @@ of SBCL which maintained the CMU-CL-style split into two packages.)"
                "LARGE-ALLOC"
                "%SET-SIMPLE-FUN-SELF"
                "VM-SUPPORT-ROUTINES-IMMEDIATE-CONSTANT-SC"
+               "VM-SUPPORT-ROUTINES-BOXED-IMMEDIATE-SC-P"
                "VM-SUPPORT-ROUTINES-LOCATION-PRINT-NAME"
                "VM-SUPPORT-ROUTINES-PRIMITIVE-TYPE-OF"
                "VM-SUPPORT-ROUTINES-PRIMITIVE-TYPE"
index d16e08a..77b6319 100644 (file)
      (if (eql value 0d0)
          (sc-number-or-lose 'fp-double-zero )
          nil))))
+
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (or (eql sc (sc-number-or-lose 'zero))
+      (eql sc (sc-number-or-lose 'null))
+      (eql sc (sc-number-or-lose 'immediate))))
 \f
 ;;;; function call parameters
 
index 906e837..4dbb9cb 100644 (file)
     immediate-constant-sc
     location-print-name
     combination-implementation-style
+    boxed-immediate-sc-p
 
     ;; from primtype.lisp
     primitive-type-of
index 740ffca..d0f9eab 100644 (file)
          (sc-number-or-lose 'fp-double-zero)
          nil))))
 
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (or (eql sc (sc-number-or-lose 'zero))
+      (eql sc (sc-number-or-lose 'null))
+      (eql sc (sc-number-or-lose 'immediate))))
 \f
 ;;;; Function Call Parameters
 
index a32c6d7..9602f2f 100644 (file)
     (character
      (sc-number-or-lose 'immediate))))
 
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (or (eql sc (sc-number-or-lose 'zero))
+      (eql sc (sc-number-or-lose 'null))
+      (eql sc (sc-number-or-lose 'immediate))))
 \f
 ;;;; Function Call Parameters
 
index 9de32a9..2782b4d 100644 (file)
          (sc-number-or-lose 'immediate)
          nil))))
 
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (or (eql sc (sc-number-or-lose 'zero))
+      (eql sc (sc-number-or-lose 'null))
+      (eql sc (sc-number-or-lose 'immediate))))
+
 ;;; A predicate to see if a character can be used as an inline
 ;;; constant (the immediate field in the instruction used is sixteen
 ;;; bits wide, which is not the same as any defined subtype of
index 8a85603..95d29f2 100644 (file)
      (if (static-symbol-p value)
          (sc-number-or-lose 'immediate)
          nil))))
+
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (or (eql sc (sc-number-or-lose 'zero))
+      (eql sc (sc-number-or-lose 'null))
+      (eql sc (sc-number-or-lose 'immediate))))
 \f
 ;;;; function call parameters
 
index cd2525a..1f72696 100644 (file)
   (let* ((immed (immediate-constant-sc (constant-value constant)))
          (use-immed-p (and immed
                            (or (not boxedp)
-                               (eql immed (sc-number-or-lose 'sb!vm::immediate))))))
+                               (boxed-immediate-sc-p immed)))))
     (cond
       ;; CONSTANT-TN uses two caches, one for boxed and one for unboxed uses.
       ;;
index 63af4f9..a19f45c 100644 (file)
             'fp-complex-double-zero
             'fp-complex-double-immediate)))))
 
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (eql sc (sc-number-or-lose 'immediate)))
 \f
 ;;;; miscellaneous function call parameters
 
index ae0b111..b7320e8 100644 (file)
                  (eql value (log 2l0 2.718281828459045235360287471352662L0)))
          (sc-number-or-lose 'fp-constant)))))
 
+(!def-vm-support-routine boxed-immediate-sc-p (sc)
+  (eql sc (sc-number-or-lose 'immediate)))
+
 ;; For an immediate TN, return its value encoded for use as a literal.
 ;; For any other TN, return the TN.  Only works for FIXNUMs,
 ;; STATIC-SYMBOLs, and CHARACTERS (FLOATs and SAPs are handled