Skip to content
Snippets Groups Projects
Commit edaea05f authored by ram's avatar ram
Browse files

Implemented floating-point-modes and set-floating-point-modes.

parent 97403c45
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC). ;;; Scott Fahlman (FAHLMAN@CMUC).
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/float.lisp,v 1.2 1990/12/01 22:34:45 wlott Exp $ ;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/float.lisp,v 1.3 1990/12/06 17:35:27 ram Exp $
;;; ;;;
;;; This file contains floating point support for the MIPS. ;;; This file contains floating point support for the MIPS.
;;; ;;;
...@@ -500,9 +500,7 @@ ...@@ -500,9 +500,7 @@
;;;; Float mode hackery: ;;;; Float mode hackery:
#| (deftype float-modes () '(unsigned-byte 32))
(deftype float-modes () '(unsigned-byte 24))
(defknown floating-point-modes () float-modes (flushable)) (defknown floating-point-modes () float-modes (flushable))
(defknown ((setf floating-point-modes)) (float-modes) (defknown ((setf floating-point-modes)) (float-modes)
float-modes) float-modes)
...@@ -512,9 +510,13 @@ ...@@ -512,9 +510,13 @@
(:result-types unsigned-num) (:result-types unsigned-num)
(:translate floating-point-modes) (:translate floating-point-modes)
(:policy :fast-safe) (:policy :fast-safe)
(:vop-var vop)
(:temporary (:sc unsigned-stack) temp)
(:generator 3 (:generator 3
(inst cfc1 res 31) (let ((nfp (current-nfp-tn vop)))
(inst nop))) (inst stfsr nfp (* word-bytes (tn-offset temp)))
(loadw res nfp (tn-offset temp))
(inst nop))))
(define-vop (set-floating-point-modes) (define-vop (set-floating-point-modes)
(:args (new :scs (unsigned-reg) :target res)) (:args (new :scs (unsigned-reg) :target res))
...@@ -523,8 +525,10 @@ ...@@ -523,8 +525,10 @@
(:result-types unsigned-num) (:result-types unsigned-num)
(:translate (setf floating-point-modes)) (:translate (setf floating-point-modes))
(:policy :fast-safe) (:policy :fast-safe)
(:temporary (:sc unsigned-stack) temp)
(:vop-var vop)
(:generator 3 (:generator 3
(inst ctc1 res 31) (let ((nfp (current-nfp-tn vop)))
(move res new))) (storew new nfp (tn-offset temp))
(inst ldfsr nfp (* word-bytes (tn-offset temp)))
|# (move res new))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment