Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(917)

Side by Side Diff: src/IceTargetLoweringX8664.cpp

Issue 1909013002: Subzero. X86. Lowers shufflevector using xmm instructions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8664.cpp - x86-64 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8664.cpp - x86-64 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 , 87 ,
88 ICMPX8664_TABLE 88 ICMPX8664_TABLE
89 #undef X 89 #undef X
90 }; 90 };
91 91
92 const size_t TargetX8664Traits::TableIcmp64Size = 92 const size_t TargetX8664Traits::TableIcmp64Size =
93 llvm::array_lengthof(TableIcmp64); 93 llvm::array_lengthof(TableIcmp64);
94 94
95 const TargetX8664Traits::TableTypeX8664AttributesType 95 const TargetX8664Traits::TableTypeX8664AttributesType
96 TargetX8664Traits::TableTypeX8664Attributes[] = { 96 TargetX8664Traits::TableTypeX8664Attributes[] = {
97 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, width, fld) \ 97 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, unpack, width, fld) \
98 { IceType_##elementty } \ 98 { IceType_##elementty } \
99 , 99 ,
100 ICETYPEX8664_TABLE 100 ICETYPEX8664_TABLE
101 #undef X 101 #undef X
102 }; 102 };
103 103
104 const size_t TargetX8664Traits::TableTypeX8664AttributesSize = 104 const size_t TargetX8664Traits::TableTypeX8664AttributesSize =
105 llvm::array_lengthof(TableTypeX8664Attributes); 105 llvm::array_lengthof(TableTypeX8664Attributes);
106 106
107 const uint32_t TargetX8664Traits::X86_STACK_ALIGNMENT_BYTES = 16; 107 const uint32_t TargetX8664Traits::X86_STACK_ALIGNMENT_BYTES = 16;
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 _table1_##tag == _table2_##tag, \ 780 _table1_##tag == _table2_##tag, \
781 "Inconsistency between ICMPX8664_TABLE and ICEINSTICMP_TABLE"); 781 "Inconsistency between ICMPX8664_TABLE and ICEINSTICMP_TABLE");
782 ICEINSTICMP_TABLE 782 ICEINSTICMP_TABLE
783 #undef X 783 #undef X
784 } // end of namespace dummy2 784 } // end of namespace dummy2
785 785
786 // Validate the enum values in ICETYPEX8664_TABLE. 786 // Validate the enum values in ICETYPEX8664_TABLE.
787 namespace dummy3 { 787 namespace dummy3 {
788 // Define a temporary set of enum values based on low-level table entries. 788 // Define a temporary set of enum values based on low-level table entries.
789 enum _tmp_enum { 789 enum _tmp_enum {
790 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, width, fld) _tmp_##tag, 790 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, unpack, width, fld) \
791 _tmp_##tag,
791 ICETYPEX8664_TABLE 792 ICETYPEX8664_TABLE
792 #undef X 793 #undef X
793 _num 794 _num
794 }; 795 };
795 // Define a set of constants based on high-level table entries. 796 // Define a set of constants based on high-level table entries.
796 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ 797 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \
797 static const int _table1_##tag = IceType_##tag; 798 static const int _table1_##tag = IceType_##tag;
798 ICETYPE_TABLE 799 ICETYPE_TABLE
799 #undef X 800 #undef X
800 // Define a set of constants based on low-level table entries, and ensure the 801 // Define a set of constants based on low-level table entries, and ensure the
801 // table entry keys are consistent. 802 // table entry keys are consistent.
802 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, width, fld) \ 803 #define X(tag, elementty, cvt, sdss, pdps, spsd, pack, unpack, width, fld) \
803 static const int _table2_##tag = _tmp_##tag; \ 804 static const int _table2_##tag = _tmp_##tag; \
804 static_assert(_table1_##tag == _table2_##tag, \ 805 static_assert(_table1_##tag == _table2_##tag, \
805 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); 806 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE");
806 ICETYPEX8664_TABLE 807 ICETYPEX8664_TABLE
807 #undef X 808 #undef X
808 // Repeat the static asserts with respect to the high-level table entries in 809 // Repeat the static asserts with respect to the high-level table entries in
809 // case the high-level table has extra entries. 810 // case the high-level table has extra entries.
810 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ 811 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \
811 static_assert(_table1_##tag == _table2_##tag, \ 812 static_assert(_table1_##tag == _table2_##tag, \
812 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); 813 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE");
813 ICETYPE_TABLE 814 ICETYPE_TABLE
814 #undef X 815 #undef X
815 } // end of namespace dummy3 816 } // end of namespace dummy3
816 } // end of anonymous namespace 817 } // end of anonymous namespace
817 818
818 } // end of namespace X8664 819 } // end of namespace X8664
819 } // end of namespace Ice 820 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698