Make sure to calculate the frame size when entering the function the
same way as when leaving it, otherwise the stack pointer adjustment
is wrong and we get nice crashes.
Change-Id: I19f953c3243cf6f1448ad95cad7587fbdca2ae6d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
loadPtr(Address(StackPointerRegister, i * sizeof(void*)), calleeSavedRegisters[i]);
// space for the locals and the callee saved registers
- int32_t frameSize = locals * sizeof(QQmlJS::VM::Value) + sizeof(void*);
+ int32_t frameSize = locals * sizeof(QQmlJS::VM::Value) + sizeof(void*) * calleeSavedRegisterCount;
#if CPU(X86) || CPU(X86_64)
frameSize = (frameSize + 15) & ~15; // align on 16 byte boundaries for MMX
#endif