Bug 925088 - SpiderMonkey: Fold loads into branchTest32. r=nbp

This commit is contained in:
Dan Gohman 2013-12-18 15:54:30 -08:00
parent 46f2c768f7
commit 890486dfd3
2 changed files with 2 additions and 4 deletions

View File

@ -4827,8 +4827,7 @@ CodeGenerator::visitCharCodeAt(LCharCodeAt *lir)
return false;
Address lengthAndFlagsAddr(str, JSString::offsetOfLengthAndFlags());
masm.loadPtr(lengthAndFlagsAddr, output);
masm.branchTest32(Assembler::Zero, output, Imm32(JSString::FLAGS_MASK), ool->entry());
masm.branchTest32(Assembler::Zero, lengthAndFlagsAddr, Imm32(JSString::FLAGS_MASK), ool->entry());
// getChars
Address charsAddr(str, JSString::offsetOfChars());

View File

@ -875,8 +875,7 @@ MacroAssembler::checkInterruptFlagsPar(const Register &tempReg,
Label *fail)
{
movePtr(ImmPtr(GetIonContext()->runtime->addressOfInterrupt()), tempReg);
load32(Address(tempReg, 0), tempReg);
branchTest32(Assembler::NonZero, tempReg, tempReg, fail);
branch32(Assembler::NonZero, Address(tempReg, 0), Imm32(0), fail);
}
static void