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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 673783002: Subzero: Improve debugging controls, plus minor refactoring. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 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/IceOperand.cpp ('k') | src/IceTranslator.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/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 4433 matching lines...) Expand 10 before | Expand all | Expand 10 after
4444 4444
4445 void TargetGlobalInitX8632::lower(const VariableDeclaration &Var) { 4445 void TargetGlobalInitX8632::lower(const VariableDeclaration &Var) {
4446 4446
4447 Ostream &Str = Ctx->getStrEmit(); 4447 Ostream &Str = Ctx->getStrEmit();
4448 4448
4449 const VariableDeclaration::InitializerListType &Initializers = 4449 const VariableDeclaration::InitializerListType &Initializers =
4450 Var.getInitializers(); 4450 Var.getInitializers();
4451 4451
4452 // If external and not initialized, this must be a cross test. 4452 // If external and not initialized, this must be a cross test.
4453 // Don't generate a declaration for such cases. 4453 // Don't generate a declaration for such cases.
4454 bool IsExternal = Var.isExternal(); 4454 bool IsExternal = Var.isExternal() || Ctx->getFlags().DisableInternal;
4455 if (IsExternal && !Var.hasInitializer()) return; 4455 if (IsExternal && !Var.hasInitializer()) return;
4456 4456
4457 bool HasNonzeroInitializer = Var.hasNonzeroInitializer(); 4457 bool HasNonzeroInitializer = Var.hasNonzeroInitializer();
4458 bool IsConstant = Var.getIsConstant(); 4458 bool IsConstant = Var.getIsConstant();
4459 uint32_t Align = Var.getAlignment(); 4459 uint32_t Align = Var.getAlignment();
4460 SizeT Size = Var.getNumBytes(); 4460 SizeT Size = Var.getNumBytes();
4461 IceString MangledName = Var.mangleName(Ctx); 4461 IceString MangledName = Var.mangleName(Ctx);
4462 IceString SectionSuffix = ""; 4462 IceString SectionSuffix = "";
4463 if (Ctx->getFlags().DataSections) 4463 if (Ctx->getFlags().DataSections)
4464 SectionSuffix = "." + MangledName; 4464 SectionSuffix = "." + MangledName;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
4529 } else if (IsConstant || IsExternal) 4529 } else if (IsConstant || IsExternal)
4530 Str << "\t.zero\t" << Size << "\n"; 4530 Str << "\t.zero\t" << Size << "\n";
4531 // Size is part of .comm. 4531 // Size is part of .comm.
4532 4532
4533 if (IsConstant || HasNonzeroInitializer || IsExternal) 4533 if (IsConstant || HasNonzeroInitializer || IsExternal)
4534 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; 4534 Str << "\t.size\t" << MangledName << ", " << Size << "\n";
4535 // Size is part of .comm. 4535 // Size is part of .comm.
4536 } 4536 }
4537 4537
4538 } // end of namespace Ice 4538 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.cpp ('k') | src/IceTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698