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

Unified Diff: src/IceFixups.cpp

Issue 1027593002: Subzero: Support non-IRT immediate calls with -filetype=iasm. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use --defsym= in both places for consistency Created 5 years, 9 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 | « src/IceFixups.h ('k') | src/assembler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceFixups.cpp
diff --git a/src/IceFixups.cpp b/src/IceFixups.cpp
index 05559c56fe8462ccc877be426dd4bf3bfa1ccf12..b6adf8450282032cc94fab514f43139f6f4939b5 100644
--- a/src/IceFixups.cpp
+++ b/src/IceFixups.cpp
@@ -46,13 +46,15 @@ IceString AssemblerFixup::symbol(const GlobalContext *Ctx) const {
return Str.str();
}
-void AssemblerFixup::emit(GlobalContext *Ctx) const {
+void AssemblerFixup::emit(GlobalContext *Ctx, RelocOffsetT BaseOffset) const {
+ if (!ALLOW_DUMP)
+ return;
Ostream &Str = Ctx->getStrEmit();
- // TODO(jvoung): Not yet clear how to emit a relocation against
- // the null symbol.
- assert(!isNullSymbol());
- Str << symbol(Ctx);
- RelocOffsetT Offset = offset();
+ if (isNullSymbol())
+ Str << "__Sz_AbsoluteZero";
+ else
+ Str << symbol(Ctx);
+ RelocOffsetT Offset = offset() + BaseOffset;
if (Offset)
Str << " + " << Offset;
}
« no previous file with comments | « src/IceFixups.h ('k') | src/assembler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698