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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 __ Jump(ra); | 1340 __ Jump(ra); |
1341 } | 1341 } |
1342 | 1342 |
1343 | 1343 |
1344 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 1344 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
1345 // Return address is in ra. | 1345 // Return address is in ra. |
1346 Label miss; | 1346 Label miss; |
1347 | 1347 |
1348 Register receiver = LoadDescriptor::ReceiverRegister(); | 1348 Register receiver = LoadDescriptor::ReceiverRegister(); |
1349 Register index = LoadDescriptor::NameRegister(); | 1349 Register index = LoadDescriptor::NameRegister(); |
1350 Register scratch = a3; | 1350 Register scratch = a4; |
1351 Register result = v0; | 1351 Register result = v0; |
1352 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | 1352 DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
| 1353 DCHECK(!FLAG_vector_ics || |
| 1354 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && |
| 1355 result.is(VectorLoadICDescriptor::SlotRegister()))); |
1353 | 1356 |
| 1357 // StringCharAtGenerator doesn't use the result register until it's passed |
| 1358 // the different miss possibilities. If it did, we would have a conflict |
| 1359 // when FLAG_vector_ics is true. |
1354 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, | 1360 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
1355 &miss, // When not a string. | 1361 &miss, // When not a string. |
1356 &miss, // When not a number. | 1362 &miss, // When not a number. |
1357 &miss, // When index out of range. | 1363 &miss, // When index out of range. |
1358 STRING_INDEX_IS_ARRAY_INDEX, | 1364 STRING_INDEX_IS_ARRAY_INDEX, |
1359 RECEIVER_IS_STRING); | 1365 RECEIVER_IS_STRING); |
1360 char_at_generator.GenerateFast(masm); | 1366 char_at_generator.GenerateFast(masm); |
1361 __ Ret(); | 1367 __ Ret(); |
1362 | 1368 |
1363 StubRuntimeCallHelper call_helper; | 1369 StubRuntimeCallHelper call_helper; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); | 1563 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); |
1558 __ LoadRoot(v0, Heap::kFalseValueRootIndex); | 1564 __ LoadRoot(v0, Heap::kFalseValueRootIndex); |
1559 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); | 1565 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); |
1560 } | 1566 } |
1561 } | 1567 } |
1562 | 1568 |
1563 | 1569 |
1564 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 1570 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
1565 Label miss; | 1571 Label miss; |
1566 Register receiver = LoadDescriptor::ReceiverRegister(); | 1572 Register receiver = LoadDescriptor::ReceiverRegister(); |
1567 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3, | 1573 // Ensure that the vector and slot registers won't be clobbered before |
1568 a4, &miss); | 1574 // calling the miss handler. |
| 1575 DCHECK(!FLAG_vector_ics || |
| 1576 !AreAliased(a4, a5, VectorLoadICDescriptor::VectorRegister(), |
| 1577 VectorLoadICDescriptor::SlotRegister())); |
| 1578 |
| 1579 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a4, |
| 1580 a5, &miss); |
1569 __ bind(&miss); | 1581 __ bind(&miss); |
1570 PropertyAccessCompiler::TailCallBuiltin( | 1582 PropertyAccessCompiler::TailCallBuiltin( |
1571 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 1583 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
1572 } | 1584 } |
1573 | 1585 |
1574 | 1586 |
1575 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 1587 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
1576 // The displacement is the offset of the last parameter (if any) | 1588 // The displacement is the offset of the last parameter (if any) |
1577 // relative to the frame pointer. | 1589 // relative to the frame pointer. |
1578 const int kDisplacement = | 1590 const int kDisplacement = |
(...skipping 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4971 MemOperand(fp, 6 * kPointerSize), | 4983 MemOperand(fp, 6 * kPointerSize), |
4972 NULL); | 4984 NULL); |
4973 } | 4985 } |
4974 | 4986 |
4975 | 4987 |
4976 #undef __ | 4988 #undef __ |
4977 | 4989 |
4978 } } // namespace v8::internal | 4990 } } // namespace v8::internal |
4979 | 4991 |
4980 #endif // V8_TARGET_ARCH_MIPS64 | 4992 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |