| 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 // Use memcpy() to copy bits from Value into RawValue in a way that avoids | 750 // Use memcpy() to copy bits from Value into RawValue in a way that avoids |
| 751 // breaking strict-aliasing rules. | 751 // breaking strict-aliasing rules. |
| 752 typename T::PrimitiveIntType RawValue; | 752 typename T::PrimitiveIntType RawValue; |
| 753 memcpy(&RawValue, &Value, sizeof(Value)); | 753 memcpy(&RawValue, &Value, sizeof(Value)); |
| 754 char buf[30]; | 754 char buf[30]; |
| 755 int CharsPrinted = | 755 int CharsPrinted = |
| 756 snprintf(buf, llvm::array_lengthof(buf), T::PrintfString, RawValue); | 756 snprintf(buf, llvm::array_lengthof(buf), T::PrintfString, RawValue); |
| 757 assert(CharsPrinted >= 0 && | 757 assert(CharsPrinted >= 0 && |
| 758 (size_t)CharsPrinted < llvm::array_lengthof(buf)); | 758 (size_t)CharsPrinted < llvm::array_lengthof(buf)); |
| 759 (void)CharsPrinted; // avoid warnings if asserts are disabled | 759 (void)CharsPrinted; // avoid warnings if asserts are disabled |
| 760 Const->emitPoolLabel(Str); | 760 Const->emitPoolLabel(Str, Ctx); |
| 761 Str << ":\n\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " " | 761 Str << ":\n\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " " |
| 762 << Value << "\n"; | 762 << Value << "\n"; |
| 763 } | 763 } |
| 764 } | 764 } |
| 765 | 765 |
| 766 void TargetDataX8632::lowerConstants() { | 766 void TargetDataX8632::lowerConstants() { |
| 767 if (Ctx->getFlags().getDisableTranslation()) | 767 if (Ctx->getFlags().getDisableTranslation()) |
| 768 return; | 768 return; |
| 769 // No need to emit constants from the int pool since (for x86) they are | 769 // No need to emit constants from the int pool since (for x86) they are |
| 770 // embedded as immediates in the instructions, just emit float/double. | 770 // embedded as immediates in the instructions, just emit float/double. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 // case the high-level table has extra entries. | 944 // case the high-level table has extra entries. |
| 945 #define X(tag, sizeLog2, align, elts, elty, str) \ | 945 #define X(tag, sizeLog2, align, elts, elty, str) \ |
| 946 static_assert(_table1_##tag == _table2_##tag, \ | 946 static_assert(_table1_##tag == _table2_##tag, \ |
| 947 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); | 947 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); |
| 948 ICETYPE_TABLE | 948 ICETYPE_TABLE |
| 949 #undef X | 949 #undef X |
| 950 } // end of namespace dummy3 | 950 } // end of namespace dummy3 |
| 951 } // end of anonymous namespace | 951 } // end of anonymous namespace |
| 952 | 952 |
| 953 } // end of namespace Ice | 953 } // end of namespace Ice |
| OLD | NEW |