Skip to content
Snippets Groups Projects
Commit dfee6bab authored by dtc's avatar dtc
Browse files

From Raymond Toy:

o Add support for complex FP vops, enabled by the feature :complex-fp-vop
  which should work for all Sparcs.
parent a12698c0
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.80 1999/09/06 15:27:45 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.81 2000/04/02 18:45:09 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -1225,8 +1225,9 @@
;;; Define some transforms for complex operations. We do this in lieu
;;; of complex operation VOPs.
;;; of complex operation VOPs. Some architectures have vops, though.
;;;
#-complex-fp-vops
(macrolet ((frob (type)
`(progn
;; Negation
......@@ -1299,6 +1300,23 @@
(frob single-float)
(frob double-float))
#+complex-fp-vops
(macrolet
((frob (type)
`(progn
;; Cis.
(deftransform cis ((z) ((,type)) *)
'(complex (cos z) (sin z)))
;; Comparison
(deftransform = ((w z) ((complex ,type) real) *)
'(and (= (realpart w) z) (zerop (imagpart w))))
(deftransform = ((w z) (real (complex ,type)) *)
'(and (= (realpart z) w) (zerop (imagpart z))))
)))
(frob single-float)
(frob double-float))
;;; Here are simple optimizers for sin, cos, and tan. They do not
;;; produce a minimal range for the result; the result is the widest
;;; possible answer. This gets around the problem of doing range
......
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