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; |