mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1010775 part 5 - Pass ImmGCPtr and ImmMaybeNurseryPtr by value instead of const-ref. r=sunfish
This commit is contained in:
parent
97feec9143
commit
042e72a91d
@ -244,7 +244,7 @@ template void MacroAssembler::guardType(const ValueOperand &value, types::Type t
|
|||||||
Register scratch, Label *miss);
|
Register scratch, Label *miss);
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssembler::branchNurseryPtr(Condition cond, const Address &ptr1, const ImmMaybeNurseryPtr &ptr2,
|
MacroAssembler::branchNurseryPtr(Condition cond, const Address &ptr1, ImmMaybeNurseryPtr ptr2,
|
||||||
Label *label)
|
Label *label)
|
||||||
{
|
{
|
||||||
#ifdef JSGC_GENERATIONAL
|
#ifdef JSGC_GENERATIONAL
|
||||||
@ -255,7 +255,7 @@ MacroAssembler::branchNurseryPtr(Condition cond, const Address &ptr1, const ImmM
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssembler::moveNurseryPtr(const ImmMaybeNurseryPtr &ptr, Register reg)
|
MacroAssembler::moveNurseryPtr(ImmMaybeNurseryPtr ptr, Register reg)
|
||||||
{
|
{
|
||||||
#ifdef JSGC_GENERATIONAL
|
#ifdef JSGC_GENERATIONAL
|
||||||
if (ptr.value && gc::IsInsideNursery(GetIonContext()->cx->runtime(), (void *)ptr.value))
|
if (ptr.value && gc::IsInsideNursery(GetIonContext()->cx->runtime(), (void *)ptr.value))
|
||||||
|
@ -692,9 +692,9 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||||||
bind(&done);
|
bind(&done);
|
||||||
}
|
}
|
||||||
|
|
||||||
void branchNurseryPtr(Condition cond, const Address &ptr1, const ImmMaybeNurseryPtr &ptr2,
|
void branchNurseryPtr(Condition cond, const Address &ptr1, ImmMaybeNurseryPtr ptr2,
|
||||||
Label *label);
|
Label *label);
|
||||||
void moveNurseryPtr(const ImmMaybeNurseryPtr &ptr, Register reg);
|
void moveNurseryPtr(ImmMaybeNurseryPtr ptr, Register reg);
|
||||||
|
|
||||||
void canonicalizeDouble(FloatRegister reg) {
|
void canonicalizeDouble(FloatRegister reg) {
|
||||||
Label notNaN;
|
Label notNaN;
|
||||||
|
@ -1329,7 +1329,7 @@ class Assembler : public AssemblerShared
|
|||||||
|
|
||||||
// As opposed to x86/x64 version, the data relocation has to be executed
|
// As opposed to x86/x64 version, the data relocation has to be executed
|
||||||
// before to recover the pointer, and not after.
|
// before to recover the pointer, and not after.
|
||||||
void writeDataRelocation(const ImmGCPtr &ptr) {
|
void writeDataRelocation(ImmGCPtr ptr) {
|
||||||
if (ptr.value)
|
if (ptr.value)
|
||||||
tmpDataRelocations_.append(nextOffset());
|
tmpDataRelocations_.append(nextOffset());
|
||||||
}
|
}
|
||||||
|
@ -479,7 +479,7 @@ MacroAssemblerARM::ma_mov(ImmWord imm, Register dest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerARM::ma_mov(const ImmGCPtr &ptr, Register dest)
|
MacroAssemblerARM::ma_mov(ImmGCPtr ptr, Register dest)
|
||||||
{
|
{
|
||||||
// As opposed to x86/x64 version, the data relocation has to be executed
|
// As opposed to x86/x64 version, the data relocation has to be executed
|
||||||
// before to recover the pointer, and not after.
|
// before to recover the pointer, and not after.
|
||||||
@ -2023,7 +2023,7 @@ MacroAssemblerARMCompat::movePtr(ImmWord imm, Register dest)
|
|||||||
ma_mov(Imm32(imm.value), dest);
|
ma_mov(Imm32(imm.value), dest);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
MacroAssemblerARMCompat::movePtr(const ImmGCPtr &imm, Register dest)
|
MacroAssemblerARMCompat::movePtr(ImmGCPtr imm, Register dest)
|
||||||
{
|
{
|
||||||
ma_mov(imm, dest);
|
ma_mov(imm, dest);
|
||||||
}
|
}
|
||||||
@ -2513,7 +2513,7 @@ MacroAssemblerARMCompat::cmpPtr(Register lhs, Register rhs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerARMCompat::cmpPtr(Register lhs, const ImmGCPtr &rhs)
|
MacroAssemblerARMCompat::cmpPtr(Register lhs, ImmGCPtr rhs)
|
||||||
{
|
{
|
||||||
ma_cmp(lhs, rhs);
|
ma_cmp(lhs, rhs);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ class MacroAssemblerARM : public Assembler
|
|||||||
void ma_mov(ImmWord imm, Register dest,
|
void ma_mov(ImmWord imm, Register dest,
|
||||||
SetCond_ sc = NoSetCond, Condition c = Always);
|
SetCond_ sc = NoSetCond, Condition c = Always);
|
||||||
|
|
||||||
void ma_mov(const ImmGCPtr &ptr, Register dest);
|
void ma_mov(ImmGCPtr ptr, Register dest);
|
||||||
|
|
||||||
// Shifts (just a move with a shifting op2)
|
// Shifts (just a move with a shifting op2)
|
||||||
void ma_lsl(Imm32 shift, Register src, Register dst);
|
void ma_lsl(Imm32 shift, Register src, Register dst);
|
||||||
@ -1315,7 +1315,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||||||
void movePtr(ImmWord imm, Register dest);
|
void movePtr(ImmWord imm, Register dest);
|
||||||
void movePtr(ImmPtr imm, Register dest);
|
void movePtr(ImmPtr imm, Register dest);
|
||||||
void movePtr(const AsmJSImmPtr &imm, Register dest);
|
void movePtr(const AsmJSImmPtr &imm, Register dest);
|
||||||
void movePtr(const ImmGCPtr &imm, Register dest);
|
void movePtr(ImmGCPtr imm, Register dest);
|
||||||
|
|
||||||
void load8SignExtend(const Address &address, Register dest);
|
void load8SignExtend(const Address &address, Register dest);
|
||||||
void load8SignExtend(const BaseIndex &src, Register dest);
|
void load8SignExtend(const BaseIndex &src, Register dest);
|
||||||
@ -1414,7 +1414,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||||||
void cmpPtr(Register lhs, ImmWord rhs);
|
void cmpPtr(Register lhs, ImmWord rhs);
|
||||||
void cmpPtr(Register lhs, ImmPtr rhs);
|
void cmpPtr(Register lhs, ImmPtr rhs);
|
||||||
void cmpPtr(Register lhs, Register rhs);
|
void cmpPtr(Register lhs, Register rhs);
|
||||||
void cmpPtr(Register lhs, const ImmGCPtr &rhs);
|
void cmpPtr(Register lhs, ImmGCPtr rhs);
|
||||||
void cmpPtr(Register lhs, Imm32 rhs);
|
void cmpPtr(Register lhs, Imm32 rhs);
|
||||||
void cmpPtr(const Address &lhs, Register rhs);
|
void cmpPtr(const Address &lhs, Register rhs);
|
||||||
void cmpPtr(const Address &lhs, ImmWord rhs);
|
void cmpPtr(const Address &lhs, ImmWord rhs);
|
||||||
|
@ -732,7 +732,7 @@ class Assembler : public AssemblerShared
|
|||||||
|
|
||||||
// As opposed to x86/x64 version, the data relocation has to be executed
|
// As opposed to x86/x64 version, the data relocation has to be executed
|
||||||
// before to recover the pointer, and not after.
|
// before to recover the pointer, and not after.
|
||||||
void writeDataRelocation(const ImmGCPtr &ptr) {
|
void writeDataRelocation(ImmGCPtr ptr) {
|
||||||
if (ptr.value)
|
if (ptr.value)
|
||||||
dataRelocations_.writeUnsigned(nextOffset().getOffset());
|
dataRelocations_.writeUnsigned(nextOffset().getOffset());
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ MacroAssemblerMIPS::ma_move(Register rd, Register rs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerMIPS::ma_li(Register dest, const ImmGCPtr &ptr)
|
MacroAssemblerMIPS::ma_li(Register dest, ImmGCPtr ptr)
|
||||||
{
|
{
|
||||||
writeDataRelocation(ptr);
|
writeDataRelocation(ptr);
|
||||||
ma_liPatchable(dest, Imm32(ptr.value));
|
ma_liPatchable(dest, Imm32(ptr.value));
|
||||||
@ -1762,7 +1762,7 @@ MacroAssemblerMIPSCompat::movePtr(ImmWord imm, Register dest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerMIPSCompat::movePtr(const ImmGCPtr &imm, Register dest)
|
MacroAssemblerMIPSCompat::movePtr(ImmGCPtr imm, Register dest)
|
||||||
{
|
{
|
||||||
ma_li(dest, imm);
|
ma_li(dest, imm);
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ class MacroAssemblerMIPS : public Assembler
|
|||||||
|
|
||||||
void ma_move(Register rd, Register rs);
|
void ma_move(Register rd, Register rs);
|
||||||
|
|
||||||
void ma_li(Register dest, const ImmGCPtr &ptr);
|
void ma_li(Register dest, ImmGCPtr ptr);
|
||||||
|
|
||||||
void ma_li(Register dest, AbsoluteLabel *label);
|
void ma_li(Register dest, AbsoluteLabel *label);
|
||||||
|
|
||||||
@ -1027,7 +1027,7 @@ public:
|
|||||||
void movePtr(ImmWord imm, Register dest);
|
void movePtr(ImmWord imm, Register dest);
|
||||||
void movePtr(ImmPtr imm, Register dest);
|
void movePtr(ImmPtr imm, Register dest);
|
||||||
void movePtr(const AsmJSImmPtr &imm, Register dest);
|
void movePtr(const AsmJSImmPtr &imm, Register dest);
|
||||||
void movePtr(const ImmGCPtr &imm, Register dest);
|
void movePtr(ImmGCPtr imm, Register dest);
|
||||||
|
|
||||||
void load8SignExtend(const Address &address, Register dest);
|
void load8SignExtend(const Address &address, Register dest);
|
||||||
void load8SignExtend(const BaseIndex &src, Register dest);
|
void load8SignExtend(const BaseIndex &src, Register dest);
|
||||||
|
@ -142,7 +142,7 @@ class AssemblerX86Shared : public AssemblerShared
|
|||||||
dataRelocations_.writeUnsigned(masm.currentOffset());
|
dataRelocations_.writeUnsigned(masm.currentOffset());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void writeDataRelocation(const ImmGCPtr &ptr) {
|
void writeDataRelocation(ImmGCPtr ptr) {
|
||||||
if (ptr.value)
|
if (ptr.value)
|
||||||
dataRelocations_.writeUnsigned(masm.currentOffset());
|
dataRelocations_.writeUnsigned(masm.currentOffset());
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ class Assembler : public AssemblerX86Shared
|
|||||||
|
|
||||||
// Actual assembly emitting functions.
|
// Actual assembly emitting functions.
|
||||||
|
|
||||||
void push(const ImmGCPtr &ptr) {
|
void push(ImmGCPtr ptr) {
|
||||||
push(Imm32(ptr.value));
|
push(Imm32(ptr.value));
|
||||||
writeDataRelocation(ptr);
|
writeDataRelocation(ptr);
|
||||||
}
|
}
|
||||||
@ -218,11 +218,11 @@ class Assembler : public AssemblerX86Shared
|
|||||||
return movWithPatch(ImmWord(uintptr_t(imm.value)), dest);
|
return movWithPatch(ImmWord(uintptr_t(imm.value)), dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
void movl(const ImmGCPtr &ptr, Register dest) {
|
void movl(ImmGCPtr ptr, Register dest) {
|
||||||
masm.movl_i32r(ptr.value, dest.code());
|
masm.movl_i32r(ptr.value, dest.code());
|
||||||
writeDataRelocation(ptr);
|
writeDataRelocation(ptr);
|
||||||
}
|
}
|
||||||
void movl(const ImmGCPtr &ptr, const Operand &dest) {
|
void movl(ImmGCPtr ptr, const Operand &dest) {
|
||||||
switch (dest.kind()) {
|
switch (dest.kind()) {
|
||||||
case Operand::REG:
|
case Operand::REG:
|
||||||
masm.movl_i32r(ptr.value, dest.reg());
|
masm.movl_i32r(ptr.value, dest.reg());
|
||||||
|
Loading…
Reference in New Issue
Block a user