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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 413393005: Subzero: Make Ice::Ostream a typedef for llvm::raw_ostream. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTypes.h » ('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/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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // The maximum number of arguments to pass in XMM registers 121 // The maximum number of arguments to pass in XMM registers
122 const unsigned X86_MAX_XMM_ARGS = 4; 122 const unsigned X86_MAX_XMM_ARGS = 4;
123 // The number of bits in a byte 123 // The number of bits in a byte
124 const unsigned X86_CHAR_BIT = 8; 124 const unsigned X86_CHAR_BIT = 8;
125 125
126 // Return a string representation of the type that is suitable for use 126 // Return a string representation of the type that is suitable for use
127 // in an identifier. 127 // in an identifier.
128 IceString typeIdentString(const Type Ty) { 128 IceString typeIdentString(const Type Ty) {
129 IceString Str; 129 IceString Str;
130 llvm::raw_string_ostream BaseOS(Str); 130 llvm::raw_string_ostream BaseOS(Str);
131 Ostream OS(&BaseOS);
132 if (isVectorType(Ty)) { 131 if (isVectorType(Ty)) {
133 OS << "v" << typeNumElements(Ty) << typeElementType(Ty); 132 BaseOS << "v" << typeNumElements(Ty) << typeElementType(Ty);
134 } else { 133 } else {
135 OS << Ty; 134 BaseOS << Ty;
136 } 135 }
137 return BaseOS.str(); 136 return BaseOS.str();
138 } 137 }
139 138
140 // In some cases, there are x-macros tables for both high-level and 139 // In some cases, there are x-macros tables for both high-level and
141 // low-level instructions/operands that use the same enum key value. 140 // low-level instructions/operands that use the same enum key value.
142 // The tables are kept separate to maintain a proper separation 141 // The tables are kept separate to maintain a proper separation
143 // between abstraction layers. There is a risk that the tables 142 // between abstraction layers. There is a risk that the tables
144 // could get out of sync if enum values are reordered or if entries 143 // could get out of sync if enum values are reordered or if entries
145 // are added or deleted. This dummy function uses static_assert to 144 // are added or deleted. This dummy function uses static_assert to
(...skipping 3864 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 for (SizeT i = 0; i < Size; ++i) { 4009 for (SizeT i = 0; i < Size; ++i) {
4011 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; 4010 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n";
4012 } 4011 }
4013 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; 4012 Str << "\t.size\t" << MangledName << ", " << Size << "\n";
4014 } 4013 }
4015 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName 4014 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName
4016 << "\n"; 4015 << "\n";
4017 } 4016 }
4018 4017
4019 } // end of namespace Ice 4018 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698