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 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 __ SetStackPointer(csp); | 1720 __ SetStackPointer(csp); |
1721 __ PopCalleeSavedRegisters(); | 1721 __ PopCalleeSavedRegisters(); |
1722 // After this point, we must not modify jssp because it is a callee-saved | 1722 // After this point, we must not modify jssp because it is a callee-saved |
1723 // register which we have just restored. | 1723 // register which we have just restored. |
1724 __ Ret(); | 1724 __ Ret(); |
1725 } | 1725 } |
1726 | 1726 |
1727 | 1727 |
1728 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 1728 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
1729 Label miss; | 1729 Label miss; |
1730 Register receiver; | 1730 Register receiver = LoadIC::ReceiverRegister(); |
| 1731 Register name = LoadIC::NameRegister(); |
| 1732 |
| 1733 ASSERT(kind() == Code::LOAD_IC || |
| 1734 kind() == Code::KEYED_LOAD_IC); |
| 1735 |
1731 if (kind() == Code::KEYED_LOAD_IC) { | 1736 if (kind() == Code::KEYED_LOAD_IC) { |
1732 // ----------- S t a t e ------------- | 1737 __ Cmp(name, Operand(isolate()->factory()->prototype_string())); |
1733 // -- lr : return address | |
1734 // -- x1 : receiver | |
1735 // -- x0 : key | |
1736 // ----------------------------------- | |
1737 Register key = x0; | |
1738 receiver = x1; | |
1739 __ Cmp(key, Operand(isolate()->factory()->prototype_string())); | |
1740 __ B(ne, &miss); | 1738 __ B(ne, &miss); |
1741 } else { | |
1742 ASSERT(kind() == Code::LOAD_IC); | |
1743 // ----------- S t a t e ------------- | |
1744 // -- lr : return address | |
1745 // -- x2 : name | |
1746 // -- x0 : receiver | |
1747 // -- sp[0] : receiver | |
1748 // ----------------------------------- | |
1749 receiver = x0; | |
1750 } | 1739 } |
1751 | 1740 |
1752 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, x11, &miss); | 1741 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, x11, &miss); |
1753 | 1742 |
1754 __ Bind(&miss); | 1743 __ Bind(&miss); |
1755 StubCompiler::TailCallBuiltin(masm, | 1744 StubCompiler::TailCallBuiltin(masm, |
1756 BaseLoadStoreStubCompiler::MissBuiltin(kind())); | 1745 BaseLoadStoreStubCompiler::MissBuiltin(kind())); |
1757 } | 1746 } |
1758 | 1747 |
1759 | 1748 |
(...skipping 3679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5439 MemOperand(fp, 6 * kPointerSize), | 5428 MemOperand(fp, 6 * kPointerSize), |
5440 NULL); | 5429 NULL); |
5441 } | 5430 } |
5442 | 5431 |
5443 | 5432 |
5444 #undef __ | 5433 #undef __ |
5445 | 5434 |
5446 } } // namespace v8::internal | 5435 } } // namespace v8::internal |
5447 | 5436 |
5448 #endif // V8_TARGET_ARCH_ARM64 | 5437 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |