Bug 985876 - Follow-up: Fix non-unified builds on a CLOSED TREE. no_r

This commit is contained in:
Sean Stangl 2014-04-04 15:39:53 -07:00
Родитель 07a2a8dc5d
Коммит bd7da29ce3
4 изменённых файлов: 44 добавлений и 27 удалений

Просмотреть файл

@ -13,6 +13,7 @@
#include "jit/arm/Simulator-arm.h"
#include "jit/Bailouts.h"
#include "jit/BaselineFrame.h"
#include "jit/IonFrames.h"
#include "jit/MoveEmitter.h"
using namespace js;

Просмотреть файл

@ -12,6 +12,7 @@
#include "jit/Bailouts.h"
#include "jit/BaselineFrame.h"
#include "jit/BaselineRegisters.h"
#include "jit/IonFrames.h"
#include "jit/MoveEmitter.h"
using namespace js;

Просмотреть файл

@ -6,6 +6,7 @@
#include "jit/shared/MacroAssembler-x86-shared.h"
#include "jit/IonFrames.h"
#include "jit/IonMacroAssembler.h"
using namespace js;
@ -115,3 +116,41 @@ MacroAssembler::clampDoubleToUint8(FloatRegister input, Register output)
bind(&done);
}
// Builds an exit frame on the stack, with a return address to an internal
// non-function. Returns offset to be passed to markSafepointAt().
bool
MacroAssemblerX86Shared::buildFakeExitFrame(const Register &scratch, uint32_t *offset)
{
mozilla::DebugOnly<uint32_t> initialDepth = framePushed();
CodeLabel cl;
mov(cl.dest(), scratch);
uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS);
Push(Imm32(descriptor));
Push(scratch);
bind(cl.src());
*offset = currentOffset();
JS_ASSERT(framePushed() == initialDepth + IonExitFrameLayout::Size());
return addCodeLabel(cl);
}
void
MacroAssemblerX86Shared::callWithExitFrame(JitCode *target)
{
uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS);
Push(Imm32(descriptor));
call(target);
}
bool
MacroAssemblerX86Shared::buildOOLFakeExitFrame(void *fakeReturnAddr)
{
uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS);
Push(Imm32(descriptor));
Push(ImmPtr(fakeReturnAddr));
return true;
}

Просмотреть файл

@ -682,28 +682,9 @@ class MacroAssemblerX86Shared : public Assembler
// Builds an exit frame on the stack, with a return address to an internal
// non-function. Returns offset to be passed to markSafepointAt().
bool buildFakeExitFrame(const Register &scratch, uint32_t *offset) {
mozilla::DebugOnly<uint32_t> initialDepth = framePushed();
bool buildFakeExitFrame(const Register &scratch, uint32_t *offset);
void callWithExitFrame(JitCode *target);
CodeLabel cl;
mov(cl.dest(), scratch);
uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS);
Push(Imm32(descriptor));
Push(scratch);
bind(cl.src());
*offset = currentOffset();
JS_ASSERT(framePushed() == initialDepth + IonExitFrameLayout::Size());
return addCodeLabel(cl);
}
void callWithExitFrame(JitCode *target) {
uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS);
Push(Imm32(descriptor));
call(target);
}
void callIon(const Register &callee) {
call(callee);
}
@ -721,12 +702,7 @@ class MacroAssemblerX86Shared : public Assembler
}
protected:
bool buildOOLFakeExitFrame(void *fakeReturnAddr) {
uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS);
Push(Imm32(descriptor));
Push(ImmPtr(fakeReturnAddr));
return true;
}
bool buildOOLFakeExitFrame(void *fakeReturnAddr);
};
} // namespace jit