1.0.24.34: IR2: additional representation for predicates, conditional moves
[sbcl.git] / src / compiler / alpha / pred.lisp
1 ;;;; the VM definition of predicate VOPs for the Alpha
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
11
12 (in-package "SB!VM")
13 \f
14 ;;;; the Branch VOP
15
16 ;;; The unconditional branch, emitted when we can't drop through to
17 ;;; the desired destination. Dest is the continuation we transfer
18 ;;; control to.
19 (define-vop (branch)
20   (:info dest)
21   (:generator 5
22     (inst br zero-tn dest)))
23
24 \f
25 ;;;; Generic conditional VOPs
26
27 ;;; The generic conditional branch, emitted immediately after test
28 ;;; VOPs that only set flags.
29
30 (define-vop (branch-if)
31   (:info dest flags not-p)
32   (:ignore dest flags not-p)
33   (:generator 0
34      (error "BRANCH-IF not yet implemented")))
35
36 (!def-vm-support-routine
37     convert-conditional-move-p (node dst-tn x-tn y-tn)
38   (declare (ignore node dst-tn x-tn y-tn))
39   nil)
40
41 \f
42 ;;;; conditional VOPs
43
44 (define-vop (if-eq)
45   (:args (x :scs (any-reg descriptor-reg zero null))
46          (y :scs (any-reg descriptor-reg zero null)))
47   (:conditional)
48   (:temporary (:scs (non-descriptor-reg)) temp)
49   (:info target not-p)
50   (:policy :fast-safe)
51   (:translate eq)
52   (:generator 3
53     (inst cmpeq x y temp)
54     (if not-p
55         (inst beq temp target)
56         (inst bne temp target))))