OLD | NEW |
1 //=====-- MipsSubtarget.h - Define Subtarget for the Mips -----*- C++ -*--====// | 1 //=====-- MipsSubtarget.h - Define Subtarget for the Mips -----*- C++ -*--====// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the Mips specific subclass of TargetSubtargetInfo. | 10 // This file declares the Mips specific subclass of TargetSubtargetInfo. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 bool HasMinMax; | 80 bool HasMinMax; |
81 | 81 |
82 // HasSwap - Byte and half swap instructions. | 82 // HasSwap - Byte and half swap instructions. |
83 bool HasSwap; | 83 bool HasSwap; |
84 | 84 |
85 // HasBitCount - Count leading '1' and '0' bits. | 85 // HasBitCount - Count leading '1' and '0' bits. |
86 bool HasBitCount; | 86 bool HasBitCount; |
87 | 87 |
88 InstrItineraryData InstrItins; | 88 InstrItineraryData InstrItins; |
89 | 89 |
| 90 // @LOCALMOD-START |
| 91 Triple TargetTriple; |
| 92 // @LOCALMOD-END |
| 93 |
90 public: | 94 public: |
91 | 95 |
92 /// Only O32 and EABI supported right now. | 96 /// Only O32 and EABI supported right now. |
93 bool isABI_EABI() const { return MipsABI == EABI; } | 97 bool isABI_EABI() const { return MipsABI == EABI; } |
94 bool isABI_N64() const { return MipsABI == N64; } | 98 bool isABI_N64() const { return MipsABI == N64; } |
95 bool isABI_N32() const { return MipsABI == N32; } | 99 bool isABI_N32() const { return MipsABI == N32; } |
96 bool isABI_O32() const { return MipsABI == O32; } | 100 bool isABI_O32() const { return MipsABI == O32; } |
97 unsigned getTargetABI() const { return MipsABI; } | 101 unsigned getTargetABI() const { return MipsABI; } |
98 | 102 |
99 /// This constructor initializes the data members to match that | 103 /// This constructor initializes the data members to match that |
(...skipping 20 matching lines...) Expand all Loading... |
120 bool hasVFPU() const { return HasVFPU; } | 124 bool hasVFPU() const { return HasVFPU; } |
121 bool isLinux() const { return IsLinux; } | 125 bool isLinux() const { return IsLinux; } |
122 | 126 |
123 /// Features related to the presence of specific instructions. | 127 /// Features related to the presence of specific instructions. |
124 bool hasSEInReg() const { return HasSEInReg; } | 128 bool hasSEInReg() const { return HasSEInReg; } |
125 bool hasCondMov() const { return HasCondMov; } | 129 bool hasCondMov() const { return HasCondMov; } |
126 bool hasMulDivAdd() const { return HasMulDivAdd; } | 130 bool hasMulDivAdd() const { return HasMulDivAdd; } |
127 bool hasMinMax() const { return HasMinMax; } | 131 bool hasMinMax() const { return HasMinMax; } |
128 bool hasSwap() const { return HasSwap; } | 132 bool hasSwap() const { return HasSwap; } |
129 bool hasBitCount() const { return HasBitCount; } | 133 bool hasBitCount() const { return HasBitCount; } |
| 134 |
| 135 // @LOCALMOD-START |
| 136 bool isTargetNaCl() const { return TargetTriple.getOS() == Triple::NativeClien
t; } |
| 137 // @LOCALMOD-END |
130 }; | 138 }; |
131 } // End llvm namespace | 139 } // End llvm namespace |
132 | 140 |
133 #endif | 141 #endif |
OLD | NEW |