1b1528164a2989e460b036c0edead4c7f1156715
[sbcl.git] / src / compiler / alpha / pred.lisp
1 ;;; -*- Package: ALPHA -*-
2 ;;;
3 ;;; **********************************************************************
4 ;;; This code was written as part of the CMU Common Lisp project at
5 ;;; Carnegie Mellon University, and has been placed in the public domain.
6 ;;;
7
8 ;;;
9 ;;; **********************************************************************
10 ;;;
11 ;;;    This file contains the VM definition of predicate VOPs for the Alpha.
12 ;;;
13 ;;; Written by Rob MacLachlan
14 ;;;
15 ;;; Converted by Sean Hallgren.
16 ;;; 
17
18 (in-package "SB!VM")
19
20
21 \f
22 ;;;; The Branch VOP.
23
24 ;;; The unconditional branch, emitted when we can't drop through to the desired
25 ;;; destination.  Dest is the continuation we transfer control to.
26 ;;;
27 (define-vop (branch)
28   (:info dest)
29   (:generator 5
30     (inst br zero-tn dest)))
31
32 \f
33 ;;;; Conditional VOPs:
34
35 (define-vop (if-eq)
36   (:args (x :scs (any-reg descriptor-reg zero null))
37          (y :scs (any-reg descriptor-reg zero null)))
38   (:conditional)
39   (:temporary (:scs (non-descriptor-reg)) temp)
40   (:info target not-p)
41   (:policy :fast-safe)
42   (:translate eq)
43   (:generator 3
44     (inst cmpeq x y temp)
45     (if not-p
46         (inst beq temp target)
47         (inst bne temp target))))