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

Unified Diff: src/IceCfg.cpp

Issue 515993002: Align function starts to target-specific bundle alignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: uint8_t 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 6fe7eb05830b435bedb9cc7fd98caf2fc5b80eb3..d699ef50bf7a207eb17729070c99fc16286d36d4 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -314,6 +314,13 @@ void Cfg::emit() {
Str << "\t.globl\t" << MangledName << "\n";
Str << "\t.type\t" << MangledName << ",@function\n";
}
+ Str << "\t.p2align " << getTarget()->getBundleAlignLog2Bytes() << ",0x";
+ llvm::ArrayRef<uint8_t> Pad = getTarget()->getNonExecBundlePadding();
+ for (llvm::ArrayRef<uint8_t>::iterator I = Pad.begin(), E = Pad.end();
+ I != E; ++I) {
+ Str.write_hex(*I);
+ }
+ Str << "\n";
for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E;
++I) {
(*I)->emit(this);
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698