| 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 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1738   // Read the argument from the stack and return it. | 1738   // Read the argument from the stack and return it. | 
| 1739   __ Sub(x10, arg_count, key); | 1739   __ Sub(x10, arg_count, key); | 
| 1740   __ Add(x10, local_fp, Operand::UntagSmiAndScale(x10, kPointerSizeLog2)); | 1740   __ Add(x10, local_fp, Operand::UntagSmiAndScale(x10, kPointerSizeLog2)); | 
| 1741   __ Ldr(x0, MemOperand(x10, kDisplacement)); | 1741   __ Ldr(x0, MemOperand(x10, kDisplacement)); | 
| 1742   __ Ret(); | 1742   __ Ret(); | 
| 1743 | 1743 | 
| 1744   // Slow case: handle non-smi or out-of-bounds access to arguments by calling | 1744   // Slow case: handle non-smi or out-of-bounds access to arguments by calling | 
| 1745   // the runtime system. | 1745   // the runtime system. | 
| 1746   __ Bind(&slow); | 1746   __ Bind(&slow); | 
| 1747   __ Push(key); | 1747   __ Push(key); | 
| 1748   __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); | 1748   __ TailCallRuntime(Runtime::kArguments, 1, 1); | 
| 1749 } | 1749 } | 
| 1750 | 1750 | 
| 1751 | 1751 | 
| 1752 void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) { | 1752 void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) { | 
| 1753   // Stack layout on entry. | 1753   // Stack layout on entry. | 
| 1754   //  jssp[0]:  number of parameters (tagged) | 1754   //  jssp[0]:  number of parameters (tagged) | 
| 1755   //  jssp[8]:  address of receiver argument | 1755   //  jssp[8]:  address of receiver argument | 
| 1756   //  jssp[16]: function | 1756   //  jssp[16]: function | 
| 1757 | 1757 | 
| 1758   // Check if the calling frame is an arguments adaptor frame. | 1758   // Check if the calling frame is an arguments adaptor frame. | 
| (...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3688     StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, x10, x11, | 3688     StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, x10, x11, | 
| 3689                                                     x12, x13); | 3689                                                     x12, x13); | 
| 3690   } | 3690   } | 
| 3691 | 3691 | 
| 3692   // Handle more complex cases in runtime. | 3692   // Handle more complex cases in runtime. | 
| 3693   __ Bind(&runtime); | 3693   __ Bind(&runtime); | 
| 3694   __ Push(lhs, rhs); | 3694   __ Push(lhs, rhs); | 
| 3695   if (equality) { | 3695   if (equality) { | 
| 3696     __ TailCallRuntime(Runtime::kStringEquals, 2, 1); | 3696     __ TailCallRuntime(Runtime::kStringEquals, 2, 1); | 
| 3697   } else { | 3697   } else { | 
| 3698     __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); | 3698     __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 
| 3699   } | 3699   } | 
| 3700 | 3700 | 
| 3701   __ Bind(&miss); | 3701   __ Bind(&miss); | 
| 3702   GenerateMiss(masm); | 3702   GenerateMiss(masm); | 
| 3703 } | 3703 } | 
| 3704 | 3704 | 
| 3705 | 3705 | 
| 3706 void CompareICStub::GenerateObjects(MacroAssembler* masm) { | 3706 void CompareICStub::GenerateObjects(MacroAssembler* masm) { | 
| 3707   DCHECK(state() == CompareICState::OBJECT); | 3707   DCHECK(state() == CompareICState::OBJECT); | 
| 3708   ASM_LOCATION("CompareICStub[Objects]"); | 3708   ASM_LOCATION("CompareICStub[Objects]"); | 
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4017   __ Add(result_length, result_length, result_length); | 4017   __ Add(result_length, result_length, result_length); | 
| 4018   __ CopyBytes(result_char0, substring_char0, result_length, x3, kCopyLong); | 4018   __ CopyBytes(result_char0, substring_char0, result_length, x3, kCopyLong); | 
| 4019 | 4019 | 
| 4020   __ Bind(&return_x0); | 4020   __ Bind(&return_x0); | 
| 4021   Counters* counters = isolate()->counters(); | 4021   Counters* counters = isolate()->counters(); | 
| 4022   __ IncrementCounter(counters->sub_string_native(), 1, x3, x4); | 4022   __ IncrementCounter(counters->sub_string_native(), 1, x3, x4); | 
| 4023   __ Drop(3); | 4023   __ Drop(3); | 
| 4024   __ Ret(); | 4024   __ Ret(); | 
| 4025 | 4025 | 
| 4026   __ Bind(&runtime); | 4026   __ Bind(&runtime); | 
| 4027   __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); | 4027   __ TailCallRuntime(Runtime::kSubString, 3, 1); | 
| 4028 | 4028 | 
| 4029   __ bind(&single_char); | 4029   __ bind(&single_char); | 
| 4030   // x1: result_length | 4030   // x1: result_length | 
| 4031   // x10: input_string | 4031   // x10: input_string | 
| 4032   // x12: input_type | 4032   // x12: input_type | 
| 4033   // x15: from (untagged) | 4033   // x15: from (untagged) | 
| 4034   __ SmiTag(from); | 4034   __ SmiTag(from); | 
| 4035   StringCharAtGenerator generator(input_string, from, result_length, x0, | 4035   StringCharAtGenerator generator(input_string, from, result_length, x0, | 
| 4036                                   &runtime, &runtime, &runtime, | 4036                                   &runtime, &runtime, &runtime, | 
| 4037                                   STRING_INDEX_IS_NUMBER, RECEIVER_IS_STRING); | 4037                                   STRING_INDEX_IS_NUMBER, RECEIVER_IS_STRING); | 
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4225 | 4225 | 
| 4226   __ Bind(&runtime); | 4226   __ Bind(&runtime); | 
| 4227 | 4227 | 
| 4228   // Push arguments back on to the stack. | 4228   // Push arguments back on to the stack. | 
| 4229   //  sp[0] = right string | 4229   //  sp[0] = right string | 
| 4230   //  sp[8] = left string. | 4230   //  sp[8] = left string. | 
| 4231   __ Push(left, right); | 4231   __ Push(left, right); | 
| 4232 | 4232 | 
| 4233   // Call the runtime. | 4233   // Call the runtime. | 
| 4234   // Returns -1 (less), 0 (equal), or 1 (greater) tagged as a small integer. | 4234   // Returns -1 (less), 0 (equal), or 1 (greater) tagged as a small integer. | 
| 4235   __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); | 4235   __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 
| 4236 } | 4236 } | 
| 4237 | 4237 | 
| 4238 | 4238 | 
| 4239 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { | 4239 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { | 
| 4240   // ----------- S t a t e ------------- | 4240   // ----------- S t a t e ------------- | 
| 4241   //  -- x1    : left | 4241   //  -- x1    : left | 
| 4242   //  -- x0    : right | 4242   //  -- x0    : right | 
| 4243   //  -- lr    : return address | 4243   //  -- lr    : return address | 
| 4244   // ----------------------------------- | 4244   // ----------------------------------- | 
| 4245 | 4245 | 
| (...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5997                            MemOperand(fp, 6 * kPointerSize), NULL); | 5997                            MemOperand(fp, 6 * kPointerSize), NULL); | 
| 5998 } | 5998 } | 
| 5999 | 5999 | 
| 6000 | 6000 | 
| 6001 #undef __ | 6001 #undef __ | 
| 6002 | 6002 | 
| 6003 }  // namespace internal | 6003 }  // namespace internal | 
| 6004 }  // namespace v8 | 6004 }  // namespace v8 | 
| 6005 | 6005 | 
| 6006 #endif  // V8_TARGET_ARCH_ARM64 | 6006 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW | 
|---|