(:bits-63-48
(let* ((value (if (logbitp 15 value) (+ value (ash 1 16)) value))
(value (if (logbitp 31 value) (+ value (ash 1 32)) value))
(:bits-63-48
(let* ((value (if (logbitp 15 value) (+ value (ash 1 16)) value))
(value (if (logbitp 31 value) (+ value (ash 1 32)) value))
(setf (sap-ref-8 sap offset) (ldb (byte 8 0) value))
(setf (sap-ref-8 sap (1+ offset)) (ldb (byte 8 8) value)))))))
\f
(setf (sap-ref-8 sap offset) (ldb (byte 8 0) value))
(setf (sap-ref-8 sap (1+ offset)) (ldb (byte 8 8) value)))))))
\f
(context (* os-context-t)))
(defun context-pc (context)
(declare (type (alien (* os-context-t)) context))
(int-sap (deref (context-pc-addr context))))
(context (* os-context-t)))
(defun context-pc (context)
(declare (type (alien (* os-context-t)) context))
(int-sap (deref (context-pc-addr context))))
;;; FIXME: 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.
;;; Given a (POSIX) signal context, extract the internal error
;;; arguments from the instruction stream. This is e.g.
;;; Given a (POSIX) signal context, extract the internal error
;;; arguments from the instruction stream. This is e.g.
(declare (type (alien (* os-context-t)) context))
(let ((pc (context-pc context)))
(declare (type system-area-pointer pc))
(declare (type (alien (* os-context-t)) context))
(let ((pc (context-pc context)))
(declare (type system-area-pointer pc))