(format t
"debug: both still valid ~S ~S ~S ~S~%"
lisp-ocfp lisp-ra c-ocfp c-ra))
- #+freebsd
+ #!+freebsd
(if (sap> lisp-ocfp c-ocfp)
(values lisp-ra lisp-ocfp)
(values c-ra c-ocfp))
- #-freebsd
+ #!-freebsd
(values lisp-ra lisp-ocfp))
(lisp-path-fp
;; The lisp convention is looking good.
(sb!vm:context-float-register
escaped (sb!c:sc-offset-offset sc-offset) 'double-float)
(sb!vm:context-float-register
- escaped (+ (sb!c:sc-offset-offset sc-offset) #!+sparc 2 #-sparc 1)
+ escaped (+ (sb!c:sc-offset-offset sc-offset) #!+sparc 2 #!-sparc 1)
'double-float))
:invalid-value-for-unescaped-register-storage))
#!+long-float
(do ((frame frame (frame-down frame)))
((not frame) nil)
(when (and (compiled-frame-p frame)
- (#-x86 eq #+x86 sap=
+ (#!-x86 eq #!+x86 sap=
lra
(get-context-value frame lra-save-offset lra-sc-offset)))
(return t)))))
;;; Unlike CMU CL, we don't export this variable. (There's no need to,
;;; since our BYTES-CONSED-BETWEEN-GCS function is SETFable.)
(defvar *bytes-consed-between-gcs*
- #+gencgc (* 4 (expt 10 6))
+ #!+gencgc (* 4 (expt 10 6))
;; Stop-and-copy GC is really really slow when used too often. CSR
;; reported that even on his old 64 Mb SPARC, 20 Mb is much faster
;; than 4 Mb when rebuilding SBCL ca. 0.7.1. For modern machines
;; with >> 128 Mb memory, the optimum could be significantly more
;; than this, but at least 20 Mb should be better than 4 Mb.
- #-gencgc (* 20 (expt 10 6)))
+ #!-gencgc (* 20 (expt 10 6)))
(declaim (type index *bytes-consed-between-gcs*))
;;;; GC hooks
(unsigned-reg) unsigned-num sb!bignum::%bignum-ref)
(define-full-setter bignum-set * bignum-digits-offset other-pointer-lowtag
- (unsigned-reg) unsigned-num sb!bignum::%bignum-set #+gengc nil)
+ (unsigned-reg) unsigned-num sb!bignum::%bignum-set #!+gengc nil)
(define-vop (digit-0-or-plus)
(:translate sb!bignum::%digit-0-or-plusp)
(define-full-setter %set-array-dimension *
array-dimensions-offset other-pointer-lowtag
- (any-reg) positive-fixnum sb!impl::%set-array-dimension #+gengc nil)
+ (any-reg) positive-fixnum sb!impl::%set-array-dimension #!+gengc nil)
(defknown sb!impl::%array-rank (t) index (flushable))
(define-vop (set-slot)
(:args (object :scs (descriptor-reg))
(value :scs (descriptor-reg any-reg null zero)))
- (:info name offset lowtag #+gengc remember)
+ (:info name offset lowtag #!+gengc remember)
(:ignore name)
(:results)
(:generator 1
- #+gengc
+ #!+gengc
(if remember
(storew-and-remember-slot value object offset lowtag)
(storew value object offset lowtag))
- #-gengc
+ #!-gengc
(storew value object offset lowtag)))
\f
;;;; symbol hacking VOPs
(inst addq bsp-tn (* 2 n-word-bytes) bsp-tn)
(storew temp bsp-tn (- binding-value-slot binding-size))
(storew symbol bsp-tn (- binding-symbol-slot binding-size))
- (#+gengc storew-and-remember-slot #-gengc storew
+ (#!+gengc storew-and-remember-slot #!-gengc storew
val symbol symbol-value-slot other-pointer-lowtag)))
(:generator 0
(loadw symbol bsp-tn (- binding-symbol-slot binding-size))
(loadw value bsp-tn (- binding-value-slot binding-size))
- (#+gengc storew-and-remember-slot #-gengc storew
+ (#!+gengc storew-and-remember-slot #!-gengc storew
value symbol symbol-value-slot other-pointer-lowtag)
(storew zero-tn bsp-tn (- binding-symbol-slot binding-size))
(inst subq bsp-tn (* 2 n-word-bytes) bsp-tn)))
(loadw symbol bsp-tn (- binding-symbol-slot binding-size))
(loadw value bsp-tn (- binding-value-slot binding-size))
(inst beq symbol skip)
- (#+gengc storew-and-remember-slot #-gengc storew
+ (#!+gengc storew-and-remember-slot #!-gengc storew
value symbol symbol-value-slot other-pointer-lowtag)
(storew zero-tn bsp-tn (- binding-symbol-slot binding-size))
\f
;;;; mutator accessing
-#+gengc
+#!+gengc
(progn
(eval-when (:compile-toplevel :load-toplevel :execute)
'((inst mskll value 4 value)))))))
(defmacro define-full-setter (name type offset lowtag scs el-type
- &optional translate #+gengc (remember t))
+ &optional translate #!+gengc (remember t))
`(progn
(define-vop (,name)
,@(when translate
;;; XXX
#|
(def-type-vops scavenger-hook-p nil nil nil
- #-gengc 0 #+gengc scavenger-hook-type)
+ #!-gengc 0 #!+gengc scavenger-hook-type)
|#
(def-type-vops code-component-p nil nil nil
code-header-widetag)
(def-type-vops lra-p nil nil nil
- #-gengc return-pc-header-widetag #+gengc 0)
+ #!-gengc return-pc-header-widetag #!+gengc 0)
(def-type-vops fdefn-p nil nil nil
fdefn-widetag)
i)))))
(terpri)
+ ;; FIXME: The SPARC has a PSEUDO-ATOMIC-TRAP that differs between
+ ;; platforms. If we export this from the SB!VM package, it gets
+ ;; written out as #define trap_PseudoAtomic, which is confusing as
+ ;; the runtime treats trap_ as the prefix for illegal instruction
+ ;; type things. We therefore don't export it, but instead do
+ (when (boundp 'sb!vm::pseudo-atomic-trap)
+ (format t "#define PSEUDO_ATOMIC_TRAP ~D /* 0x~:*~X */~%" sb!vm::pseudo-atomic-trap)
+ (terpri))
+ ;; possibly this is another candidate for a rename (to
+ ;; pseudo-atomic-trap-number or pseudo-atomic-magic-constant
+ ;; [possibly applicable to other platforms])
+
;; writing primitive object layouts
(let ((structs (sort (copy-list sb!vm:*primitive-objects*) #'string<
:key (lambda (obj)
NM = nm -p
ASSEM_SRC = sparc-assem.S
-ARCH_SRC = sparc-arch.c undefineds.c
-#ARCH_SRC = sparc-arch.c ldso-stubs.S
+#ARCH_SRC = sparc-arch.c undefineds.c
+ARCH_SRC = sparc-arch.c ldso-stubs.S
OS_SRC = linux-os.c sparc-linux-os.c os-common.c
-LINKFLAGS+=-static
-#LINKFLAGS+=-rdynamic
+#LINKFLAGS+=-static
+LINKFLAGS+=-rdynamic
OS_LIBS= -ldl
GC_SRC= gc.c
.L ## fct ## e1: ; \
.size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;
+#elif defined sparc
+
+ /* This is an attempt to follow DB's hint of sbcl-devel
+ * 2001-09-18. -- CSR */
+#define LDSO_STUBIFY(fct) \
+.globl ldso_stub__ ## fct ; \
+ .type ldso_stub__ ## fct,@function ; \
+ldso_stub__ ## fct: ; \
+ sethi %hi(fct),%g1 ; \
+ jmpl %g1+%lo(fct),%g0 ; \
+ nop /* delay slot*/ ; \
+.L ## fct ## e1: ; \
+ .size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;
+
#else
#error unsupported CPU architecture
#endif
* that has more than one digit initially -- CSR, 2002-02-12 */
minor_version = atoi(name.release+2);
if (minor_version < 4) {
- fprintf(stderr,"linux minor version=%d;\n enabling workarounds for SPARC kernel bugs in signal handling.\n", minor_version);
+ FSHOW((stderr,"linux minor version=%d;\n enabling workarounds for SPARC kernel bugs in signal handling.\n", minor_version));
early_kernel = 1;
}
#endif
badinst = *pc;
result = 0;
- /* Check to see if the current instruction is a trap #x40 */
- /* FIXME: As written, this will not work when someone comes to port
- this to Solaris. We have chosen trap 0x40 on SPARC Linux because
- trap 0x10, used in CMUCL/Solaris, generates a sigtrap rather than
- a sigill. This number should not be hardcoded, but should come,
- if possible, from src/compiler/target/parms.lisp via sbcl.h --
- CSR */
+ /* Check to see if the current instruction is a pseudo-atomic-trap */
if (((badinst >> 30) == 2) && (((badinst >> 19) & 0x3f) == 0x3a)
- && (((badinst >> 13) & 1) == 1) && ((badinst & 0x7f) == 0x40))
+ && (((badinst >> 13) & 1) == 1) && ((badinst & 0x7f) == PSEUDO_ATOMIC_TRAP))
{
unsigned int previnst;
previnst = pc[-1];
}
else
{
- /* FIXME: in the light of the comment above, this fprintf is
- bogus. CSR */
- fprintf(stderr, "Oops! Got a trap 16 without a preceeding andcc!\n");
+ fprintf(stderr, "Oops! Got a PSEUDO-ATOMIC-TRAP without a preceeding andcc!\n");
}
}
return result;
/* FIXME */
#define FRAMESIZE 0x48
#define ST_FLUSH_WINDOWS 0x03
-#define PSEUDO_ATOMIC_TRAP_NUMBER 64
.seg "text"
.global call_into_lisp
FUNCDEF(call_into_lisp)
sub reg_ALLOC, 4, reg_ALLOC
andcc reg_ALLOC, 3, reg_ZERO
- /* OK, this is ridiculous. We badly urgently need this to be
- centralized, because that's now _three_ places where this
- number is used. CSR, 2002-02-09 */
-
- tne 64
+ tne PSEUDO_ATOMIC_TRAP
/* Pass in the args. */
sll %i2, 2, reg_NARGS
mov %i1, reg_CFP
/* Were we interrupted? */
sub reg_ALLOC, 4, reg_ALLOC
andcc reg_ALLOC, 3, reg_ZERO
- tne PSEUDO_ATOMIC_TRAP_NUMBER
+ tne PSEUDO_ATOMIC_TRAP
/* Back to C we go. */
ld [%sp+FRAMESIZE-4], %i7
/* Were we interrupted? */
sub reg_ALLOC, 4, reg_ALLOC
andcc reg_ALLOC, 3, reg_ZERO
- tne PSEUDO_ATOMIC_TRAP_NUMBER
+ tne PSEUDO_ATOMIC_TRAP
/* Into C we go. */
call reg_CFUNC
/* No longer atomic. */
sub reg_ALLOC, 4, reg_ALLOC
andcc reg_ALLOC, 3, reg_ZERO
- tne PSEUDO_ATOMIC_TRAP_NUMBER
+ tne PSEUDO_ATOMIC_TRAP
/* Reset the lisp stack. */
/* Note: OCFP is in one of the locals, it gets preserved across C. */
;;; for internal versions, especially for internal versions off the
;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.1.45"
+"0.7.1.46"