Fix loading of this value on 32-bit
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 15 Apr 2013 09:25:09 +0000 (11:25 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Mon, 15 Apr 2013 09:25:20 +0000 (11:25 +0200)
Make sure to copy all 64-bits out of ctx->thisObject

Change-Id: I9984f83f5f238177e75e469c574ef49ee5bb0665
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/v4/qv4isel_masm.cpp

index 97d3bea..a9d41ca 100644 (file)
@@ -824,8 +824,12 @@ void InstructionSelection::callValue(V4IR::Temp *value, V4IR::ExprList *args, V4
 
 void InstructionSelection::loadThisObject(V4IR::Temp *temp)
 {
+#if defined(VALUE_FITS_IN_REGISTER)
     _as->loadPtr(Pointer(Assembler::ContextRegister, offsetof(ExecutionContext, thisObject)), Assembler::ReturnValueRegister);
     _as->storeArgument(Assembler::ReturnValueRegister, temp);
+#else
+    _as->copyValue(temp, Pointer(Assembler::ContextRegister, offsetof(ExecutionContext, thisObject)));
+#endif
 }
 
 void InstructionSelection::loadConst(V4IR::Const *sourceConst, V4IR::Temp *targetTemp)