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

Unified Diff: src/IceFixups.h

Issue 1616103002: Subzero. X8664. Enables RIP-based addressing mode. (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
« no previous file with comments | « src/IceAssemblerX86BaseImpl.h ('k') | src/IceFixups.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceFixups.h
diff --git a/src/IceFixups.h b/src/IceFixups.h
index aeb0fb00539f7349f8ee39d9186240073a4779d8..265b8505af788870040bda7357a21cb97f075b26 100644
--- a/src/IceFixups.h
+++ b/src/IceFixups.h
@@ -25,7 +25,7 @@ using FixupKind = uint32_t;
/// Assembler fixups are positions in generated code/data that hold relocation
/// information that needs to be processed before finalizing the code/data.
-struct AssemblerFixup {
+class AssemblerFixup {
AssemblerFixup &operator=(const AssemblerFixup &) = delete;
public:
@@ -53,6 +53,8 @@ public:
void set_value(const Constant *Value) { value_ = Value; }
+ void set_addend(RelocOffsetT Addend) { addend_ = Addend; }
+
/// Emits fixup, then returns the number of bytes to skip.
virtual size_t emit(GlobalContext *Ctx, const Assembler &Asm) const;
@@ -61,6 +63,9 @@ private:
intptr_t position_ = 0;
FixupKind kind_ = 0;
const Constant *value_ = nullptr;
+ // An offset addend to the fixup offset (as returned by offset()), in case the
+ // assembler needs to adjust it.
+ RelocOffsetT addend_ = 0;
};
/// Extends a fixup to be textual. That is, it emits text instead of a sequence
« no previous file with comments | « src/IceAssemblerX86BaseImpl.h ('k') | src/IceFixups.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698