Bug 729278 - Fix codgen _the right way_ this time by adding macro assembler directives for cmpPtr(Register, ImmGCPtr) for relevant platforms. (r=tbpl-red)

This commit is contained in:
Kannan Vijayan 2012-07-03 16:01:58 -04:00
parent 6ae9e7293e
commit d090f81f26
4 changed files with 12 additions and 2 deletions

View File

@ -196,8 +196,8 @@ CodeGenerator::visitTestVAndBranch(LTestVAndBranch *lir)
bool
CodeGenerator::visitInlineFunctionGuard(LInlineFunctionGuard *lir)
{
Operand input(ToRegister(lir->input()));
masm.cmpPtr(input, ImmGCPtr(lir->function()));
Register inputReg = ToRegister(lir->input());
masm.cmpPtr(inputReg, ImmGCPtr(lir->function()));
emitBranch(Assembler::Equal, lir->functionBlock(), lir->fallbackBlock());
return true;
}

View File

@ -1852,6 +1852,12 @@ MacroAssemblerARMCompat::cmpPtr(const Register &lhs, const Register &rhs)
ma_cmp(lhs, rhs);
}
void
MacroAssemblerARMCompat::cmpPtr(const Register &lhs, const ImmGCPtr &rhs)
{
ma_cmp(lhs, rhs);
}
void
MacroAssemblerARMCompat::cmpPtr(const Address &lhs, const Register &rhs)
{

View File

@ -1009,6 +1009,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
void cmp32(const Register &lhs, const Register &rhs);
void cmpPtr(const Register &lhs, const ImmWord &rhs);
void cmpPtr(const Register &lhs, const Register &rhs);
void cmpPtr(const Register &lhs, const ImmGCPtr &rhs);
void cmpPtr(const Address &lhs, const Register &rhs);
void cmpPtr(const Address &lhs, const ImmWord &rhs);

View File

@ -364,6 +364,9 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
void cmpPtr(Register lhs, const ImmWord rhs) {
cmpl(lhs, Imm32(rhs.value));
}
void cmpPtr(Register lhs, const ImmGCPtr rhs) {
cmpl(lhs, rhs);
}
void cmpPtr(const Operand &lhs, const ImmWord rhs) {
cmpl(lhs, rhs);
}