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

Side by Side Diff: src/IceCfg.cpp

Issue 930733002: Subzero: Add sandboxing for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a sandboxing test. Rebase. Created 5 years, 10 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 | « no previous file | src/IceCfgNode.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/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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 if (Ctx->getFlags().getFunctionSections()) 429 if (Ctx->getFlags().getFunctionSections())
430 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; 430 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n";
431 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) { 431 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) {
432 Str << "\t.globl\t" << MangledName << "\n"; 432 Str << "\t.globl\t" << MangledName << "\n";
433 Str << "\t.type\t" << MangledName << ",@function\n"; 433 Str << "\t.type\t" << MangledName << ",@function\n";
434 } 434 }
435 Str << "\t.p2align " << Asm->getBundleAlignLog2Bytes() << ",0x"; 435 Str << "\t.p2align " << Asm->getBundleAlignLog2Bytes() << ",0x";
436 for (uint8_t I : Asm->getNonExecBundlePadding()) 436 for (uint8_t I : Asm->getNonExecBundlePadding())
437 Str.write_hex(I); 437 Str.write_hex(I);
438 Str << "\n"; 438 Str << "\n";
439 if (Ctx->getFlags().getUseSandboxing())
440 Str << "\t.bundle_align_mode " << Asm->getBundleAlignLog2Bytes() << "\n";
439 Str << MangledName << ":\n"; 441 Str << MangledName << ":\n";
440 } 442 }
441 443
442 void Cfg::emit() { 444 void Cfg::emit() {
443 if (!ALLOW_DUMP) 445 if (!ALLOW_DUMP)
444 return; 446 return;
445 TimerMarker T(TimerStack::TT_emit, this); 447 TimerMarker T(TimerStack::TT_emit, this);
446 if (Ctx->getFlags().getDecorateAsm()) { 448 if (Ctx->getFlags().getDecorateAsm()) {
447 renumberInstructions(); 449 renumberInstructions();
448 getVMetadata()->init(VMK_Uses); 450 getVMetadata()->init(VMK_Uses);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 509 }
508 } 510 }
509 // Print each basic block 511 // Print each basic block
510 for (CfgNode *Node : Nodes) 512 for (CfgNode *Node : Nodes)
511 Node->dump(this); 513 Node->dump(this);
512 if (isVerbose(IceV_Instructions)) 514 if (isVerbose(IceV_Instructions))
513 Str << "}\n"; 515 Str << "}\n";
514 } 516 }
515 517
516 } // end of namespace Ice 518 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698