22aa9a98a93e4aa91aa54beb6ea0f6e2b8fb7502
[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 (!def-vm-support-routine
31     convert-conditional-move-p (node dst-tn x-tn y-tn)
32   (declare (ignore node dst-tn x-tn y-tn))
33   nil)
34
35 \f
36 ;;;; Conditional VOPs:
37
38 (define-vop (if-eq)
39   (:args (x :scs (any-reg descriptor-reg zero null))
40          (y :scs (any-reg descriptor-reg zero null)))
41   (:conditional)
42   (:info target not-p)
43   (:policy :fast-safe)
44   (:translate eq)
45   (:generator 3
46     (inst cmpw x y)
47     (inst b? (if not-p :ne :eq) target)))