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

Side by Side Diff: src/mips64/code-stubs-mips64.cc

Issue 1347063004: [ic] Introduce BOOLEAN state for CompareIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/mips/code-stubs-mips.cc ('k') | src/x64/code-stubs-x64.cc » ('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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after
3544 __ Assert(eq, kExpectedAllocationSite, a4, Operand(at)); 3544 __ Assert(eq, kExpectedAllocationSite, a4, Operand(at));
3545 } 3545 }
3546 3546
3547 // Tail call into the stub that handles binary operations with allocation 3547 // Tail call into the stub that handles binary operations with allocation
3548 // sites. 3548 // sites.
3549 BinaryOpWithAllocationSiteStub stub(isolate(), state()); 3549 BinaryOpWithAllocationSiteStub stub(isolate(), state());
3550 __ TailCallStub(&stub); 3550 __ TailCallStub(&stub);
3551 } 3551 }
3552 3552
3553 3553
3554 void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
3555 DCHECK_EQ(CompareICState::BOOLEAN, state());
3556 Label miss;
3557
3558 __ CheckMap(a1, a2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
3559 __ CheckMap(a0, a3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
3560 if (op() != Token::EQ_STRICT && is_strong(strength())) {
3561 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
3562 } else {
3563 if (!Token::IsEqualityOp(op())) {
3564 __ ld(a1, FieldMemOperand(a1, Oddball::kToNumberOffset));
3565 __ AssertSmi(a1);
3566 __ ld(a0, FieldMemOperand(a0, Oddball::kToNumberOffset));
3567 __ AssertSmi(a0);
3568 }
3569 __ Ret(USE_DELAY_SLOT);
3570 __ Dsubu(v0, a1, a0);
3571 }
3572
3573 __ bind(&miss);
3574 GenerateMiss(masm);
3575 }
3576
3577
3554 void CompareICStub::GenerateSmis(MacroAssembler* masm) { 3578 void CompareICStub::GenerateSmis(MacroAssembler* masm) {
3555 DCHECK(state() == CompareICState::SMI); 3579 DCHECK(state() == CompareICState::SMI);
3556 Label miss; 3580 Label miss;
3557 __ Or(a2, a1, a0); 3581 __ Or(a2, a1, a0);
3558 __ JumpIfNotSmi(a2, &miss); 3582 __ JumpIfNotSmi(a2, &miss);
3559 3583
3560 if (GetCondition() == eq) { 3584 if (GetCondition() == eq) {
3561 // For equality we do not care about the sign of the result. 3585 // For equality we do not care about the sign of the result.
3562 __ Ret(USE_DELAY_SLOT); 3586 __ Ret(USE_DELAY_SLOT);
3563 __ Dsubu(v0, a0, a1); 3587 __ Dsubu(v0, a0, a1);
(...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
5752 MemOperand(fp, 6 * kPointerSize), NULL); 5776 MemOperand(fp, 6 * kPointerSize), NULL);
5753 } 5777 }
5754 5778
5755 5779
5756 #undef __ 5780 #undef __
5757 5781
5758 } // namespace internal 5782 } // namespace internal
5759 } // namespace v8 5783 } // namespace v8
5760 5784
5761 #endif // V8_TARGET_ARCH_MIPS64 5785 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698