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

Unified Diff: src/IceFixups.cpp

Issue 1417173003: Fix ARM integrated assembler to be able to compile spec2k examples. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceFixups.h ('k') | src/IceInstARM32.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 7b2025ec178467a4814bbb204faf2485a5e40774..ddc79796ac72dd483badb56de1bc6148ae207342 100644
--- a/src/IceFixups.cpp
+++ b/src/IceFixups.cpp
@@ -48,8 +48,7 @@ IceString AssemblerFixup::symbol(const GlobalContext *Ctx) const {
return Str.str();
}
-size_t AssemblerFixup::emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset,
- bool IsPCRel) const {
+size_t AssemblerFixup::emit(GlobalContext *Ctx, const Assembler &Asm) const {
static constexpr const size_t FixupSize = 4;
if (!BuildDefs::dump())
return FixupSize;
@@ -59,23 +58,20 @@ size_t AssemblerFixup::emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset,
Str << "__Sz_AbsoluteZero";
else
Str << symbol(Ctx);
- RelocOffsetT Offset = OverrideOffset;
+ RelocOffsetT Offset = Asm.load<RelocOffsetT>(position());
if (Offset)
Str << " + " << Offset;
// For PCRel fixups, we write the pc-offset from a symbol into the Buffer
// (e.g., -4), but we don't represent that in the fixup's offset. Otherwise
// the fixup holds the true offset, and so does the Buffer. Just load the
// offset from the buffer.
- if (IsPCRel)
+ if (Asm.fixupIsPCRel(kind()))
Str << " - .";
Str << "\n";
return FixupSize;
}
-size_t AssemblerTextFixup::emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset,
- bool IsPCRel) const {
- (void)OverrideOffset;
- (void)IsPCRel;
+size_t AssemblerTextFixup::emit(GlobalContext *Ctx, const Assembler &) const {
Ctx->getStrEmit() << Message << "\n";
return NumBytes;
}
« no previous file with comments | « src/IceFixups.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698