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

Unified Diff: src/IceTargetLoweringX8632.h

Issue 358013003: Subzero: Partial implementation of global initializers. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: After rebasing from laster master Created 6 years, 6 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/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.h
diff --git a/src/IceTargetLoweringX8632.h b/src/IceTargetLoweringX8632.h
index 972b29f7b4fecca3405abf3fe33c3b1f21c5e0f6..521c36e49e691386ff9dd8b4bc020434b84d3efc 100644
--- a/src/IceTargetLoweringX8632.h
+++ b/src/IceTargetLoweringX8632.h
@@ -109,10 +109,13 @@ protected:
Legal_Reg = 1 << 0, // physical register, not stack location
Legal_Imm = 1 << 1,
Legal_Mem = 1 << 2, // includes [eax+4*ecx] as well as [esp+12]
+ // TODO(stichnot): LEAHACK: remove Legal_Reloc once a proper
+ // emitter is used.
+ Legal_Reloc = 1 << 3,
Legal_All = ~Legal_None
};
typedef uint32_t LegalMask;
- Operand *legalize(Operand *From, LegalMask Allowed = Legal_All,
+ Operand *legalize(Operand *From, LegalMask Allowed = Legal_All & ~Legal_Reloc,
bool AllowOverlap = false,
int32_t RegNum = Variable::NoRegister);
Variable *legalizeToVar(Operand *From, bool AllowOverlap = false,
@@ -291,6 +294,25 @@ private:
template <typename T> void emitConstantPool() const;
};
+class TargetGlobalInitX8632 : public TargetGlobalInitLowering {
+public:
+ static TargetGlobalInitLowering *create(GlobalContext *Ctx) {
+ return new TargetGlobalInitX8632(Ctx);
+ }
+ virtual void lower(const IceString &Name, SizeT Align, bool IsInternal,
+ bool IsConst, bool IsZeroInitializer, SizeT Size,
+ const char *Data, bool DisableTranslation);
+
+protected:
+ TargetGlobalInitX8632(GlobalContext *Ctx);
+
+private:
+ TargetGlobalInitX8632(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION;
+ TargetGlobalInitX8632 &
+ operator=(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION;
+ virtual ~TargetGlobalInitX8632() {}
+};
+
template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698