From dcfb63f566de0dbc6ab22073042a83e6afa81ebb Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 10 Oct 2012 13:10:07 +0200 Subject: [PATCH] Make it really work for 64 bit. crypto.js passes now :) --- qv4isel_masm.cpp | 6 ++++++ qv4isel_masm_p.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp index 7fffae7..cbf6f70 100644 --- a/qv4isel_masm.cpp +++ b/qv4isel_masm.cpp @@ -58,7 +58,13 @@ void InstructionSelection::operator()(IR::Function *function) enterStandardStackFrame(locals); push(ContextRegister); +#if CPU(X86) loadPtr(addressForArgument(0), ContextRegister); +#elif CPU(X86_64) + move(RegisterArgument1, ContextRegister); +#else + assert(!"TODO"); +#endif foreach (IR::BasicBlock *block, _function->basicBlocks) { _block = block; diff --git a/qv4isel_masm_p.h b/qv4isel_masm_p.h index 833ceb1..7ac8df6 100644 --- a/qv4isel_masm_p.h +++ b/qv4isel_masm_p.h @@ -69,7 +69,7 @@ protected: }; #if CPU(X86) || CPU(X86_64) - void enterStandardStackFrame(int locals) + void enterStandardStackFrame(quintptr locals) { push(StackFrameRegister); move(StackPointerRegister, StackFrameRegister); @@ -77,7 +77,7 @@ protected: subPtr(TrustedImmPtr((void*)locals), StackPointerRegister); push(CalleeSavedGpr); } - void leaveStandardStackFrame(int locals) + void leaveStandardStackFrame(quintptr locals) { pop(CalleeSavedGpr); // #### -- 2.7.4