OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// | 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
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 /// \file | 10 /// \file |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 ICMPX8632_TABLE | 67 ICMPX8632_TABLE |
68 #undef X | 68 #undef X |
69 }; | 69 }; |
70 | 70 |
71 const size_t MachineTraits<TargetX8632>::TableIcmp64Size = | 71 const size_t MachineTraits<TargetX8632>::TableIcmp64Size = |
72 llvm::array_lengthof(TableIcmp64); | 72 llvm::array_lengthof(TableIcmp64); |
73 | 73 |
74 const MachineTraits<TargetX8632>::TableTypeX8632AttributesType | 74 const MachineTraits<TargetX8632>::TableTypeX8632AttributesType |
75 MachineTraits<TargetX8632>::TableTypeX8632Attributes[] = { | 75 MachineTraits<TargetX8632>::TableTypeX8632Attributes[] = { |
76 #define X(tag, elementty, cvt, sdss, pack, width, fld) \ | 76 #define X(tag, elementty, cvt, sdss, pack, width, fld) \ |
77 { elementty } \ | 77 { IceType_##elementty } \ |
78 , | 78 , |
79 ICETYPEX8632_TABLE | 79 ICETYPEX8632_TABLE |
80 #undef X | 80 #undef X |
81 }; | 81 }; |
82 | 82 |
83 const size_t MachineTraits<TargetX8632>::TableTypeX8632AttributesSize = | 83 const size_t MachineTraits<TargetX8632>::TableTypeX8632AttributesSize = |
84 llvm::array_lengthof(TableTypeX8632Attributes); | 84 llvm::array_lengthof(TableTypeX8632Attributes); |
85 | 85 |
86 const uint32_t MachineTraits<TargetX8632>::X86_STACK_ALIGNMENT_BYTES = 16; | 86 const uint32_t MachineTraits<TargetX8632>::X86_STACK_ALIGNMENT_BYTES = 16; |
87 const char *MachineTraits<TargetX8632>::TargetName = "X8632"; | 87 const char *MachineTraits<TargetX8632>::TargetName = "X8632"; |
88 | 88 |
89 template <> | 89 template <> |
90 std::array<llvm::SmallBitVector, IceType_NUM> | 90 std::array<llvm::SmallBitVector, RCX86_NUM> |
91 TargetX86Base<TargetX8632>::TypeToRegisterSet = {}; | 91 TargetX86Base<TargetX8632>::TypeToRegisterSet = {}; |
92 | 92 |
93 template <> | 93 template <> |
94 std::array<llvm::SmallBitVector, | 94 std::array<llvm::SmallBitVector, |
95 TargetX86Base<TargetX8632>::Traits::RegisterSet::Reg_NUM> | 95 TargetX86Base<TargetX8632>::Traits::RegisterSet::Reg_NUM> |
96 TargetX86Base<TargetX8632>::RegisterAliases = {}; | 96 TargetX86Base<TargetX8632>::RegisterAliases = {}; |
97 | 97 |
98 template <> | 98 template <> |
99 llvm::SmallBitVector | 99 llvm::SmallBitVector |
100 TargetX86Base<TargetX8632>::ScratchRegs = llvm::SmallBitVector(); | 100 TargetX86Base<TargetX8632>::ScratchRegs = llvm::SmallBitVector(); |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 namespace dummy3 { | 950 namespace dummy3 { |
951 // Define a temporary set of enum values based on low-level table entries. | 951 // Define a temporary set of enum values based on low-level table entries. |
952 enum _tmp_enum { | 952 enum _tmp_enum { |
953 #define X(tag, elementty, cvt, sdss, pack, width, fld) _tmp_##tag, | 953 #define X(tag, elementty, cvt, sdss, pack, width, fld) _tmp_##tag, |
954 ICETYPEX8632_TABLE | 954 ICETYPEX8632_TABLE |
955 #undef X | 955 #undef X |
956 _num | 956 _num |
957 }; | 957 }; |
958 // Define a set of constants based on high-level table entries. | 958 // Define a set of constants based on high-level table entries. |
959 #define X(tag, sizeLog2, align, elts, elty, str) \ | 959 #define X(tag, sizeLog2, align, elts, elty, str) \ |
960 static const int _table1_##tag = tag; | 960 static const int _table1_##tag = IceType_##tag; |
961 ICETYPE_TABLE | 961 ICETYPE_TABLE |
962 #undef X | 962 #undef X |
963 // Define a set of constants based on low-level table entries, and ensure the | 963 // Define a set of constants based on low-level table entries, and ensure the |
964 // table entry keys are consistent. | 964 // table entry keys are consistent. |
965 #define X(tag, elementty, cvt, sdss, pack, width, fld) \ | 965 #define X(tag, elementty, cvt, sdss, pack, width, fld) \ |
966 static const int _table2_##tag = _tmp_##tag; \ | 966 static const int _table2_##tag = _tmp_##tag; \ |
967 static_assert(_table1_##tag == _table2_##tag, \ | 967 static_assert(_table1_##tag == _table2_##tag, \ |
968 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); | 968 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); |
969 ICETYPEX8632_TABLE | 969 ICETYPEX8632_TABLE |
970 #undef X | 970 #undef X |
971 // Repeat the static asserts with respect to the high-level table entries in | 971 // Repeat the static asserts with respect to the high-level table entries in |
972 // case the high-level table has extra entries. | 972 // case the high-level table has extra entries. |
973 #define X(tag, sizeLog2, align, elts, elty, str) \ | 973 #define X(tag, sizeLog2, align, elts, elty, str) \ |
974 static_assert(_table1_##tag == _table2_##tag, \ | 974 static_assert(_table1_##tag == _table2_##tag, \ |
975 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); | 975 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); |
976 ICETYPE_TABLE | 976 ICETYPE_TABLE |
977 #undef X | 977 #undef X |
978 } // end of namespace dummy3 | 978 } // end of namespace dummy3 |
979 } // end of anonymous namespace | 979 } // end of anonymous namespace |
980 | 980 |
981 } // end of namespace Ice | 981 } // end of namespace Ice |
OLD | NEW |