X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Falpha%2Fparms.lisp;h=78b7d0e5363659297d24fcb97b3c37cc13b485ab;hb=b83353d9f998e5c0e34604b5593df70c66d2c510;hp=872102deb775dd75752256277e689ca597f4af7d;hpb=8731c1a7c1a585d190151fa881050fb5e14c0616;p=sbcl.git diff --git a/src/compiler/alpha/parms.lisp b/src/compiler/alpha/parms.lisp index 872102d..78b7d0e 100644 --- a/src/compiler/alpha/parms.lisp +++ b/src/compiler/alpha/parms.lisp @@ -11,21 +11,16 @@ (eval-when (:compile-toplevel :load-toplevel :execute) -(def!constant n-word-bits 32 - #!+sb-doc - "Number of bits per word where a word holds one lisp descriptor.") +;;; number of bits per word where a word holds one lisp descriptor +(def!constant n-word-bits 32) -(def!constant n-byte-bits 8 - #!+sb-doc - "Number of bits per byte where a byte is the smallest addressable object.") +;;; the natural width of a machine word (as seen in e.g. register width, +;;; address space) +(def!constant n-machine-word-bits 64) -(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits))) - #!+sb-doc - "Number of bits to shift between word addresses and byte addresses.") - -(def!constant n-word-bytes (/ n-word-bits n-byte-bits) - #!+sb-doc - "Number of bytes in a word.") +;;; number of bits per byte where a byte is the smallest addressable +;;; object +(def!constant n-byte-bits 8) (def!constant float-sign-shift 31) @@ -82,11 +77,11 @@ (def!constant float-overflow-trap-bit (ash 1 2)) ; ro (def!constant float-divide-by-zero-trap-bit (ash 1 1)) ; ro (def!constant float-invalid-trap-bit (ash 1 0)) ; ro -(defconstant-eqx float-traps-byte (byte 6 1) #'equalp) +(defconstant-eqx float-traps-byte (byte 6 1) #'equalp) ;;; exceptions are also read/written in software (by syscalls, no less). ;;; This is kind of dumb, but has to be done -(defconstant-eqx float-sticky-bits (byte 6 17) #'equalp) ; fp_control +(defconstant-eqx float-sticky-bits (byte 6 17) #'equalp) ; fp_control ;;; (We don't actually _have_ "current exceptions" on Alpha; the ;;; hardware only ever sets bits. So, set this the same as accrued @@ -98,7 +93,7 @@ (def!constant float-round-to-negative 1) (def!constant float-round-to-nearest 2) (def!constant float-round-to-positive 3) -(defconstant-eqx float-rounding-mode (byte 2 58) #'equalp) +(defconstant-eqx float-rounding-mode (byte 2 58) #'equalp) ;;; Miscellaneous stuff - I think it's far to say that you deserve ;;; what you get if you ask for fast mode. @@ -116,35 +111,22 @@ #!+linux (progn (def!constant read-only-space-start #x20000000) - (def!constant read-only-space-end #x24000000) - - (def!constant static-space-start #x28000000) - (def!constant static-space-end #x2c000000) - - ;; this is used in PURIFY as part of a sloppy check to see if a pointer - ;; is in dynamic space. Chocolate brownie for the first person to fix it - ;; -dan 20010502 - (def!constant dynamic-space-start #x30000000) - (def!constant dynamic-space-end #x3fff0000) + (def!constant read-only-space-end #x24000000)) - (def!constant dynamic-0-space-start #x30000000) - (def!constant dynamic-0-space-end #x3fff0000) - - (def!constant dynamic-1-space-start #x40000000) - (def!constant dynamic-1-space-end #x4fff0000) +#!+osf1 +(progn + (defconstant read-only-space-start #x10000000) + (defconstant read-only-space-end #x25000000)) - (def!constant control-stack-start #x50000000) - (def!constant control-stack-end #x51000000) - (def!constant binding-stack-start #x70000000) - (def!constant binding-stack-end #x71000000)) +(def!constant static-space-start #x28000000) +(def!constant static-space-end #x2c000000) -#!+osf1 ;as if -(progn - (defparameter read-only-space-start #x10000000) - (defparameter static-space-start #x28000000) - (defparameter dynamic-space-start #x30000000)) +(def!constant dynamic-0-space-start #x30000000) +(def!constant dynamic-0-space-end #x3fff0000) +(def!constant dynamic-1-space-start #x40000000) +(def!constant dynamic-1-space-end #x4fff0000) ;;; FIXME nothing refers to either of these in alpha or x86 cmucl ;;; backend, so they could probably be removed. @@ -161,20 +143,19 @@ ;;;; other miscellaneous constants -(defenum (:suffix -trap :start 8) - halt - pending-interrupt - error - cerror - breakpoint - fun-end-breakpoint - single-step-breakpoint) - -(defenum (:prefix trace-table-) - normal - call-site - fun-prologue - fun-epilogue) +(defenum (:start 8) + halt-trap + pending-interrupt-trap + error-trap + cerror-trap + breakpoint-trap + fun-end-breakpoint-trap + single-step-breakpoint-trap + ;; Stepper actually not implemented on Alpha, but these constants + ;; are still needed to avoid undefined variable warnings during sbcl + ;; build. + single-step-around-trap + single-step-before-trap) ;;;; static symbols @@ -187,33 +168,10 @@ ;;; can be loaded directly out of them by indirecting relative to NIL. ;;; (defparameter *static-symbols* - '(t - - ;; The C startup code must fill these in. - *posix-argv* - ;;lisp::lisp-environment-list - ;;lisp::lisp-command-line-list - sb!impl::*!initial-fdefn-objects* - - ;; Functions that the C code needs to call - maybe-gc - sb!kernel::internal-error - sb!di::handle-breakpoint - sb!di::handle-fun-end-breakpoint - - ;; free Pointers - *read-only-space-free-pointer* - *static-space-free-pointer* - *initial-dynamic-space-free-pointer* - - ;; things needed for non-local exit - *current-catch-block* - *current-unwind-protect-block* - - ;; interrupt handling - *free-interrupt-context-index* - sb!unix::*interrupts-enabled* - sb!unix::*interrupt-pending*)) + (append + *common-static-symbols* + *c-callable-static-symbols* + '())) (defparameter *static-funs* '(length @@ -225,15 +183,17 @@ sb!kernel:two-arg-> sb!kernel:two-arg-= ;; FIXME: Is this - ;; probably need the following as they are defined in - ;; arith.lisp: two-arg-<= two-arg->= two-arg-/= + ;; probably need the following as they are defined in + ;; arith.lisp: two-arg-<= two-arg->= two-arg-/= ;; a comment from old CMU CL or old old CMU CL or ;; the SBCL alpha port or what? Do we need to worry about it, ;; or can we delete it? + sb!kernel:two-arg-/= eql sb!kernel:%negate sb!kernel:two-arg-and sb!kernel:two-arg-ior sb!kernel:two-arg-xor + sb!kernel:two-arg-eqv sb!kernel:two-arg-gcd sb!kernel:two-arg-lcm))