mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[JAEGER] Clean up x86_64 port. VMFrame::inlineCallCount is now uint32.
This commit is contained in:
parent
26459a9067
commit
6bef627293
@ -249,13 +249,6 @@ public:
|
||||
m_assembler.subq_rr(scratchRegister, dest);
|
||||
}
|
||||
|
||||
void subPtr(ImmPtr imm, Address address)
|
||||
{
|
||||
loadPtr(address, scratchRegister);
|
||||
subPtr(imm, scratchRegister);
|
||||
storePtr(scratchRegister, address);
|
||||
}
|
||||
|
||||
void xorPtr(RegisterID src, RegisterID dest)
|
||||
{
|
||||
m_assembler.xorq_rr(src, dest);
|
||||
|
@ -1574,14 +1574,7 @@ mjit::Compiler::emitReturn()
|
||||
masm.loadPtr(FrameAddress(offsetof(VMFrame, cx)), Registers::ArgReg1);
|
||||
masm.storePtr(Registers::ReturnReg, FrameAddress(offsetof(VMFrame, fp)));
|
||||
masm.storePtr(Registers::ReturnReg, Address(Registers::ArgReg1, offsetof(JSContext, fp)));
|
||||
#if defined(JS_CPU_X86) or defined(JS_CPU_ARM)
|
||||
masm.subPtr(ImmIntPtr(1), FrameAddress(offsetof(VMFrame, inlineCallCount)));
|
||||
#elif defined (JS_CPU_X64)
|
||||
/* Register is clobbered later, so it's safe to use. */
|
||||
masm.loadPtr(FrameAddress(offsetof(VMFrame, inlineCallCount)), JSReturnReg_Data);
|
||||
masm.subPtr(ImmIntPtr(1), JSReturnReg_Data);
|
||||
masm.storePtr(JSReturnReg_Data, FrameAddress(offsetof(VMFrame, inlineCallCount)));
|
||||
#endif
|
||||
masm.sub32(Imm32(1), FrameAddress(offsetof(VMFrame, inlineCallCount)));
|
||||
|
||||
JS_STATIC_ASSERT(Registers::ReturnReg != JSReturnReg_Data);
|
||||
JS_STATIC_ASSERT(Registers::ReturnReg != JSReturnReg_Type);
|
||||
@ -2794,7 +2787,7 @@ mjit::Compiler::iterNext()
|
||||
Jump notFast = masm.branchPtr(Assembler::NotEqual, T1, ImmPtr(&js_IteratorClass.base));
|
||||
stubcc.linkExit(notFast, Uses(1));
|
||||
|
||||
/* Get private from iter obj. :FIXME: X64 */
|
||||
/* Get private from iter obj. */
|
||||
masm.loadFunctionPrivate(reg, T1);
|
||||
|
||||
RegisterID T3 = frame.allocReg();
|
||||
@ -2850,7 +2843,7 @@ mjit::Compiler::iterMore()
|
||||
Jump notFast = masm.branchPtr(Assembler::NotEqual, T1, ImmPtr(&js_IteratorClass.base));
|
||||
stubcc.linkExit(notFast, Uses(1));
|
||||
|
||||
/* Get private from iter obj. :FIXME: X64 */
|
||||
/* Get private from iter obj. */
|
||||
masm.loadFunctionPrivate(reg, T1);
|
||||
|
||||
/* Get props_cursor, test */
|
||||
|
@ -80,7 +80,7 @@ struct VMFrame
|
||||
JSFrameRegs regs;
|
||||
JSStackFrame *fp;
|
||||
JSContext *cx;
|
||||
uintptr_t inlineCallCount;
|
||||
uint32 inlineCallCount;
|
||||
|
||||
#if defined(JS_CPU_X86)
|
||||
void *savedEBX;
|
||||
@ -89,21 +89,21 @@ struct VMFrame
|
||||
void *savedEBP;
|
||||
void *savedEIP;
|
||||
|
||||
#ifdef JS_NO_FASTCALL
|
||||
# ifdef JS_NO_FASTCALL
|
||||
inline void** returnAddressLocation() {
|
||||
return reinterpret_cast<void**>(this) - 3;
|
||||
}
|
||||
#else
|
||||
# else
|
||||
inline void** returnAddressLocation() {
|
||||
return reinterpret_cast<void**>(this) - 1;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
#elif defined(JS_CPU_X64)
|
||||
void *savedRBX;
|
||||
#ifdef _MSC_VER
|
||||
# ifdef _MSC_VER
|
||||
void *savedRSI;
|
||||
void *savedRDI;
|
||||
#endif
|
||||
# endif
|
||||
void *savedR15;
|
||||
void *savedR14;
|
||||
void *savedR13;
|
||||
@ -111,15 +111,15 @@ struct VMFrame
|
||||
void *savedRBP;
|
||||
void *savedRIP;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef _MSC_VER
|
||||
inline void** returnAddressLocation() {
|
||||
return reinterpret_cast<void**>(this) - 5;
|
||||
}
|
||||
#else
|
||||
# else
|
||||
inline void** returnAddressLocation() {
|
||||
return reinterpret_cast<void**>(this) - 1;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#elif defined(JS_CPU_ARM)
|
||||
void *savedR4;
|
||||
|
@ -1,4 +1,7 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=4 sw=4 et tw=99:
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -36,6 +39,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef JS_METHODJIT
|
||||
|
||||
#include "Retcon.h"
|
||||
#include "MethodJIT.h"
|
||||
#include "Compiler.h"
|
||||
@ -201,4 +205,5 @@ CallStackIterator::bottom() const {
|
||||
} /* namespace mjit */
|
||||
} /* namespace js */
|
||||
|
||||
#endif
|
||||
#endif /* JS_METHODJIT */
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=4 sw=4 et tw=99:
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -40,8 +43,8 @@
|
||||
* or reinterpretation of established facts.
|
||||
*/
|
||||
|
||||
#if !defined retcon_h___ && defined JS_METHODJIT
|
||||
#define retcon_h___
|
||||
#if !defined jsjaeger_retcon_h__ && defined JS_METHODJIT
|
||||
#define jsjaeger_retcon_h__
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jsscript.h"
|
||||
@ -137,3 +140,4 @@ private:
|
||||
} /* namespace js */
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=4 sw=4 et tw=99:
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -34,6 +37,7 @@
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "TrampolineCompiler.h"
|
||||
#include "StubCalls.h"
|
||||
#include "assembler/assembler/LinkBuffer.h"
|
||||
@ -132,14 +136,7 @@ TrampolineCompiler::generateForceReturn(Assembler &masm)
|
||||
masm.loadPtr(FrameAddress(offsetof(VMFrame, cx)), Registers::ArgReg1);
|
||||
masm.storePtr(Registers::ReturnReg, FrameAddress(offsetof(VMFrame, fp)));
|
||||
masm.storePtr(Registers::ReturnReg, Address(Registers::ArgReg1, offsetof(JSContext, fp)));
|
||||
#if defined(JS_CPU_X86) or defined(JS_CPU_ARM)
|
||||
masm.subPtr(ImmIntPtr(1), FrameAddress(offsetof(VMFrame, inlineCallCount)));
|
||||
#elif defined (JS_CPU_X64)
|
||||
/* Register is clobbered later, so it's safe to use. */
|
||||
masm.loadPtr(FrameAddress(offsetof(VMFrame, inlineCallCount)), JSReturnReg_Data);
|
||||
masm.subPtr(ImmIntPtr(1), JSReturnReg_Data);
|
||||
masm.storePtr(JSReturnReg_Data, FrameAddress(offsetof(VMFrame, inlineCallCount)));
|
||||
#endif
|
||||
masm.sub32(Imm32(1), FrameAddress(offsetof(VMFrame, inlineCallCount)));
|
||||
|
||||
Address rval(JSFrameReg, offsetof(JSStackFrame, rval));
|
||||
masm.loadPayload(rval, JSReturnReg_Data);
|
||||
@ -161,3 +158,4 @@ TrampolineCompiler::generateForceReturn(Assembler &masm)
|
||||
|
||||
} /* namespace mjit */
|
||||
} /* namespace js */
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=4 sw=4 et tw=99:
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -34,6 +37,7 @@
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#if !defined trampolines_h__ && defined JS_METHODJIT
|
||||
#define trampolines_h__
|
||||
|
||||
@ -48,6 +52,7 @@ class TrampolineCompiler
|
||||
typedef Assembler::Label Label;
|
||||
typedef Assembler::Jump Jump;
|
||||
typedef Assembler::ImmPtr ImmPtr;
|
||||
typedef Assembler::Imm32 Imm32;
|
||||
typedef Assembler::Address Address;
|
||||
typedef bool (*TrampolineGenerator)(Assembler &masm);
|
||||
|
||||
@ -74,3 +79,4 @@ private:
|
||||
} /* namespace js */
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user