boot-2007-05-1-ppc.lisp 1.02 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
;;; Bootstrap file for fused multiply vops for ppc.

(in-package "VM")

#+ppc
(progn
(defknown (vm::fused-multiply-subtract vm::fused-multiply-add)
    (double-float double-float double-float)
  double-float
  (movable flushable))

(export '(fused-multiply-subtract fused-multiply-add))

(define-vop (fused-multiply-subtract/double)
  (:args (x :scs (double-reg))
         (y :scs (double-reg))
	 (z :scs (double-reg)))
  (:results (r :scs (double-reg)))
  (:arg-types double-float double-float double-float)
  (:result-types double-float)
  (:translate vm::fused-multiply-subtract)
  (:policy :fast-safe)
  (:generator 1
    ;; r = x*y - z	       
    (inst fmsub r x y z)))

(define-vop (fused-multiply-add/double)
  (:args (x :scs (double-reg))
         (y :scs (double-reg))
	 (z :scs (double-reg)))
  (:results (r :scs (double-reg)))
  (:arg-types double-float double-float double-float)
  (:result-types double-float)
  (:translate vm::fused-multiply-add)
  (:policy :fast-safe)
  (:generator 1
    ;; r = x*y + z
    (inst fmadd r x y z)))
)