Add target flags to SPARC address operands.
[oota-llvm.git] / lib / Target / Sparc / MCTargetDesc / SparcBaseInfo.h
1 //===-- SparcBaseInfo.h - Top level definitions for Sparc ---- --*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains small standalone helper functions and enum definitions
11 // for the Sparc target useful for the compiler back-end and the MC libraries.
12 // As such, it deliberately does not include references to LLVM core code gen
13 // types, passes, etc..
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef SPARCBASEINFO_H
18 #define SPARCBASEINFO_H
19
20 namespace llvm {
21
22 /// SPII - This namespace holds target specific flags for instruction info.
23 namespace SPII {
24
25 /// Target Operand Flags. Sparc specific TargetFlags for MachineOperands and
26 /// SDNodes.
27 enum TOF {
28   MO_NO_FLAG,
29
30   // Extract the low 10 bits of an address.
31   // Assembler: %lo(addr)
32   MO_LO,
33
34   // Extract bits 31-10 of an address. Only for sethi.
35   // Assembler: %hi(addr) or %lm(addr)
36   MO_HI,
37
38   // Extract bits 43-22 of an adress. Only for sethi.
39   // Assembler: %h44(addr)
40   MO_H44,
41
42   // Extract bits 21-12 of an address.
43   // Assembler: %m44(addr)
44   MO_M44,
45
46   // Extract bits 11-0 of an address.
47   // Assembler: %l44(addr)
48   MO_L44,
49
50   // Extract bits 63-42 of an address. Only for sethi.
51   // Assembler: %hh(addr)
52   MO_HH,
53
54   // Extract bits 41-32 of an address.
55   // Assembler: %hm(addr)
56   MO_HM
57 };
58
59 } // end namespace SPII
60 } // end namespace llvm
61
62 #endif