X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fppc-vm.lisp;h=87885873a77a7efd9d3125f5642c5dcbe7819fc3;hb=15d6e7c9a2c3234f95dfe278046fa2fee1b0c007;hp=a9297a69bc8c3b5f46f0406c27c7d60460b23b37;hpb=d0552bdb80b50eb2c600de19b89b2d7139c4841c;p=sbcl.git diff --git a/src/code/ppc-vm.lisp b/src/code/ppc-vm.lisp index a9297a6..8788587 100644 --- a/src/code/ppc-vm.lisp +++ b/src/code/ppc-vm.lisp @@ -2,9 +2,6 @@ ;;; (in-package "SB!VM") -(defvar *number-of-signals* 64) -(defvar *bits-per-word* 32) - (define-alien-type os-context-t (struct os-context-t-struct)) @@ -89,6 +86,13 @@ (declare (type (alien (* os-context-t)) context)) (deref (context-register-addr context index))) +(define-alien-routine ("os_context_lr_addr" context-lr-addr) (* unsigned-long) + (context (* os-context-t))) + +(defun context-lr (context) + (declare (type (alien (* os-context-t)) context)) + (int-sap (deref (context-lr-addr context)))) + (defun %set-context-register (context index new) (declare (type (alien (* os-context-t)) context)) (setf (deref (context-register-addr context index)) @@ -115,6 +119,9 @@ ;;; Given a signal context, return the floating point modes word in ;;; the same format as returned by FLOATING-POINT-MODES. +;;; +;;; FIXME: surely this must be accessible somewhere under Darwin? +#!-darwin (define-alien-routine ("os_context_fp_control" context-floating-point-modes) (sb!alien:unsigned 32) (context (* os-context-t)))