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

Side by Side Diff: src/IceTargetLoweringX8664.cpp

Issue 1521863002: Subzero: Fix mid-line comments when using -asm-verbose . (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix lit tests Created 5 years 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
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/nop-insertion.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/nop-insertion.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698