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

Unified Diff: src/IceFixups.h

Issue 1669443002: Subzero. Uses fixups to calculate addend to relocations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 11 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
Index: src/IceFixups.h
diff --git a/src/IceFixups.h b/src/IceFixups.h
index 265b8505af788870040bda7357a21cb97f075b26..fb8a164eadc70306e32e27b317a21f99c9a34f11 100644
--- a/src/IceFixups.h
+++ b/src/IceFixups.h
@@ -54,10 +54,15 @@ public:
void set_value(const Constant *Value) { value_ = Value; }
void set_addend(RelocOffsetT Addend) { addend_ = Addend; }
+ RelocOffsetT get_addend() const { return addend_; }
/// Emits fixup, then returns the number of bytes to skip.
virtual size_t emit(GlobalContext *Ctx, const Assembler &Asm) const;
+ /// Emits offset() (little endian) in position_. If your fixup requires
+ /// something smarter, you must create your own fixup type.
+ virtual void emitOffset(Assembler *Asm) const;
+
private:
bool position_was_set_ = false;
intptr_t position_ = 0;

Powered by Google App Engine
This is Rietveld 408576698