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

Unified Diff: src/IceGlobalInits.h

Issue 1665263003: Subzero. ARM32. Nonsfi. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 10 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/IceELFObjectWriter.cpp ('k') | src/IceInstARM32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalInits.h
diff --git a/src/IceGlobalInits.h b/src/IceGlobalInits.h
index 902e3352a532c826d1c157758895c9d483b60d09..a11153648fb0d4c9a716d773e38947d15d84c9fb 100644
--- a/src/IceGlobalInits.h
+++ b/src/IceGlobalInits.h
@@ -20,6 +20,7 @@
#define SUBZERO_SRC_ICEGLOBALINITS_H
#include "IceDefs.h"
+#include "IceFixups.h"
#include "IceGlobalContext.h"
#include "IceIntrinsics.h"
#include "IceOperand.h"
@@ -321,7 +322,16 @@ public:
static std::unique_ptr<RelocInitializer>
create(const GlobalDeclaration *Declaration,
const RelocOffsetArray &OffsetExpr) {
- return makeUnique<RelocInitializer>(Declaration, OffsetExpr);
+ constexpr bool NoFixup = false;
+ return makeUnique<RelocInitializer>(Declaration, OffsetExpr, NoFixup);
+ }
+
+ static std::unique_ptr<RelocInitializer>
+ create(const GlobalDeclaration *Declaration,
+ const RelocOffsetArray &OffsetExpr, FixupKind Fixup) {
+ constexpr bool HasFixup = true;
+ return makeUnique<RelocInitializer>(Declaration, OffsetExpr, HasFixup,
+ Fixup);
}
RelocOffsetT getOffset() const {
@@ -332,6 +342,12 @@ public:
return Offset;
}
+ bool hasFixup() const { return HasFixup; }
+ FixupKind getFixup() const {
+ assert(HasFixup);
+ return Fixup;
+ }
+
const GlobalDeclaration *getDeclaration() const { return Declaration; }
SizeT getNumBytes() const final { return RelocAddrSize; }
void dump(GlobalContext *Ctx, Ostream &Stream) const final;
@@ -344,14 +360,17 @@ public:
ENABLE_MAKE_UNIQUE;
RelocInitializer(const GlobalDeclaration *Declaration,
- const RelocOffsetArray &OffsetExpr)
+ const RelocOffsetArray &OffsetExpr, bool HasFixup,
+ FixupKind Fixup = 0)
: Initializer(RelocInitializerKind),
Declaration(Declaration), // The global declaration used in the reloc.
- OffsetExpr(OffsetExpr) {}
+ OffsetExpr(OffsetExpr), HasFixup(HasFixup), Fixup(Fixup) {}
const GlobalDeclaration *Declaration;
/// The offset to add to the relocation.
const RelocOffsetArray OffsetExpr;
+ const bool HasFixup = false;
+ const FixupKind Fixup = 0;
};
/// Models the list of initializers.
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698