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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3560 Register lhs_map = x11; | 3560 Register lhs_map = x11; |
3561 Register map = x12; | 3561 Register map = x12; |
3562 __ GetWeakValue(map, cell); | 3562 __ GetWeakValue(map, cell); |
3563 __ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset)); | 3563 __ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset)); |
3564 __ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset)); | 3564 __ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset)); |
3565 __ Cmp(rhs_map, map); | 3565 __ Cmp(rhs_map, map); |
3566 __ B(ne, &miss); | 3566 __ B(ne, &miss); |
3567 __ Cmp(lhs_map, map); | 3567 __ Cmp(lhs_map, map); |
3568 __ B(ne, &miss); | 3568 __ B(ne, &miss); |
3569 | 3569 |
| 3570 if (Token::IsEqualityOp(op())) { |
3570 __ Sub(result, rhs, lhs); | 3571 __ Sub(result, rhs, lhs); |
3571 __ Ret(); | 3572 __ Ret(); |
| 3573 } else if (is_strong(strength())) { |
| 3574 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
| 3575 } else { |
| 3576 Register ncr = x2; |
| 3577 if (op() == Token::LT || op() == Token::LTE) { |
| 3578 __ Mov(ncr, Smi::FromInt(GREATER)); |
| 3579 } else { |
| 3580 __ Mov(ncr, Smi::FromInt(LESS)); |
| 3581 } |
| 3582 __ Push(lhs, rhs, ncr); |
| 3583 __ TailCallRuntime(Runtime::kCompare, 3, 1); |
| 3584 } |
3572 | 3585 |
3573 __ Bind(&miss); | 3586 __ Bind(&miss); |
3574 GenerateMiss(masm); | 3587 GenerateMiss(masm); |
3575 } | 3588 } |
3576 | 3589 |
3577 | 3590 |
3578 // This method handles the case where a compare stub had the wrong | 3591 // This method handles the case where a compare stub had the wrong |
3579 // implementation. It calls a miss handler, which re-writes the stub. All other | 3592 // implementation. It calls a miss handler, which re-writes the stub. All other |
3580 // CompareICStub::Generate* methods should fall back into this one if their | 3593 // CompareICStub::Generate* methods should fall back into this one if their |
3581 // operands were not the expected types. | 3594 // operands were not the expected types. |
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5977 MemOperand(fp, 6 * kPointerSize), NULL); | 5990 MemOperand(fp, 6 * kPointerSize), NULL); |
5978 } | 5991 } |
5979 | 5992 |
5980 | 5993 |
5981 #undef __ | 5994 #undef __ |
5982 | 5995 |
5983 } // namespace internal | 5996 } // namespace internal |
5984 } // namespace v8 | 5997 } // namespace v8 |
5985 | 5998 |
5986 #endif // V8_TARGET_ARCH_ARM64 | 5999 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |