[AVX512] Fix VSQRT packed instructions internal names.
[oota-llvm.git] / lib / Target / Mips / MipsABIInfo.h
1 //===---- MipsABIInfo.h - Information about MIPS ABI's --------------------===//
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 #ifndef MIPSABIINFO_H
11 #define MIPSABIINFO_H
12
13 namespace llvm {
14 class MipsABIInfo {
15 public:
16   enum class ABI { Unknown, O32, N32, N64, EABI };
17
18 protected:
19   ABI ThisABI;
20
21 public:
22   MipsABIInfo(ABI ThisABI) : ThisABI(ThisABI) {}
23
24   static MipsABIInfo Unknown() { return MipsABIInfo(ABI::Unknown); }
25   static MipsABIInfo O32() { return MipsABIInfo(ABI::O32); }
26   static MipsABIInfo N32() { return MipsABIInfo(ABI::N32); }
27   static MipsABIInfo N64() { return MipsABIInfo(ABI::N64); }
28   static MipsABIInfo EABI() { return MipsABIInfo(ABI::EABI); }
29
30   bool IsKnown() const { return ThisABI != ABI::Unknown; }
31   bool IsO32() const { return ThisABI == ABI::O32; }
32   bool IsN32() const { return ThisABI == ABI::N32; }
33   bool IsN64() const { return ThisABI == ABI::N64; }
34   bool IsEABI() const { return ThisABI == ABI::EABI; }
35   ABI GetEnumValue() const { return ThisABI; }
36
37   /// Ordering of ABI's
38   /// MipsGenSubtargetInfo.inc will use this to resolve conflicts when given
39   /// multiple ABI options.
40   bool operator<(const MipsABIInfo Other) const {
41     return ThisABI < Other.GetEnumValue();
42   }
43 };
44 }
45
46 #endif