0.7.11.10:
[sbcl.git] / src / code / ppc-vm.lisp
index ee2eaa3..801192d 100644 (file)
@@ -20,8 +20,8 @@
 
 
 \f
-;;; FIXUP-CODE-OBJECT -- Interface
-;;;
+;;;; FIXUP-CODE-OBJECT
+
 (defun fixup-code-object (code offset fixup kind)
   (declare (type index offset))
   (unless (zerop (rem offset n-word-bytes))
 
 ;;; 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)
-  ;; FIXME: As of sbcl-0.6.7 and the big rewrite of signal handling
-  ;; for POSIXness and (at the Lisp level) opaque signal contexts,
-  ;; this is needs to be rewritten as an alien function.
-  (warn "stub CONTEXT-FLOATING-POINT-MODES")
-  0)
-
+(define-alien-routine ("os_context_fp_control" context-floating-point-modes)
+    (sb!alien:unsigned 32)
+  (context (* os-context-t)))
 
 \f
 ;;;; INTERNAL-ERROR-ARGS.
                                     sb!vm:vector-data-offset)
                           (* length sb!vm:n-byte-bits))
     (let* ((index 0)
-          (error-number (sb!c::read-var-integer vector index)))
+          (error-number (sb!c:read-var-integer vector index)))
       (collect ((sc-offsets))
               (loop
                (when (>= index length)
                  (return))
-               (sc-offsets (sb!c::read-var-integer vector index)))
+               (sc-offsets (sb!c:read-var-integer vector index)))
               (values error-number (sc-offsets))))))
 
 
-\f
-;;; The loader uses this to convert alien names to the form they
-;;; occur in the symbol table.  This is ELF, so do nothing
-
-(defun extern-alien-name (name)
-  (declare (type simple-base-string name))
-  name)
-
-
-\f
-;;; SANCTIFY-FOR-EXECUTION -- Interface.
-;;;
-;;; Do whatever is necessary to make the given code component executable.
-;;; On the 601, we have less to do than on some other PowerPC chips.
-;;; This should what needs to be done in the general case.
-;;; 
-(defun sanctify-for-execution (component)
-  (without-gcing
-    (alien-funcall (extern-alien "ppc_flush_icache"
-                                (function void
-                                          system-area-pointer
-                                          unsigned-long))
-                  (code-instructions component)
-                  (* (code-header-ref component code-code-size-slot)
-                     n-word-bytes)))
-  nil)