Commit 0b64d84e authored by ossy@webkit.org's avatar ossy@webkit.org

ARM and MIPS assemblers still refer to executable pools.

https://bugs.webkit.org/show_bug.cgi?id=67903

Patch by Filip Pizlo <fpizlo@apple.com> on 2011-09-11
Reviewed by Csaba Osztrogonác.

* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/ARMAssembler.h:
* assembler/AssemblerBufferWithConstantPool.h:
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::executableCopy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7ae31f8e
2011-09-11 Filip Pizlo <fpizlo@apple.com>
ARM and MIPS assemblers still refer to executable pools.
https://bugs.webkit.org/show_bug.cgi?id=67903
Reviewed by Csaba Osztrogonác.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/ARMAssembler.h:
* assembler/AssemblerBufferWithConstantPool.h:
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::executableCopy):
2011-09-08 Filip Pizlo <fpizlo@apple.com>
The executable allocator makes it difficult to free individual
......
......@@ -343,14 +343,15 @@ void ARMAssembler::doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID b
fdtr_u(isLoad, srcDst, ARMRegisters::S0, 0);
}
void* ARMAssembler::executableCopy(JSGlobalData& globalData, ExecutablePool* allocator)
PassRefPtr<ExecutableMemoryHandle> ARMAssembler::executableCopy(JSGlobalData& globalData)
{
// 64-bit alignment is required for next constant pool and JIT code as well
m_buffer.flushWithoutBarrier(true);
if (!m_buffer.isAligned(8))
bkpt(0);
char* data = reinterpret_cast<char*>(m_buffer.executableCopy(globalData, allocator));
RefPtr<ExecutableMemoryHandle> result = m_buffer.executableCopy(globalData);
char* data = reinterpret_cast<char*>(result->start());
for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) {
// The last bit is set if the constant must be placed on constant pool.
......@@ -370,7 +371,7 @@ void* ARMAssembler::executableCopy(JSGlobalData& globalData, ExecutablePool* all
}
}
return data;
return result;
}
} // namespace JSC
......
......@@ -679,7 +679,7 @@ namespace JSC {
return loadBranchTarget(ARMRegisters::pc, cc, useConstantPool);
}
void* executableCopy(JSGlobalData&, ExecutablePool* allocator);
PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData&);
#ifndef NDEBUG
unsigned debugOffset() { return m_buffer.debugOffset(); }
......
......@@ -195,10 +195,10 @@ public:
putIntegralUnchecked(value.low);
}
void* executableCopy(JSGlobalData& globalData, ExecutablePool* allocator)
PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData)
{
flushConstantPool(false);
return AssemblerBuffer::executableCopy(globalData, allocator);
return AssemblerBuffer::executableCopy(globalData);
}
void putShortWithConstantInt(uint16_t insn, uint32_t constant, bool isReusable = false)
......
......@@ -645,14 +645,14 @@ public:
return m_buffer.codeSize();
}
void* executableCopy(JSGlobalData& globalData, ExecutablePool* allocator)
PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData)
{
void *result = m_buffer.executableCopy(globalData, allocator);
RefPtr<ExecutableMemoryHandle> result = m_buffer.executableCopy(globalData);
if (!result)
return 0;
relocateJumps(m_buffer.data(), result);
return result;
relocateJumps(m_buffer.data(), result->start());
return result.release();
}
#ifndef NDEBUG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment