OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 2789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2800 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { | 2800 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { |
2801 // ----------- S t a t e ------------- | 2801 // ----------- S t a t e ------------- |
2802 // -- r4 : left | 2802 // -- r4 : left |
2803 // -- r3 : right | 2803 // -- r3 : right |
2804 // -- lr : return address | 2804 // -- lr : return address |
2805 // ----------------------------------- | 2805 // ----------------------------------- |
2806 | 2806 |
2807 // Load r5 with the allocation site. We stick an undefined dummy value here | 2807 // Load r5 with the allocation site. We stick an undefined dummy value here |
2808 // and replace it with the real allocation site later when we instantiate this | 2808 // and replace it with the real allocation site later when we instantiate this |
2809 // stub in BinaryOpICWithAllocationSiteStub::GetCodeCopyFromTemplate(). | 2809 // stub in BinaryOpICWithAllocationSiteStub::GetCodeCopyFromTemplate(). |
2810 __ Move(r5, handle(isolate()->heap()->undefined_value())); | 2810 __ Move(r5, isolate()->factory()->undefined_value()); |
2811 | 2811 |
2812 // Make sure that we actually patched the allocation site. | 2812 // Make sure that we actually patched the allocation site. |
2813 if (FLAG_debug_code) { | 2813 if (FLAG_debug_code) { |
2814 __ TestIfSmi(r5, r0); | 2814 __ TestIfSmi(r5, r0); |
2815 __ Assert(ne, kExpectedAllocationSite, cr0); | 2815 __ Assert(ne, kExpectedAllocationSite, cr0); |
2816 __ push(r5); | 2816 __ push(r5); |
2817 __ LoadP(r5, FieldMemOperand(r5, HeapObject::kMapOffset)); | 2817 __ LoadP(r5, FieldMemOperand(r5, HeapObject::kMapOffset)); |
2818 __ LoadRoot(ip, Heap::kAllocationSiteMapRootIndex); | 2818 __ LoadRoot(ip, Heap::kAllocationSiteMapRootIndex); |
2819 __ cmp(r5, ip); | 2819 __ cmp(r5, ip); |
2820 __ pop(r5); | 2820 __ pop(r5); |
(...skipping 2866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5687 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 5687 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
5688 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5688 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5689 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5689 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5690 } | 5690 } |
5691 | 5691 |
5692 #undef __ | 5692 #undef __ |
5693 } // namespace internal | 5693 } // namespace internal |
5694 } // namespace v8 | 5694 } // namespace v8 |
5695 | 5695 |
5696 #endif // V8_TARGET_ARCH_PPC | 5696 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |