| OLD | NEW |
| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3665 __ and_(r2, r1, Operand(r0)); | 3665 __ and_(r2, r1, Operand(r0)); |
| 3666 __ JumpIfSmi(r2, &miss); | 3666 __ JumpIfSmi(r2, &miss); |
| 3667 __ GetWeakValue(r4, cell); | 3667 __ GetWeakValue(r4, cell); |
| 3668 __ ldr(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); | 3668 __ ldr(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 3669 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); | 3669 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); |
| 3670 __ cmp(r2, r4); | 3670 __ cmp(r2, r4); |
| 3671 __ b(ne, &miss); | 3671 __ b(ne, &miss); |
| 3672 __ cmp(r3, r4); | 3672 __ cmp(r3, r4); |
| 3673 __ b(ne, &miss); | 3673 __ b(ne, &miss); |
| 3674 | 3674 |
| 3675 __ sub(r0, r0, Operand(r1)); | 3675 if (Token::IsEqualityOp(op())) { |
| 3676 __ Ret(); | 3676 __ sub(r0, r0, Operand(r1)); |
| 3677 __ Ret(); |
| 3678 } else if (is_strong(strength())) { |
| 3679 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
| 3680 } else { |
| 3681 if (op() == Token::LT || op() == Token::LTE) { |
| 3682 __ mov(r2, Operand(Smi::FromInt(GREATER))); |
| 3683 } else { |
| 3684 __ mov(r2, Operand(Smi::FromInt(LESS))); |
| 3685 } |
| 3686 __ Push(r1, r0, r2); |
| 3687 __ TailCallRuntime(Runtime::kCompare, 3, 1); |
| 3688 } |
| 3677 | 3689 |
| 3678 __ bind(&miss); | 3690 __ bind(&miss); |
| 3679 GenerateMiss(masm); | 3691 GenerateMiss(masm); |
| 3680 } | 3692 } |
| 3681 | 3693 |
| 3682 | 3694 |
| 3683 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 3695 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
| 3684 { | 3696 { |
| 3685 // Call the runtime system in a fresh internal frame. | 3697 // Call the runtime system in a fresh internal frame. |
| 3686 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 3698 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| (...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5537 MemOperand(fp, 6 * kPointerSize), NULL); | 5549 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5538 } | 5550 } |
| 5539 | 5551 |
| 5540 | 5552 |
| 5541 #undef __ | 5553 #undef __ |
| 5542 | 5554 |
| 5543 } // namespace internal | 5555 } // namespace internal |
| 5544 } // namespace v8 | 5556 } // namespace v8 |
| 5545 | 5557 |
| 5546 #endif // V8_TARGET_ARCH_ARM | 5558 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |