[SystemZ] Add FI[EDX]BRA
[oota-llvm.git] / lib / Target / SystemZ / SystemZSubtarget.h
1 //===-- SystemZSubtarget.h - SystemZ subtarget information -----*- 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 declares the SystemZ specific subclass of TargetSubtargetInfo.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef SYSTEMZSUBTARGET_H
15 #define SYSTEMZSUBTARGET_H
16
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/Target/TargetSubtargetInfo.h"
19 #include <string>
20
21 #define GET_SUBTARGETINFO_HEADER
22 #include "SystemZGenSubtargetInfo.inc"
23
24 namespace llvm {
25 class GlobalValue;
26 class StringRef;
27
28 class SystemZSubtarget : public SystemZGenSubtargetInfo {
29 protected:
30   bool HasDistinctOps;
31   bool HasLoadStoreOnCond;
32   bool HasHighWord;
33   bool HasFPExtension;
34
35 private:
36   Triple TargetTriple;
37
38 public:
39   SystemZSubtarget(const std::string &TT, const std::string &CPU,
40                    const std::string &FS);
41
42   // Automatically generated by tblgen.
43   void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
44
45   // Return true if the target has the distinct-operands facility.
46   bool hasDistinctOps() const { return HasDistinctOps; }
47
48   // Return true if the target has the load/store-on-condition facility.
49   bool hasLoadStoreOnCond() const { return HasLoadStoreOnCond; }
50
51   // Return true if the target has the high-word facility.
52   bool hasHighWord() const { return HasHighWord; }
53
54   // Return true if the target has the floating-point extension facility.
55   bool hasFPExtension() const { return HasFPExtension; }
56
57   // Return true if GV can be accessed using LARL for reloc model RM
58   // and code model CM.
59   bool isPC32DBLSymbol(const GlobalValue *GV, Reloc::Model RM,
60                        CodeModel::Model CM) const;
61
62   bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
63 };
64 } // end namespace llvm
65
66 #endif