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

Side by Side Diff: src/IceCfg.cpp

Issue 1136793002: Handle ARM "ret void" and function alignment with proper padding. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: note moved to cpp Created 5 years, 7 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 | « pydir/run-pnacl-sz.py ('k') | src/IceClFlags.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/IceCfg.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
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 Cfg class, including constant pool 10 // This file implements the Cfg class, including constant pool
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 void Cfg::emitTextHeader(const IceString &MangledName, GlobalContext *Ctx, 457 void Cfg::emitTextHeader(const IceString &MangledName, GlobalContext *Ctx,
458 const Assembler *Asm) { 458 const Assembler *Asm) {
459 if (!ALLOW_DUMP) 459 if (!ALLOW_DUMP)
460 return; 460 return;
461 Ostream &Str = Ctx->getStrEmit(); 461 Ostream &Str = Ctx->getStrEmit();
462 Str << "\t.text\n"; 462 Str << "\t.text\n";
463 if (Ctx->getFlags().getFunctionSections()) 463 if (Ctx->getFlags().getFunctionSections())
464 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; 464 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n";
465 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) { 465 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) {
466 Str << "\t.globl\t" << MangledName << "\n"; 466 Str << "\t.globl\t" << MangledName << "\n";
467 Str << "\t.type\t" << MangledName << ",@function\n"; 467 Str << "\t.type\t" << MangledName << ",%function\n";
468 } 468 }
469 Str << "\t.p2align " << Asm->getBundleAlignLog2Bytes() << ",0x"; 469 Str << "\t" << Asm->getNonExecPadDirective() << " "
470 << Asm->getBundleAlignLog2Bytes() << ",0x";
470 for (uint8_t I : Asm->getNonExecBundlePadding()) 471 for (uint8_t I : Asm->getNonExecBundlePadding())
471 Str.write_hex(I); 472 Str.write_hex(I);
472 Str << "\n"; 473 Str << "\n";
473 Str << MangledName << ":\n"; 474 Str << MangledName << ":\n";
474 } 475 }
475 476
476 void Cfg::emit() { 477 void Cfg::emit() {
477 if (!ALLOW_DUMP) 478 if (!ALLOW_DUMP)
478 return; 479 return;
479 TimerMarker T(TimerStack::TT_emit, this); 480 TimerMarker T(TimerStack::TT_emit, this);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 542 }
542 } 543 }
543 // Print each basic block 544 // Print each basic block
544 for (CfgNode *Node : Nodes) 545 for (CfgNode *Node : Nodes)
545 Node->dump(this); 546 Node->dump(this);
546 if (isVerbose(IceV_Instructions)) 547 if (isVerbose(IceV_Instructions))
547 Str << "}\n"; 548 Str << "}\n";
548 } 549 }
549 550
550 } // end of namespace Ice 551 } // end of namespace Ice
OLDNEW
« no previous file with comments | « pydir/run-pnacl-sz.py ('k') | src/IceClFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698