Eliminate style-warning about undefined type GLOBAL-VAR
[sbcl.git] / src / compiler / arm / pred.lisp
blob8eff0802b789936d7e698ad848e118b4358dae59
1 ;;;; predicate VOPs for the ARM VM
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.
12 (in-package "SB!VM")
15 ;;;; The Branch VOP.
17 ;;; The unconditional branch, emitted when we can't drop through to the desired
18 ;;; destination. Dest is the continuation we transfer control to.
19 ;;;
20 (define-vop (branch)
21 (:info dest)
22 (:generator 5
23 (inst b dest)))
26 ;;;; Generic conditional VOPs
28 ;;; The generic conditional branch, emitted immediately after test
29 ;;; VOPs that only set flags.
31 ;;; FIXME: Unlike the PPC (from whence this was cribbed), ARM actually
32 ;;; has flags. We should take advantage of them here.
34 (define-vop (branch-if)
35 (:info dest flags not-p)
36 (:generator 0
37 (flet ((negate-condition (name)
38 (let ((code (logxor 1 (conditional-opcode name))))
39 (aref *condition-name-vec* code))))
40 (aver (null (rest flags)))
41 (inst b
42 (if not-p
43 (negate-condition (first flags))
44 (first flags))
45 dest))))
47 (defun convert-conditional-move-p (node dst-tn x-tn y-tn)
48 (declare (ignore node dst-tn x-tn y-tn))
49 nil)
52 ;;;; Conditional VOPs:
54 (define-vop (if-eq)
55 (:args (x :scs (any-reg descriptor-reg null))
56 (y :scs (any-reg descriptor-reg null)))
57 (:conditional)
58 (:info target not-p)
59 (:policy :fast-safe)
60 (:translate eq)
61 (:generator 3
62 (inst cmp
63 (sc-case x
64 (null null-tn) ;; FIXME: should it really be like that?
65 (t x))
66 (sc-case y
67 (null null-tn)
68 (t y)))
69 (inst b (if not-p :ne :eq) target)))