blob: f872e861bfa71602338d6834cceb5866607c85a4 [file] [log] [blame]
Chris Lattnerdf4ed632006-11-17 22:10:59 +00001//===-- PPCPredicates.h - PPC Branch Predicate Information ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Chris Lattnerdf4ed632006-11-17 22:10:59 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the PowerPC branch predicates.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGET_POWERPC_PPCPREDICATES_H
15#define LLVM_TARGET_POWERPC_PPCPREDICATES_H
16
Chris Lattnerdf4ed632006-11-17 22:10:59 +000017namespace llvm {
18namespace PPC {
19 /// Predicate - These are "(BI << 5) | BO" for various predicates.
20 enum Predicate {
21 PRED_ALWAYS = (0 << 5) | 20,
22 PRED_LT = (0 << 5) | 12,
23 PRED_LE = (1 << 5) | 4,
24 PRED_EQ = (2 << 5) | 12,
25 PRED_GE = (0 << 5) | 4,
26 PRED_GT = (1 << 5) | 12,
27 PRED_NE = (2 << 5) | 4,
28 PRED_UN = (3 << 5) | 12,
29 PRED_NU = (3 << 5) | 4
30 };
31
32 /// Invert the specified predicate. != -> ==, < -> >=.
33 Predicate InvertPredicate(Predicate Opcode);
34}
35}
36
37#endif