Chromium Code Reviews| 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 // This file implements the TargetLoweringX8632 class, which | 10 // This file implements the TargetLoweringX8632 class, which |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 { | 193 { |
| 194 // Define a temporary set of enum values based on low-level | 194 // Define a temporary set of enum values based on low-level |
| 195 // table entries. | 195 // table entries. |
| 196 enum _tmp_enum { | 196 enum _tmp_enum { |
| 197 #define X(tag, elementty, cvt, sdss, pack, width) _tmp_##tag, | 197 #define X(tag, elementty, cvt, sdss, pack, width) _tmp_##tag, |
| 198 ICETYPEX8632_TABLE | 198 ICETYPEX8632_TABLE |
| 199 #undef X | 199 #undef X |
| 200 _num | 200 _num |
| 201 }; | 201 }; |
| 202 // Define a set of constants based on high-level table entries. | 202 // Define a set of constants based on high-level table entries. |
| 203 #define X(tag, size, align, elts, elty, str) \ | 203 #define X(tag, size, align, elts, elty, str, flags) \ |
|
jvoung (off chromium)
2014/07/22 18:40:18
"\" for continuation can go near 80 col mark for c
Karl
2014/07/23 20:22:20
Done.
| |
| 204 static const int _table1_##tag = tag; | 204 static const int _table1_##tag = tag; |
| 205 ICETYPE_TABLE; | 205 ICETYPE_TABLE; |
| 206 #undef X | 206 #undef X |
| 207 // Define a set of constants based on low-level table entries, | 207 // Define a set of constants based on low-level table entries, |
| 208 // and ensure the table entry keys are consistent. | 208 // and ensure the table entry keys are consistent. |
| 209 #define X(tag, elementty, cvt, sdss, pack, width) \ | 209 #define X(tag, elementty, cvt, sdss, pack, width) \ |
| 210 static const int _table2_##tag = _tmp_##tag; \ | 210 static const int _table2_##tag = _tmp_##tag; \ |
| 211 STATIC_ASSERT(_table1_##tag == _table2_##tag); | 211 STATIC_ASSERT(_table1_##tag == _table2_##tag); |
| 212 ICETYPEX8632_TABLE; | 212 ICETYPEX8632_TABLE; |
| 213 #undef X | 213 #undef X |
| 214 // Repeat the static asserts with respect to the high-level | 214 // Repeat the static asserts with respect to the high-level |
| 215 // table entries in case the high-level table has extra entries. | 215 // table entries in case the high-level table has extra entries. |
| 216 #define X(tag, size, align, elts, elty, str) \ | 216 #define X(tag, size, align, elts, elty, str, flags) \ |
|
jvoung (off chromium)
2014/07/22 18:40:18
same
Karl
2014/07/23 20:22:20
Done.
| |
| 217 STATIC_ASSERT(_table1_##tag == _table2_##tag); | 217 STATIC_ASSERT(_table1_##tag == _table2_##tag); |
| 218 ICETYPE_TABLE; | 218 ICETYPE_TABLE; |
| 219 #undef X | 219 #undef X |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // end of anonymous namespace | 223 } // end of anonymous namespace |
| 224 | 224 |
| 225 TargetX8632::TargetX8632(Cfg *Func) | 225 TargetX8632::TargetX8632(Cfg *Func) |
| 226 : TargetLowering(Func), IsEbpBasedFrame(false), FrameSizeLocals(0), | 226 : TargetLowering(Func), IsEbpBasedFrame(false), FrameSizeLocals(0), |
| (...skipping 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3717 for (SizeT i = 0; i < Size; ++i) { | 3717 for (SizeT i = 0; i < Size; ++i) { |
| 3718 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; | 3718 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; |
| 3719 } | 3719 } |
| 3720 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; | 3720 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; |
| 3721 } | 3721 } |
| 3722 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName | 3722 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName |
| 3723 << "\n"; | 3723 << "\n"; |
| 3724 } | 3724 } |
| 3725 | 3725 |
| 3726 } // end of namespace Ice | 3726 } // end of namespace Ice |
| OLD | NEW |