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

Side by Side Diff: src/IceOperand.h

Issue 1848303003: Simplify references to command line flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 8 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/IceMangling.cpp ('k') | src/IceOperand.cpp » ('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/IceOperand.h - High-level operands -----------*- C++ -*-===// 1 //===- subzero/src/IceOperand.h - High-level operands -----------*- C++ -*-===//
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 for (unsigned i = 0; i < sizeof(Value); ++i) { 217 for (unsigned i = 0; i < sizeof(Value); ++i) {
218 constexpr unsigned HexWidthChars = 2; 218 constexpr unsigned HexWidthChars = 2;
219 unsigned Offset = sizeof(Value) - 1 - i; 219 unsigned Offset = sizeof(Value) - 1 - i;
220 Str << llvm::format_hex_no_prefix( 220 Str << llvm::format_hex_no_prefix(
221 *(Offset + (const unsigned char *)&Value), HexWidthChars); 221 *(Offset + (const unsigned char *)&Value), HexWidthChars);
222 } 222 }
223 // For a floating-point value in DecorateAsm mode, also append the value in 223 // For a floating-point value in DecorateAsm mode, also append the value in
224 // human-readable sprintf form, changing '+' to 'p' and '-' to 'm' to 224 // human-readable sprintf form, changing '+' to 'p' and '-' to 'm' to
225 // maintain valid asm labels. 225 // maintain valid asm labels.
226 if (std::is_floating_point<PrimType>::value && !BuildDefs::minimal() && 226 if (std::is_floating_point<PrimType>::value && !BuildDefs::minimal() &&
227 GlobalContext::getFlags().getDecorateAsm()) { 227 getFlags().getDecorateAsm()) {
228 char Buf[30]; 228 char Buf[30];
229 snprintf(Buf, llvm::array_lengthof(Buf), "$%g", (double)Value); 229 snprintf(Buf, llvm::array_lengthof(Buf), "$%g", (double)Value);
230 for (unsigned i = 0; i < llvm::array_lengthof(Buf) && Buf[i]; ++i) { 230 for (unsigned i = 0; i < llvm::array_lengthof(Buf) && Buf[i]; ++i) {
231 if (Buf[i] == '-') 231 if (Buf[i] == '-')
232 Buf[i] = 'm'; 232 Buf[i] = 'm';
233 else if (Buf[i] == '+') 233 else if (Buf[i] == '+')
234 Buf[i] = 'p'; 234 Buf[i] = 'p';
235 } 235 }
236 Str << Buf; 236 Str << Buf;
237 } 237 }
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 private: 967 private:
968 const Cfg *Func; 968 const Cfg *Func;
969 MetadataKind Kind; 969 MetadataKind Kind;
970 CfgVector<VariableTracking> Metadata; 970 CfgVector<VariableTracking> Metadata;
971 const static InstDefList NoDefinitions; 971 const static InstDefList NoDefinitions;
972 }; 972 };
973 973
974 } // end of namespace Ice 974 } // end of namespace Ice
975 975
976 #endif // SUBZERO_SRC_ICEOPERAND_H 976 #endif // SUBZERO_SRC_ICEOPERAND_H
OLDNEW
« no previous file with comments | « src/IceMangling.cpp ('k') | src/IceOperand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698