| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3567 | 3567 |
| 3568 __ Bind(&miss); | 3568 __ Bind(&miss); |
| 3569 GenerateMiss(masm); | 3569 GenerateMiss(masm); |
| 3570 } | 3570 } |
| 3571 | 3571 |
| 3572 | 3572 |
| 3573 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { | 3573 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { |
| 3574 ASM_LOCATION("CompareICStub[KnownObjects]"); | 3574 ASM_LOCATION("CompareICStub[KnownObjects]"); |
| 3575 | 3575 |
| 3576 Label miss; | 3576 Label miss; |
| 3577 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); |
| 3577 | 3578 |
| 3578 Register result = x0; | 3579 Register result = x0; |
| 3579 Register rhs = x0; | 3580 Register rhs = x0; |
| 3580 Register lhs = x1; | 3581 Register lhs = x1; |
| 3581 | 3582 |
| 3582 __ JumpIfEitherSmi(rhs, lhs, &miss); | 3583 __ JumpIfEitherSmi(rhs, lhs, &miss); |
| 3583 | 3584 |
| 3584 Register rhs_map = x10; | 3585 Register rhs_map = x10; |
| 3585 Register lhs_map = x11; | 3586 Register lhs_map = x11; |
| 3587 Register map = x12; |
| 3588 __ GetWeakValue(map, cell); |
| 3586 __ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset)); | 3589 __ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset)); |
| 3587 __ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset)); | 3590 __ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset)); |
| 3588 __ Cmp(rhs_map, Operand(known_map_)); | 3591 __ Cmp(rhs_map, map); |
| 3589 __ B(ne, &miss); | 3592 __ B(ne, &miss); |
| 3590 __ Cmp(lhs_map, Operand(known_map_)); | 3593 __ Cmp(lhs_map, map); |
| 3591 __ B(ne, &miss); | 3594 __ B(ne, &miss); |
| 3592 | 3595 |
| 3593 __ Sub(result, rhs, lhs); | 3596 __ Sub(result, rhs, lhs); |
| 3594 __ Ret(); | 3597 __ Ret(); |
| 3595 | 3598 |
| 3596 __ Bind(&miss); | 3599 __ Bind(&miss); |
| 3597 GenerateMiss(masm); | 3600 GenerateMiss(masm); |
| 3598 } | 3601 } |
| 3599 | 3602 |
| 3600 | 3603 |
| (...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5403 kStackUnwindSpace, NULL, spill_offset, | 5406 kStackUnwindSpace, NULL, spill_offset, |
| 5404 MemOperand(fp, 6 * kPointerSize), NULL); | 5407 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5405 } | 5408 } |
| 5406 | 5409 |
| 5407 | 5410 |
| 5408 #undef __ | 5411 #undef __ |
| 5409 | 5412 |
| 5410 } } // namespace v8::internal | 5413 } } // namespace v8::internal |
| 5411 | 5414 |
| 5412 #endif // V8_TARGET_ARCH_ARM64 | 5415 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |