blob: ba1bb744a66a4b647de376a2cec23ef8888880ed [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//
5// This file was developed by Chris Lattner and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
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
17#include "PPC.h"
18
19namespace llvm {
20namespace PPC {
21 /// Predicate - These are "(BI << 5) | BO" for various predicates.
22 enum Predicate {
23 PRED_ALWAYS = (0 << 5) | 20,
24 PRED_LT = (0 << 5) | 12,
25 PRED_LE = (1 << 5) | 4,
26 PRED_EQ = (2 << 5) | 12,
27 PRED_GE = (0 << 5) | 4,
28 PRED_GT = (1 << 5) | 12,
29 PRED_NE = (2 << 5) | 4,
30 PRED_UN = (3 << 5) | 12,
31 PRED_NU = (3 << 5) | 4
32 };
33
34 /// Invert the specified predicate. != -> ==, < -> >=.
35 Predicate InvertPredicate(Predicate Opcode);
36}
37}
38
39#endif