Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: src/mips64/lithium-codegen-mips64.cc

Issue 945823002: MIPS64: Implement optimization utilizing signaling NaN for holes in double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after
4466 DCHECK((shift_size == 3) || (shift_size == -29)); 4466 DCHECK((shift_size == 3) || (shift_size == -29));
4467 if (shift_size == 3) { 4467 if (shift_size == 3) {
4468 __ dsll(at, ToRegister(instr->key()), 3); 4468 __ dsll(at, ToRegister(instr->key()), 3);
4469 } else if (shift_size == -29) { 4469 } else if (shift_size == -29) {
4470 __ dsra(at, ToRegister(instr->key()), 29); 4470 __ dsra(at, ToRegister(instr->key()), 29);
4471 } 4471 }
4472 __ Daddu(scratch, scratch, at); 4472 __ Daddu(scratch, scratch, at);
4473 } 4473 }
4474 4474
4475 if (instr->NeedsCanonicalization()) { 4475 if (instr->NeedsCanonicalization()) {
4476 Label is_nan; 4476 __ FPUCanonicalizeNaN(double_scratch, value);
4477 // Check for NaN. All NaNs must be canonicalized.
4478 __ BranchF(NULL, &is_nan, eq, value, value);
4479 __ Branch(&not_nan);
4480
4481 // Only load canonical NaN if the comparison above set the overflow.
4482 __ bind(&is_nan);
4483 __ LoadRoot(at, Heap::kNanValueRootIndex);
4484 __ ldc1(double_scratch, FieldMemOperand(at, HeapNumber::kValueOffset));
4485 __ sdc1(double_scratch, MemOperand(scratch, 0)); 4477 __ sdc1(double_scratch, MemOperand(scratch, 0));
4486 __ Branch(&done); 4478 } else {
4479 __ sdc1(value, MemOperand(scratch, 0));
4487 } 4480 }
4488
4489 __ bind(&not_nan);
4490 __ sdc1(value, MemOperand(scratch, 0));
4491 __ bind(&done);
4492 } 4481 }
4493 4482
4494 4483
4495 void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { 4484 void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
4496 Register value = ToRegister(instr->value()); 4485 Register value = ToRegister(instr->value());
4497 Register elements = ToRegister(instr->elements()); 4486 Register elements = ToRegister(instr->elements());
4498 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) 4487 Register key = instr->key()->IsRegister() ? ToRegister(instr->key())
4499 : no_reg; 4488 : no_reg;
4500 Register scratch = scratch0(); 4489 Register scratch = scratch0();
4501 Register store_base = scratch; 4490 Register store_base = scratch;
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
6057 __ li(at, scope_info); 6046 __ li(at, scope_info);
6058 __ Push(at, ToRegister(instr->function())); 6047 __ Push(at, ToRegister(instr->function()));
6059 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6048 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6060 RecordSafepoint(Safepoint::kNoLazyDeopt); 6049 RecordSafepoint(Safepoint::kNoLazyDeopt);
6061 } 6050 }
6062 6051
6063 6052
6064 #undef __ 6053 #undef __
6065 6054
6066 } } // namespace v8::internal 6055 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698