-;;; -*- Package: ALPHA -*-
-;;;
+;;;; Alpha-specific implementation stuff
-(in-package "SB!VM")
-
-(export '(#||# fixup-code-object internal-error-arguments
- context-program-counter context-register
- context-float-register context-floating-point-modes
- extern-alien-name sanctify-for-execution))
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
+(in-package "SB!VM")
\f
(defvar *number-of-signals* 64)
(defvar *bits-per-word* 64)
-;;; see x86-vm.lisp
+;;; See x86-vm.lisp for a description of this.
(def-alien-type os-context-t (struct os-context-t-struct))
-
\f
;;;; MACHINE-TYPE and MACHINE-VERSION
(defun machine-type ()
- "Returns a string describing the type of the local machine."
+ "Return a string describing the type of the local machine."
"Alpha")
(defun machine-version ()
- "Returns a string describing the version of the local machine."
+ "Return a string describing the version of the local machine."
"Alpha")
-
-
\f
-;;; FIXUP-CODE-OBJECT -- Interface
-;;;
(defun fixup-code-object (code offset value kind)
(unless (zerop (rem offset word-bytes))
(error "Unaligned instruction? offset=#x~X." offset))
(:lda
(setf (sap-ref-8 sap offset) (ldb (byte 8 0) value))
(setf (sap-ref-8 sap (1+ offset)) (ldb (byte 8 8) value)))))))
-
-
\f
-
-;;; "Sigcontext" access functions, cut & pasted from x86-vm.lisp then
-;;; hacked for types. The alpha has 64-bit registers, so these
-;;; potentially return 64 bit numbers (which means bignums ... ew)
-;;; We think that 99 times of 100 (i.e. unless something is badly wrong)
-;;; we'll get answers that fit in 32 bits anyway.
-
-;;; Which probably won't help us stop passing bignums around as the
-;;; compiler can't prove they fit in 32 bits. But maybe the stuff it
-;;; does on x86 to unbox 32-bit constants happens magically for 64-bit
-;;; constants here. Just maybe.
-
-;;; see also x86-vm for commentary on signed vs unsigned.
+;;;; "Sigcontext" access functions, cut & pasted from x86-vm.lisp then
+;;;; hacked for types.
+;;;;
+;;;; KLUDGE: The alpha has 64-bit registers, so these potentially
+;;;; return 64 bit numbers (which means bignums ... ew) We think that
+;;;; 99 times of 100 (i.e. unless something is badly wrong) we'll get
+;;;; answers that fit in 32 bits anyway. Which probably won't help us
+;;;; stop passing bignums around as the compiler can't prove they fit
+;;;; in 32 bits. But maybe the stuff it does on x86 to unbox 32-bit
+;;;; constants happens magically for 64-bit constants here. Just
+;;;; maybe. -- Dan Barlow, ca. 2001-05-05
+;;;;
+;;;; See also x86-vm for commentary on signed vs unsigned.
(def-alien-routine ("os_context_pc_addr" context-pc-addr) (* unsigned-long)
(context (* os-context-t)))
(setf (deref (context-register-addr context index))
new))
-;;; Like CONTEXT-REGISTER, but returns the value of a float register.
-;;; FORMAT is the type of float to return.
+;;; This is like CONTEXT-REGISTER, but returns the value of a float
+;;; register. FORMAT is the type of float to return.
-;;; whether COERCE actually knows how to make a float out of a long
-;;; is another question. This stuff still needs testing
+;;; FIXME: Whether COERCE actually knows how to make a float out of a
+;;; long is another question. This stuff still needs testing.
(def-alien-routine ("os_context_fpregister_addr" context-float-register-addr)
(* long)
(context (* os-context-t))
(setf (deref (context-float-register-addr context index))
(coerce new format)))
-
;;; Given a signal context, return the floating point modes word in
;;; the same format as returned by FLOATING-POINT-MODES.
(defun context-floating-point-modes (context)
;;; (pc)
;;; (example from undefined_tramp: "(gdb) x/40ub 0x10148" for yourself
;;; to replicate)
-
(defun internal-error-arguments (context)
(declare (type (alien (* os-context-t)) context))
(sb!int::/show0 "entering INTERNAL-ERROR-ARGUMENTS")
(return))
(sc-offsets (sb!c::read-var-integer vector index)))
(values error-number (sc-offsets)))))))
-
\f
-;;; EXTERN-ALIEN-NAME -- interface.
-;;;
-;;; The loader uses this to convert alien names to the form they occure in
-;;; the symbol table (for example, prepending an underscore). On the Alpha
-;;; we don't do anything.
-;;;
+;;; The loader uses this to convert alien names to the form they
+;;; occure in the symbol table (for example, prepending an
+;;; underscore).
(defun extern-alien-name (name)
(declare (type simple-base-string name))
+ ;; On the Alpha we don't do anything.
name)
-
-
\f
-;;; SANCTIFY-FOR-EXECUTION -- Interface.
-;;;
-;;; Do whatever is necessary to make the given code component executable.
-;;;
-
-;;; XXX do we really not have to flush caches or something here? I need
-;;; an architecture manual
+;;;; Do whatever is necessary to make the given code component
+;;;; executable.
+;;;;
+;;;; XXX do we really not have to flush caches or something here? I
+;;;; need an architecture manual
(defun sanctify-for-execution (component)
(declare (ignore component))
nil)