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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 , | 94 , |
95 ICMPX8632_TABLE | 95 ICMPX8632_TABLE |
96 #undef X | 96 #undef X |
97 }; | 97 }; |
98 | 98 |
99 const size_t TargetX8632Traits::TableIcmp64Size = | 99 const size_t TargetX8632Traits::TableIcmp64Size = |
100 llvm::array_lengthof(TableIcmp64); | 100 llvm::array_lengthof(TableIcmp64); |
101 | 101 |
102 const TargetX8632Traits::TableTypeX8632AttributesType | 102 const TargetX8632Traits::TableTypeX8632AttributesType |
103 TargetX8632Traits::TableTypeX8632Attributes[] = { | 103 TargetX8632Traits::TableTypeX8632Attributes[] = { |
104 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, width, fld) \ | 104 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, unpack, width, fld) \ |
105 { IceType_##elementty } \ | 105 { IceType_##elementty } \ |
106 , | 106 , |
107 ICETYPEX8632_TABLE | 107 ICETYPEX8632_TABLE |
108 #undef X | 108 #undef X |
109 }; | 109 }; |
110 | 110 |
111 const size_t TargetX8632Traits::TableTypeX8632AttributesSize = | 111 const size_t TargetX8632Traits::TableTypeX8632AttributesSize = |
112 llvm::array_lengthof(TableTypeX8632Attributes); | 112 llvm::array_lengthof(TableTypeX8632Attributes); |
113 | 113 |
114 const uint32_t TargetX8632Traits::X86_STACK_ALIGNMENT_BYTES = 16; | 114 const uint32_t TargetX8632Traits::X86_STACK_ALIGNMENT_BYTES = 16; |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 _table1_##tag == _table2_##tag, \ | 452 _table1_##tag == _table2_##tag, \ |
453 "Inconsistency between ICMPX8632_TABLE and ICEINSTICMP_TABLE"); | 453 "Inconsistency between ICMPX8632_TABLE and ICEINSTICMP_TABLE"); |
454 ICEINSTICMP_TABLE | 454 ICEINSTICMP_TABLE |
455 #undef X | 455 #undef X |
456 } // end of namespace dummy2 | 456 } // end of namespace dummy2 |
457 | 457 |
458 // Validate the enum values in ICETYPEX8632_TABLE. | 458 // Validate the enum values in ICETYPEX8632_TABLE. |
459 namespace dummy3 { | 459 namespace dummy3 { |
460 // Define a temporary set of enum values based on low-level table entries. | 460 // Define a temporary set of enum values based on low-level table entries. |
461 enum _tmp_enum { | 461 enum _tmp_enum { |
462 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, width, fld) _tmp_##tag, | 462 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, unpack, width, fld) \ |
| 463 _tmp_##tag, |
463 ICETYPEX8632_TABLE | 464 ICETYPEX8632_TABLE |
464 #undef X | 465 #undef X |
465 _num | 466 _num |
466 }; | 467 }; |
467 // Define a set of constants based on high-level table entries. | 468 // Define a set of constants based on high-level table entries. |
468 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ | 469 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ |
469 static const int _table1_##tag = IceType_##tag; | 470 static const int _table1_##tag = IceType_##tag; |
470 ICETYPE_TABLE | 471 ICETYPE_TABLE |
471 #undef X | 472 #undef X |
472 // Define a set of constants based on low-level table entries, and ensure the | 473 // Define a set of constants based on low-level table entries, and ensure the |
473 // table entry keys are consistent. | 474 // table entry keys are consistent. |
474 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, width, fld) \ | 475 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, unpack, width, fld) \ |
475 static const int _table2_##tag = _tmp_##tag; \ | 476 static const int _table2_##tag = _tmp_##tag; \ |
476 static_assert(_table1_##tag == _table2_##tag, \ | 477 static_assert(_table1_##tag == _table2_##tag, \ |
477 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); | 478 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); |
478 ICETYPEX8632_TABLE | 479 ICETYPEX8632_TABLE |
479 #undef X | 480 #undef X |
480 // Repeat the static asserts with respect to the high-level table entries in | 481 // Repeat the static asserts with respect to the high-level table entries in |
481 // case the high-level table has extra entries. | 482 // case the high-level table has extra entries. |
482 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ | 483 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ |
483 static_assert(_table1_##tag == _table2_##tag, \ | 484 static_assert(_table1_##tag == _table2_##tag, \ |
484 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); | 485 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); |
485 ICETYPE_TABLE | 486 ICETYPE_TABLE |
486 #undef X | 487 #undef X |
487 } // end of namespace dummy3 | 488 } // end of namespace dummy3 |
488 } // end of anonymous namespace | 489 } // end of anonymous namespace |
489 | 490 |
490 } // end of namespace X8632 | 491 } // end of namespace X8632 |
491 } // end of namespace Ice | 492 } // end of namespace Ice |
OLD | NEW |