mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1015180 - Move linkExitFrame to the common MacroAssembler. r=jandem
This commit is contained in:
parent
3d266c9089
commit
b1ee29f402
@ -892,6 +892,24 @@ MacroAssembler::checkInterruptFlagPar(Register tempReg, Label *fail)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save an exit frame (which must be aligned to the stack pointer) to
|
||||||
|
// PerThreadData::jitTop of the main thread.
|
||||||
|
void
|
||||||
|
MacroAssembler::linkExitFrame()
|
||||||
|
{
|
||||||
|
AbsoluteAddress jitTop(GetIonContext()->runtime->addressOfJitTop());
|
||||||
|
storePtr(StackPointer, jitTop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save an exit frame to the thread data of the current thread, given a
|
||||||
|
// register that holds a PerThreadData *.
|
||||||
|
void
|
||||||
|
MacroAssembler::linkParallelExitFrame(Register pt)
|
||||||
|
{
|
||||||
|
Address jitTop(pt, offsetof(PerThreadData, jitTop));
|
||||||
|
storePtr(StackPointer, jitTop);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ReportOverRecursed(JSContext *cx)
|
ReportOverRecursed(JSContext *cx)
|
||||||
{
|
{
|
||||||
|
@ -850,6 +850,10 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||||||
private:
|
private:
|
||||||
CodeOffsetLabel exitCodePatch_;
|
CodeOffsetLabel exitCodePatch_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void linkExitFrame();
|
||||||
|
void linkParallelExitFrame(Register pt);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void enterExitFrame(const VMFunction *f = nullptr) {
|
void enterExitFrame(const VMFunction *f = nullptr) {
|
||||||
linkExitFrame();
|
linkExitFrame();
|
||||||
|
@ -3520,20 +3520,6 @@ MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, Register base, Register index,
|
|||||||
ma_sub(base, Imm32(NUNBOX32_TYPE_OFFSET), base);
|
ma_sub(base, Imm32(NUNBOX32_TYPE_OFFSET), base);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssemblerARMCompat::linkExitFrame()
|
|
||||||
{
|
|
||||||
uint8_t *dest = (uint8_t*)GetIonContext()->runtime->addressOfJitTop();
|
|
||||||
movePtr(ImmPtr(dest), ScratchRegister);
|
|
||||||
ma_str(StackPointer, Operand(ScratchRegister, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssemblerARMCompat::linkParallelExitFrame(Register pt)
|
|
||||||
{
|
|
||||||
ma_str(StackPointer, Operand(pt, offsetof(PerThreadData, jitTop)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// ARM says that all reads of pc will return 8 higher than the
|
// ARM says that all reads of pc will return 8 higher than the
|
||||||
// address of the currently executing instruction. This means we are
|
// address of the currently executing instruction. This means we are
|
||||||
// correctly storing the address of the instruction after the call
|
// correctly storing the address of the instruction after the call
|
||||||
|
@ -1191,8 +1191,6 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||||||
ma_orr(Imm32(type), frameSizeReg);
|
ma_orr(Imm32(type), frameSizeReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void linkExitFrame();
|
|
||||||
void linkParallelExitFrame(Register pt);
|
|
||||||
void handleFailureWithHandler(void *handler);
|
void handleFailureWithHandler(void *handler);
|
||||||
void handleFailureWithHandlerTail();
|
void handleFailureWithHandlerTail();
|
||||||
|
|
||||||
|
@ -2901,20 +2901,6 @@ MacroAssemblerMIPSCompat::storeTypeTag(ImmTag tag, Register base, Register index
|
|||||||
as_sw(ScratchRegister, SecondScratchReg, TAG_OFFSET);
|
as_sw(ScratchRegister, SecondScratchReg, TAG_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssemblerMIPSCompat::linkExitFrame()
|
|
||||||
{
|
|
||||||
uint8_t *dest = (uint8_t*)GetIonContext()->runtime->addressOfJitTop();
|
|
||||||
movePtr(ImmPtr(dest), ScratchRegister);
|
|
||||||
ma_sw(StackPointer, Address(ScratchRegister, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssemblerMIPSCompat::linkParallelExitFrame(Register pt)
|
|
||||||
{
|
|
||||||
ma_sw(StackPointer, Address(pt, offsetof(PerThreadData, jitTop)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// This macrosintruction calls the ion code and pushes the return address to
|
// This macrosintruction calls the ion code and pushes the return address to
|
||||||
// the stack in the case when stack is alligned.
|
// the stack in the case when stack is alligned.
|
||||||
void
|
void
|
||||||
|
@ -889,8 +889,6 @@ public:
|
|||||||
ma_or(frameSizeReg, frameSizeReg, Imm32(type));
|
ma_or(frameSizeReg, frameSizeReg, Imm32(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
void linkExitFrame();
|
|
||||||
void linkParallelExitFrame(Register pt);
|
|
||||||
void handleFailureWithHandler(void *handler);
|
void handleFailureWithHandler(void *handler);
|
||||||
void handleFailureWithHandlerTail();
|
void handleFailureWithHandlerTail();
|
||||||
|
|
||||||
|
@ -1301,12 +1301,6 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
|||||||
orq(Imm32(type), frameSizeReg);
|
orq(Imm32(type), frameSizeReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save an exit frame (which must be aligned to the stack pointer) to
|
|
||||||
// PerThreadData::jitTop of the main thread.
|
|
||||||
void linkExitFrame() {
|
|
||||||
storePtr(StackPointer, AbsoluteAddress(GetIonContext()->runtime->addressOfJitTop()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void callWithExitFrame(JitCode *target, Register dynStack) {
|
void callWithExitFrame(JitCode *target, Register dynStack) {
|
||||||
addPtr(Imm32(framePushed()), dynStack);
|
addPtr(Imm32(framePushed()), dynStack);
|
||||||
makeFrameDescriptor(dynStack, JitFrame_IonJS);
|
makeFrameDescriptor(dynStack, JitFrame_IonJS);
|
||||||
@ -1314,12 +1308,6 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
|||||||
call(target);
|
call(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save an exit frame to the thread data of the current thread, given a
|
|
||||||
// register that holds a PerThreadData *.
|
|
||||||
void linkParallelExitFrame(Register pt) {
|
|
||||||
storePtr(StackPointer, Address(pt, offsetof(PerThreadData, jitTop)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// See CodeGeneratorX64 calls to noteAsmJSGlobalAccess.
|
// See CodeGeneratorX64 calls to noteAsmJSGlobalAccess.
|
||||||
void patchAsmJSGlobalAccess(CodeOffsetLabel patchAt, uint8_t *code, uint8_t *globalData,
|
void patchAsmJSGlobalAccess(CodeOffsetLabel patchAt, uint8_t *code, uint8_t *globalData,
|
||||||
unsigned globalDataOffset)
|
unsigned globalDataOffset)
|
||||||
|
@ -1094,12 +1094,6 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
|||||||
orl(Imm32(type), frameSizeReg);
|
orl(Imm32(type), frameSizeReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save an exit frame (which must be aligned to the stack pointer) to
|
|
||||||
// PerThreadData::jitTop of the main thread.
|
|
||||||
void linkExitFrame() {
|
|
||||||
movl(StackPointer, Operand(AbsoluteAddress(GetIonContext()->runtime->addressOfJitTop())));
|
|
||||||
}
|
|
||||||
|
|
||||||
void callWithExitFrame(JitCode *target, Register dynStack) {
|
void callWithExitFrame(JitCode *target, Register dynStack) {
|
||||||
addPtr(Imm32(framePushed()), dynStack);
|
addPtr(Imm32(framePushed()), dynStack);
|
||||||
makeFrameDescriptor(dynStack, JitFrame_IonJS);
|
makeFrameDescriptor(dynStack, JitFrame_IonJS);
|
||||||
@ -1114,12 +1108,6 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
|||||||
call(CallSiteDesc::Exit(), target);
|
call(CallSiteDesc::Exit(), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save an exit frame to the thread data of the current thread, given a
|
|
||||||
// register that holds a PerThreadData *.
|
|
||||||
void linkParallelExitFrame(Register pt) {
|
|
||||||
movl(StackPointer, Operand(pt, offsetof(PerThreadData, jitTop)));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef JSGC_GENERATIONAL
|
#ifdef JSGC_GENERATIONAL
|
||||||
void branchPtrInNurseryRange(Condition cond, Register ptr, Register temp, Label *label);
|
void branchPtrInNurseryRange(Condition cond, Register ptr, Register temp, Label *label);
|
||||||
void branchValueIsNurseryObject(Condition cond, ValueOperand value, Register temp, Label *label);
|
void branchValueIsNurseryObject(Condition cond, ValueOperand value, Register temp, Label *label);
|
||||||
|
Loading…
Reference in New Issue
Block a user