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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 __ PopCalleeSavedRegisters(); | 1405 __ PopCalleeSavedRegisters(); |
1406 // After this point, we must not modify jssp because it is a callee-saved | 1406 // After this point, we must not modify jssp because it is a callee-saved |
1407 // register which we have just restored. | 1407 // register which we have just restored. |
1408 __ Ret(); | 1408 __ Ret(); |
1409 } | 1409 } |
1410 | 1410 |
1411 | 1411 |
1412 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 1412 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
1413 Label miss; | 1413 Label miss; |
1414 Register receiver = LoadDescriptor::ReceiverRegister(); | 1414 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 1415 // Ensure that the vector and slot registers won't be clobbered before |
| 1416 // calling the miss handler. |
| 1417 DCHECK(!FLAG_vector_ics || |
| 1418 !AreAliased(x10, x11, VectorLoadICDescriptor::VectorRegister(), |
| 1419 VectorLoadICDescriptor::SlotRegister())); |
1415 | 1420 |
1416 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, | 1421 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, |
1417 x11, &miss); | 1422 x11, &miss); |
1418 | 1423 |
1419 __ Bind(&miss); | 1424 __ Bind(&miss); |
1420 PropertyAccessCompiler::TailCallBuiltin( | 1425 PropertyAccessCompiler::TailCallBuiltin( |
1421 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 1426 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
1422 } | 1427 } |
1423 | 1428 |
1424 | 1429 |
1425 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 1430 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
1426 // Return address is in lr. | 1431 // Return address is in lr. |
1427 Label miss; | 1432 Label miss; |
1428 | 1433 |
1429 Register receiver = LoadDescriptor::ReceiverRegister(); | 1434 Register receiver = LoadDescriptor::ReceiverRegister(); |
1430 Register index = LoadDescriptor::NameRegister(); | 1435 Register index = LoadDescriptor::NameRegister(); |
1431 Register result = x0; | 1436 Register result = x0; |
1432 Register scratch = x3; | 1437 Register scratch = x10; |
1433 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | 1438 DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
| 1439 DCHECK(!FLAG_vector_ics || |
| 1440 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && |
| 1441 result.is(VectorLoadICDescriptor::SlotRegister()))); |
1434 | 1442 |
| 1443 // StringCharAtGenerator doesn't use the result register until it's passed |
| 1444 // the different miss possibilities. If it did, we would have a conflict |
| 1445 // when FLAG_vector_ics is true. |
1435 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, | 1446 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
1436 &miss, // When not a string. | 1447 &miss, // When not a string. |
1437 &miss, // When not a number. | 1448 &miss, // When not a number. |
1438 &miss, // When index out of range. | 1449 &miss, // When index out of range. |
1439 STRING_INDEX_IS_ARRAY_INDEX, | 1450 STRING_INDEX_IS_ARRAY_INDEX, |
1440 RECEIVER_IS_STRING); | 1451 RECEIVER_IS_STRING); |
1441 char_at_generator.GenerateFast(masm); | 1452 char_at_generator.GenerateFast(masm); |
1442 __ Ret(); | 1453 __ Ret(); |
1443 | 1454 |
1444 StubRuntimeCallHelper call_helper; | 1455 StubRuntimeCallHelper call_helper; |
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5150 MemOperand(fp, 6 * kPointerSize), | 5161 MemOperand(fp, 6 * kPointerSize), |
5151 NULL); | 5162 NULL); |
5152 } | 5163 } |
5153 | 5164 |
5154 | 5165 |
5155 #undef __ | 5166 #undef __ |
5156 | 5167 |
5157 } } // namespace v8::internal | 5168 } } // namespace v8::internal |
5158 | 5169 |
5159 #endif // V8_TARGET_ARCH_ARM64 | 5170 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |