X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fmips-vm.lisp;h=4b077a0feff4ef4991eee87c01b1b9d030e07661;hb=a160917364f85b38dc0826a5e3dcef87e3c4c62c;hp=987dc6b02385ae6bec7986afeaf035f2c2d2948c;hpb=2ffb42cdf6d95801c24460084e8b486c71b767c2;p=sbcl.git diff --git a/src/code/mips-vm.lisp b/src/code/mips-vm.lisp index 987dc6b..4b077a0 100644 --- a/src/code/mips-vm.lisp +++ b/src/code/mips-vm.lisp @@ -26,8 +26,7 @@ (unless (zerop (rem offset n-word-bytes)) (error "Unaligned instruction? offset=#x~X." offset)) (sb!sys:without-gcing - (let ((sap (truly-the system-area-pointer - (%primitive sb!c::code-instructions code)))) + (let ((sap (%primitive sb!c::code-instructions code))) (ecase kind (:jump (aver (zerop (ash value -28))) @@ -79,8 +78,8 @@ ;;; long is another question. This stuff still needs testing. (define-alien-routine ("os_context_fpregister_addr" context-float-register-addr) (* os-context-register-t) - (context (* os-context-t)) - (index int)) + (context (* os-context-t) :in) + (index int :in)) (defun context-float-register (context index format) (declare (type (alien (* os-context-t)) context)) @@ -94,11 +93,19 @@ (declare (type (alien (* os-context-register-t)) addr)) (setf (deref addr) (coerce new format)))) +(define-alien-routine + ("arch_get_fp_control" floating-point-modes) unsigned-int) + +(define-alien-routine + ("arch_set_fp_control" %floating-point-modes-setter) void (fp unsigned-int :in)) + +(defun (setf floating-point-modes) (val) (%floating-point-modes-setter val)) + ;;; Given a signal context, return the floating point modes word in ;;; the same format as returned by FLOATING-POINT-MODES. (define-alien-routine ("os_context_fp_control" context-floating-point-modes) unsigned-int - (context (* os-context-t))) + (context (* os-context-t) :in)) ;;;; Internal-error-arguments.