mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1165793 - Add executableCopy() back for MIPS. r=sstangl
IonAssemblerBuffer::executableCopy() was erroneously removed in Bug 1163168.
This commit is contained in:
parent
2e26b7957b
commit
f450b1c7e9
@ -641,6 +641,20 @@ PatchBackedge(CodeLocationJump& jump_, CodeLocationLabel label, JitRuntime::Back
|
||||
class Assembler;
|
||||
typedef js::jit::AssemblerBuffer<1024, Instruction> MIPSBuffer;
|
||||
|
||||
class MIPSBufferWithExecutableCopy : public MIPSBuffer
|
||||
{
|
||||
public:
|
||||
void executableCopy(uint8_t* buffer) {
|
||||
if (this->oom())
|
||||
return;
|
||||
|
||||
for (Slice* cur = head; cur != nullptr; cur = cur->getNext()) {
|
||||
memcpy(buffer, &cur->instructions, cur->length());
|
||||
buffer += cur->length();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class Assembler : public AssemblerShared
|
||||
{
|
||||
public:
|
||||
@ -751,7 +765,7 @@ class Assembler : public AssemblerShared
|
||||
CompactBufferWriter dataRelocations_;
|
||||
CompactBufferWriter preBarriers_;
|
||||
|
||||
MIPSBuffer m_buffer;
|
||||
MIPSBufferWithExecutableCopy m_buffer;
|
||||
|
||||
public:
|
||||
Assembler()
|
||||
|
@ -99,10 +99,10 @@ class BufferSlice
|
||||
template<int SliceSize, class Inst>
|
||||
class AssemblerBuffer
|
||||
{
|
||||
protected:
|
||||
typedef BufferSlice<SliceSize> Slice;
|
||||
typedef AssemblerBuffer<SliceSize, Inst> AssemblerBuffer_;
|
||||
|
||||
protected:
|
||||
// Doubly-linked list of BufferSlices, with the most recent in tail position.
|
||||
Slice* head;
|
||||
Slice* tail;
|
||||
|
Loading…
Reference in New Issue
Block a user