| OLD | NEW |
| 1 //=====---- X86Subtarget.h - Define Subtarget for the X86 -----*- C++ -*--====// | 1 //=====---- X86Subtarget.h - Define Subtarget for the X86 -----*- 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 X86 specific subclass of TargetSubtargetInfo. | 10 // This file declares the X86 specific subclass of TargetSubtargetInfo. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 bool hasCLMUL() const { return HasCLMUL; } | 165 bool hasCLMUL() const { return HasCLMUL; } |
| 166 bool hasFMA3() const { return HasFMA3; } | 166 bool hasFMA3() const { return HasFMA3; } |
| 167 bool hasFMA4() const { return HasFMA4; } | 167 bool hasFMA4() const { return HasFMA4; } |
| 168 bool isBTMemSlow() const { return IsBTMemSlow; } | 168 bool isBTMemSlow() const { return IsBTMemSlow; } |
| 169 bool isUnalignedMemAccessFast() const { return IsUAMemFast; } | 169 bool isUnalignedMemAccessFast() const { return IsUAMemFast; } |
| 170 bool hasVectorUAMem() const { return HasVectorUAMem; } | 170 bool hasVectorUAMem() const { return HasVectorUAMem; } |
| 171 | 171 |
| 172 const Triple &getTargetTriple() const { return TargetTriple; } | 172 const Triple &getTargetTriple() const { return TargetTriple; } |
| 173 | 173 |
| 174 bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); } | 174 bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); } |
| 175 bool isTargetFreeBSD() const { | 175 bool isTargetFreeBSD() const { return TargetTriple.isOSFreeBSD(); } |
| 176 return TargetTriple.getOS() == Triple::FreeBSD; | 176 bool isTargetSolaris() const { return TargetTriple.isOSSolaris(); } |
| 177 } | |
| 178 bool isTargetSolaris() const { | |
| 179 return TargetTriple.getOS() == Triple::Solaris; | |
| 180 } | |
| 181 | 177 |
| 182 // ELF is a reasonably sane default and the only other X86 targets we | 178 // ELF is a reasonably sane default and the only other X86 targets we |
| 183 // support are Darwin and Windows. Just use "not those". | 179 // support are Darwin and Windows. Just use "not those". |
| 184 bool isTargetELF() const { | 180 bool isTargetELF() const { |
| 185 return !isTargetDarwin() && !isTargetWindows() && !isTargetCygMing(); | 181 return !isTargetDarwin() && !isTargetWindows() && !isTargetCygMing(); |
| 186 } | 182 } |
| 187 bool isTargetLinux() const { return TargetTriple.getOS() == Triple::Linux; } | 183 bool isTargetLinux() const { return TargetTriple.isOSLinux(); } |
| 188 | 184 |
| 189 bool isTargetWindows() const { return TargetTriple.getOS() == Triple::Win32; } | 185 bool isTargetWindows() const { return TargetTriple.isOSWin32(); } |
| 190 bool isTargetMingw() const { return TargetTriple.getOS() == Triple::MinGW32; } | 186 bool isTargetMingw() const { return TargetTriple.isOSMinGW32(); } |
| 191 bool isTargetCygwin() const { return TargetTriple.getOS() == Triple::Cygwin; } | 187 bool isTargetCygwin() const { return TargetTriple.isOSCygwin(); } |
| 192 bool isTargetCygMing() const { | 188 bool isTargetCygMing() const { return isTargetMingw() || isTargetCygwin(); } |
| 193 return isTargetMingw() || isTargetCygwin(); | |
| 194 } | |
| 195 | 189 |
| 196 /// isTargetCOFF - Return true if this is any COFF/Windows target variant. | 190 /// isTargetCOFF - Return true if this is any COFF/Windows target variant. |
| 197 bool isTargetCOFF() const { | 191 bool isTargetCOFF() const { |
| 198 return isTargetMingw() || isTargetCygwin() || isTargetWindows(); | 192 return isTargetMingw() || isTargetCygwin() || isTargetWindows(); |
| 199 } | 193 } |
| 200 | 194 |
| 201 bool isTargetWin64() const { | 195 bool isTargetWin64() const { |
| 202 // FIXME: x86_64-cygwin has not been released yet. | 196 // FIXME: x86_64-cygwin has not been released yet. |
| 203 return In64BitMode && (isTargetCygMing() || isTargetWindows()); | 197 return In64BitMode && (isTargetCygMing() || isTargetWindows()); |
| 204 } | 198 } |
| 205 | 199 |
| 206 bool isTargetEnvMacho() const { | 200 bool isTargetEnvMacho() const { |
| 207 return isTargetDarwin() || (TargetTriple.getEnvironment() == Triple::MachO); | 201 return isTargetDarwin() || (TargetTriple.isEnvironmentMachO()); |
| 208 } | 202 } |
| 209 | 203 |
| 210 bool isTargetWin32() const { | 204 bool isTargetWin32() const { |
| 211 return !In64BitMode && (isTargetMingw() || isTargetWindows()); | 205 return !In64BitMode && (isTargetMingw() || isTargetWindows()); |
| 212 } | 206 } |
| 213 | 207 |
| 214 bool isPICStyleSet() const { return PICStyle != PICStyles::None; } | 208 bool isPICStyleSet() const { return PICStyle != PICStyles::None; } |
| 215 bool isPICStyleGOT() const { return PICStyle == PICStyles::GOT; } | 209 bool isPICStyleGOT() const { return PICStyle == PICStyles::GOT; } |
| 216 bool isPICStyleRIPRel() const { return PICStyle == PICStyles::RIPRel; } | 210 bool isPICStyleRIPRel() const { return PICStyle == PICStyles::RIPRel; } |
| 217 | 211 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 /// getSpecialAddressLatency - For targets where it is beneficial to | 245 /// getSpecialAddressLatency - For targets where it is beneficial to |
| 252 /// backschedule instructions that compute addresses, return a value | 246 /// backschedule instructions that compute addresses, return a value |
| 253 /// indicating the number of scheduling cycles of backscheduling that | 247 /// indicating the number of scheduling cycles of backscheduling that |
| 254 /// should be attempted. | 248 /// should be attempted. |
| 255 unsigned getSpecialAddressLatency() const; | 249 unsigned getSpecialAddressLatency() const; |
| 256 }; | 250 }; |
| 257 | 251 |
| 258 } // End llvm namespace | 252 } // End llvm namespace |
| 259 | 253 |
| 260 #endif | 254 #endif |
| OLD | NEW |