Bug 1010775 part 7 - Pass AsmJSAbsoluteAddress and AsmJSImmPtr by value instead of const-ref. r=sunfish

This commit is contained in:
Jan de Mooij 2014-05-15 17:42:38 +02:00
Родитель f3a90413ec
Коммит b0f52b8dcd
6 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -2033,7 +2033,7 @@ MacroAssemblerARMCompat::movePtr(ImmPtr imm, Register dest)
movePtr(ImmWord(uintptr_t(imm.value)), dest); movePtr(ImmWord(uintptr_t(imm.value)), dest);
} }
void void
MacroAssemblerARMCompat::movePtr(const AsmJSImmPtr &imm, Register dest) MacroAssemblerARMCompat::movePtr(AsmJSImmPtr imm, Register dest)
{ {
RelocStyle rs; RelocStyle rs;
if (hasMOVWT()) if (hasMOVWT())
@ -2189,7 +2189,7 @@ MacroAssemblerARMCompat::loadPtr(AbsoluteAddress address, Register dest)
loadPtr(Address(ScratchRegister, 0x0), dest); loadPtr(Address(ScratchRegister, 0x0), dest);
} }
void void
MacroAssemblerARMCompat::loadPtr(const AsmJSAbsoluteAddress &address, Register dest) MacroAssemblerARMCompat::loadPtr(AsmJSAbsoluteAddress address, Register dest)
{ {
movePtr(AsmJSImmPtr(address.kind()), ScratchRegister); movePtr(AsmJSImmPtr(address.kind()), ScratchRegister);
loadPtr(Address(ScratchRegister, 0x0), dest); loadPtr(Address(ScratchRegister, 0x0), dest);

Просмотреть файл

@ -1062,7 +1062,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
ma_cmp(ScratchRegister, ptr); ma_cmp(ScratchRegister, ptr);
ma_b(label, cond); ma_b(label, cond);
} }
void branchPtr(Condition cond, const AsmJSAbsoluteAddress &addr, Register ptr, Label *label) { void branchPtr(Condition cond, AsmJSAbsoluteAddress addr, Register ptr, Label *label) {
loadPtr(addr, ScratchRegister); loadPtr(addr, ScratchRegister);
ma_cmp(ScratchRegister, ptr); ma_cmp(ScratchRegister, ptr);
ma_b(label, cond); ma_b(label, cond);
@ -1314,7 +1314,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
void movePtr(Register src, Register dest); void movePtr(Register src, Register dest);
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(AsmJSImmPtr imm, Register dest);
void movePtr(ImmGCPtr imm, Register dest); void movePtr(ImmGCPtr imm, Register dest);
void load8SignExtend(const Address &address, Register dest); void load8SignExtend(const Address &address, Register dest);
@ -1336,7 +1336,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
void loadPtr(const Address &address, Register dest); void loadPtr(const Address &address, Register dest);
void loadPtr(const BaseIndex &src, Register dest); void loadPtr(const BaseIndex &src, Register dest);
void loadPtr(AbsoluteAddress address, Register dest); void loadPtr(AbsoluteAddress address, Register dest);
void loadPtr(const AsmJSAbsoluteAddress &address, Register dest); void loadPtr(AsmJSAbsoluteAddress address, Register dest);
void loadPrivate(const Address &address, Register dest); void loadPrivate(const Address &address, Register dest);

Просмотреть файл

@ -1772,7 +1772,7 @@ MacroAssemblerMIPSCompat::movePtr(ImmPtr imm, Register dest)
movePtr(ImmWord(uintptr_t(imm.value)), dest); movePtr(ImmWord(uintptr_t(imm.value)), dest);
} }
void void
MacroAssemblerMIPSCompat::movePtr(const AsmJSImmPtr &imm, Register dest) MacroAssemblerMIPSCompat::movePtr(AsmJSImmPtr imm, Register dest)
{ {
MOZ_ASSUME_UNREACHABLE("NYI"); MOZ_ASSUME_UNREACHABLE("NYI");
} }
@ -1863,7 +1863,7 @@ MacroAssemblerMIPSCompat::loadPtr(AbsoluteAddress address, Register dest)
as_lw(dest, ScratchRegister, 0); as_lw(dest, ScratchRegister, 0);
} }
void void
MacroAssemblerMIPSCompat::loadPtr(const AsmJSAbsoluteAddress &address, Register dest) MacroAssemblerMIPSCompat::loadPtr(AsmJSAbsoluteAddress address, Register dest)
{ {
movePtr(AsmJSImmPtr(address.kind()), ScratchRegister); movePtr(AsmJSImmPtr(address.kind()), ScratchRegister);
loadPtr(Address(ScratchRegister, 0x0), dest); loadPtr(Address(ScratchRegister, 0x0), dest);

Просмотреть файл

@ -787,7 +787,7 @@ public:
loadPtr(addr, ScratchRegister); loadPtr(addr, ScratchRegister);
ma_b(ScratchRegister, ptr, label, cond); ma_b(ScratchRegister, ptr, label, cond);
} }
void branchPtr(Condition cond, const AsmJSAbsoluteAddress &addr, Register ptr, void branchPtr(Condition cond, AsmJSAbsoluteAddress addr, Register ptr,
Label *label) { Label *label) {
loadPtr(addr, ScratchRegister); loadPtr(addr, ScratchRegister);
ma_b(ScratchRegister, ptr, label, cond); ma_b(ScratchRegister, ptr, label, cond);
@ -1026,7 +1026,7 @@ public:
void movePtr(Register src, Register dest); void movePtr(Register src, Register dest);
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(AsmJSImmPtr imm, Register dest);
void movePtr(ImmGCPtr imm, Register dest); void movePtr(ImmGCPtr imm, Register dest);
void load8SignExtend(const Address &address, Register dest); void load8SignExtend(const Address &address, Register dest);
@ -1048,7 +1048,7 @@ public:
void loadPtr(const Address &address, Register dest); void loadPtr(const Address &address, Register dest);
void loadPtr(const BaseIndex &src, Register dest); void loadPtr(const BaseIndex &src, Register dest);
void loadPtr(AbsoluteAddress address, Register dest); void loadPtr(AbsoluteAddress address, Register dest);
void loadPtr(const AsmJSAbsoluteAddress &address, Register dest); void loadPtr(AsmJSAbsoluteAddress address, Register dest);
void loadPrivate(const Address &address, Register dest); void loadPrivate(const Address &address, Register dest);

Просмотреть файл

@ -600,7 +600,7 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
branchPtr(cond, Operand(ScratchReg, 0x0), ptr, label); branchPtr(cond, Operand(ScratchReg, 0x0), ptr, label);
} }
} }
void branchPtr(Condition cond, const AsmJSAbsoluteAddress &addr, Register ptr, Label *label) { void branchPtr(Condition cond, AsmJSAbsoluteAddress addr, Register ptr, Label *label) {
JS_ASSERT(ptr != ScratchReg); JS_ASSERT(ptr != ScratchReg);
mov(AsmJSImmPtr(addr.kind()), ScratchReg); mov(AsmJSImmPtr(addr.kind()), ScratchReg);
branchPtr(cond, Operand(ScratchReg, 0x0), ptr, label); branchPtr(cond, Operand(ScratchReg, 0x0), ptr, label);

Просмотреть файл

@ -339,7 +339,7 @@ class Assembler : public AssemblerX86Shared
MOZ_ASSUME_UNREACHABLE("unexpected operand kind"); MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
} }
} }
void cmpl(const AsmJSAbsoluteAddress &lhs, Register rhs) { void cmpl(AsmJSAbsoluteAddress lhs, Register rhs) {
masm.cmpl_rm_force32(rhs.code(), (void*)-1); masm.cmpl_rm_force32(rhs.code(), (void*)-1);
enoughMemory_ &= append(AsmJSAbsoluteLink(masm.currentOffset(), lhs.kind())); enoughMemory_ &= append(AsmJSAbsoluteLink(masm.currentOffset(), lhs.kind()));
} }