MIPS64: Improve and fix hole nan checks and canonicalization.

TEST=kraken-1.1 benchmark
BUG=

Review URL: https://codereview.chromium.org/952233002

Cr-Commit-Position: refs/heads/master@{#26861}
This commit is contained in:
dusan.milosavljevic 2015-02-25 09:09:27 -08:00 committed by Commit bot
parent 296b5b0e3a
commit 47e608ab52
3 changed files with 8 additions and 8 deletions

View File

@ -668,7 +668,7 @@ static void KeyedStoreGenerateMegamorphicHelper(
__ daddu(address, address, at); __ daddu(address, address, at);
__ lw(scratch_value, MemOperand(address)); __ lw(scratch_value, MemOperand(address));
__ Branch(&fast_double_without_map_check, ne, scratch_value, __ Branch(&fast_double_without_map_check, ne, scratch_value,
Operand(kHoleNanUpper32)); Operand(static_cast<int32_t>(kHoleNanUpper32)));
__ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value, __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
slow); slow);

View File

@ -2363,9 +2363,8 @@ void LCodeGen::DoCmpHoleAndBranch(LCmpHoleAndBranch* instr) {
Register scratch = scratch0(); Register scratch = scratch0();
__ FmoveHigh(scratch, input_reg); __ FmoveHigh(scratch, input_reg);
__ dsll32(scratch, scratch, 0); // FmoveHigh (mfhc1) sign-extends. EmitBranch(instr, eq, scratch,
__ dsrl32(scratch, scratch, 0); // Use only low 32-bits. Operand(static_cast<int32_t>(kHoleNanUpper32)));
EmitBranch(instr, eq, scratch, Operand(kHoleNanUpper32));
} }
@ -3279,9 +3278,9 @@ void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) {
__ ldc1(result, MemOperand(scratch)); __ ldc1(result, MemOperand(scratch));
if (instr->hydrogen()->RequiresHoleCheck()) { if (instr->hydrogen()->RequiresHoleCheck()) {
__ lwu(scratch, MemOperand(scratch, sizeof(kHoleNanLower32))); __ FmoveHigh(scratch, result);
DeoptimizeIf(eq, instr, Deoptimizer::kHole, scratch, DeoptimizeIf(eq, instr, Deoptimizer::kHole, scratch,
Operand(kHoleNanUpper32)); Operand(static_cast<int32_t>(kHoleNanUpper32)));
} }
} }

View File

@ -3884,13 +3884,14 @@ void MacroAssembler::StoreNumberToDoubleElements(Register value_reg,
DoubleRegister double_scratch = f2; DoubleRegister double_scratch = f2;
ldc1(double_result, FieldMemOperand(value_reg, HeapNumber::kValueOffset)); ldc1(double_result, FieldMemOperand(value_reg, HeapNumber::kValueOffset));
Branch(USE_DELAY_SLOT, &done); // Canonicalization is one instruction.
FPUCanonicalizeNaN(double_result, double_result); FPUCanonicalizeNaN(double_result, double_result);
Branch(&done);
bind(&smi_value); bind(&smi_value);
// scratch1 is now effective address of the double element. // scratch1 is now effective address of the double element.
// Untag and transfer. // Untag and transfer.
mthc1(value_reg, double_scratch); dsrl32(at, value_reg, 0);
mtc1(at, double_scratch);
cvt_d_w(double_result, double_scratch); cvt_d_w(double_result, double_scratch);
bind(&done); bind(&done);