Simplify EMIT-VOP further.
[sbcl.git] / src / compiler / ppc / pred.lisp
1 ;;;
2 ;;; Converted by William Lott.
3 ;;;
4
5 (in-package "SB!VM")
6
7 \f
8 ;;;; The Branch VOP.
9
10 ;;; The unconditional branch, emitted when we can't drop through to the desired
11 ;;; destination.  Dest is the continuation we transfer control to.
12 ;;;
13 (define-vop (branch)
14   (:info dest)
15   (:generator 5
16     (inst b dest)))
17
18 \f
19 ;;;; Generic conditional VOPs
20
21 ;;; The generic conditional branch, emitted immediately after test
22 ;;; VOPs that only set flags.
23
24 (define-vop (branch-if)
25   (:info dest flags not-p)
26   (:ignore dest flags not-p)
27   (:generator 0
28      (error "BRANCH-IF not yet implemented")))
29
30 (defun convert-conditional-move-p (node dst-tn x-tn y-tn)
31   (declare (ignore node dst-tn x-tn y-tn))
32   nil)
33
34 \f
35 ;;;; Conditional VOPs:
36
37 (define-vop (if-eq)
38   (:args (x :scs (any-reg descriptor-reg zero null))
39          (y :scs (any-reg descriptor-reg zero null)))
40   (:conditional)
41   (:info target not-p)
42   (:policy :fast-safe)
43   (:translate eq)
44   (:generator 3
45     (inst cmpw x y)
46     (inst b? (if not-p :ne :eq) target)))