| OLD | NEW |
| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 // breaking strict-aliasing rules. | 789 // breaking strict-aliasing rules. |
| 790 typename T::PrimitiveIntType RawValue; | 790 typename T::PrimitiveIntType RawValue; |
| 791 memcpy(&RawValue, &Value, sizeof(Value)); | 791 memcpy(&RawValue, &Value, sizeof(Value)); |
| 792 char buf[30]; | 792 char buf[30]; |
| 793 int CharsPrinted = | 793 int CharsPrinted = |
| 794 snprintf(buf, llvm::array_lengthof(buf), T::PrintfString, RawValue); | 794 snprintf(buf, llvm::array_lengthof(buf), T::PrintfString, RawValue); |
| 795 assert(CharsPrinted >= 0 && | 795 assert(CharsPrinted >= 0 && |
| 796 (size_t)CharsPrinted < llvm::array_lengthof(buf)); | 796 (size_t)CharsPrinted < llvm::array_lengthof(buf)); |
| 797 (void)CharsPrinted; // avoid warnings if asserts are disabled | 797 (void)CharsPrinted; // avoid warnings if asserts are disabled |
| 798 Const->emitPoolLabel(Str, Ctx); | 798 Const->emitPoolLabel(Str, Ctx); |
| 799 Str << ":\n\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " " | 799 Str << ":\n\t" << T::AsmTag << "\t" << buf << "\t/* " << T::TypeName << " " |
| 800 << Value << "\n"; | 800 << Value << " */\n"; |
| 801 } | 801 } |
| 802 } | 802 } |
| 803 | 803 |
| 804 void TargetDataX8664::lowerConstants() { | 804 void TargetDataX8664::lowerConstants() { |
| 805 if (Ctx->getFlags().getDisableTranslation()) | 805 if (Ctx->getFlags().getDisableTranslation()) |
| 806 return; | 806 return; |
| 807 // No need to emit constants from the int pool since (for x86) they are | 807 // No need to emit constants from the int pool since (for x86) they are |
| 808 // embedded as immediates in the instructions, just emit float/double. | 808 // embedded as immediates in the instructions, just emit float/double. |
| 809 switch (Ctx->getFlags().getOutFileType()) { | 809 switch (Ctx->getFlags().getOutFileType()) { |
| 810 case FT_Elf: { | 810 case FT_Elf: { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 // case the high-level table has extra entries. | 979 // case the high-level table has extra entries. |
| 980 #define X(tag, sizeLog2, align, elts, elty, str) \ | 980 #define X(tag, sizeLog2, align, elts, elty, str) \ |
| 981 static_assert(_table1_##tag == _table2_##tag, \ | 981 static_assert(_table1_##tag == _table2_##tag, \ |
| 982 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); | 982 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); |
| 983 ICETYPE_TABLE | 983 ICETYPE_TABLE |
| 984 #undef X | 984 #undef X |
| 985 } // end of namespace dummy3 | 985 } // end of namespace dummy3 |
| 986 } // end of anonymous namespace | 986 } // end of anonymous namespace |
| 987 | 987 |
| 988 } // end of namespace Ice | 988 } // end of namespace Ice |
| OLD | NEW |