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 4677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4688 __ StoreP(r4, MemOperand(r7, JSArray::kPropertiesOffset)); | 4688 __ StoreP(r4, MemOperand(r7, JSArray::kPropertiesOffset)); |
4689 __ StoreP(r6, MemOperand(r7, JSArray::kElementsOffset)); | 4689 __ StoreP(r6, MemOperand(r7, JSArray::kElementsOffset)); |
4690 __ StoreP(r3, MemOperand(r7, JSArray::kLengthOffset)); | 4690 __ StoreP(r3, MemOperand(r7, JSArray::kLengthOffset)); |
4691 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); | 4691 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); |
4692 __ addi(r3, r7, Operand(kHeapObjectTag)); | 4692 __ addi(r3, r7, Operand(kHeapObjectTag)); |
4693 __ Ret(); | 4693 __ Ret(); |
4694 | 4694 |
4695 // Fall back to %AllocateInNewSpace (if not too big). | 4695 // Fall back to %AllocateInNewSpace (if not too big). |
4696 Label too_big_for_new_space; | 4696 Label too_big_for_new_space; |
4697 __ bind(&allocate); | 4697 __ bind(&allocate); |
4698 __ cmpi(r10, Operand(Page::kMaxRegularHeapObjectSize)); | 4698 __ Cmpi(r10, Operand(Page::kMaxRegularHeapObjectSize), r0); |
4699 __ bgt(&too_big_for_new_space); | 4699 __ bgt(&too_big_for_new_space); |
4700 { | 4700 { |
4701 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 4701 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
4702 __ SmiTag(r10); | 4702 __ SmiTag(r10); |
4703 __ Push(r3, r5, r10); | 4703 __ Push(r3, r5, r10); |
4704 __ CallRuntime(Runtime::kAllocateInNewSpace); | 4704 __ CallRuntime(Runtime::kAllocateInNewSpace); |
4705 __ mr(r6, r3); | 4705 __ mr(r6, r3); |
4706 __ Pop(r3, r5); | 4706 __ Pop(r3, r5); |
4707 } | 4707 } |
4708 __ b(&done_allocate); | 4708 __ b(&done_allocate); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5079 __ StoreP(r4, MemOperand(r7, JSStrictArgumentsObject::kPropertiesOffset)); | 5079 __ StoreP(r4, MemOperand(r7, JSStrictArgumentsObject::kPropertiesOffset)); |
5080 __ StoreP(r6, MemOperand(r7, JSStrictArgumentsObject::kElementsOffset)); | 5080 __ StoreP(r6, MemOperand(r7, JSStrictArgumentsObject::kElementsOffset)); |
5081 __ StoreP(r3, MemOperand(r7, JSStrictArgumentsObject::kLengthOffset)); | 5081 __ StoreP(r3, MemOperand(r7, JSStrictArgumentsObject::kLengthOffset)); |
5082 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); | 5082 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); |
5083 __ addi(r3, r7, Operand(kHeapObjectTag)); | 5083 __ addi(r3, r7, Operand(kHeapObjectTag)); |
5084 __ Ret(); | 5084 __ Ret(); |
5085 | 5085 |
5086 // Fall back to %AllocateInNewSpace (if not too big). | 5086 // Fall back to %AllocateInNewSpace (if not too big). |
5087 Label too_big_for_new_space; | 5087 Label too_big_for_new_space; |
5088 __ bind(&allocate); | 5088 __ bind(&allocate); |
5089 __ cmpi(r10, Operand(Page::kMaxRegularHeapObjectSize)); | 5089 __ Cmpi(r10, Operand(Page::kMaxRegularHeapObjectSize), r0); |
5090 __ bgt(&too_big_for_new_space); | 5090 __ bgt(&too_big_for_new_space); |
5091 { | 5091 { |
5092 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 5092 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
5093 __ SmiTag(r10); | 5093 __ SmiTag(r10); |
5094 __ Push(r3, r5, r10); | 5094 __ Push(r3, r5, r10); |
5095 __ CallRuntime(Runtime::kAllocateInNewSpace); | 5095 __ CallRuntime(Runtime::kAllocateInNewSpace); |
5096 __ mr(r6, r3); | 5096 __ mr(r6, r3); |
5097 __ Pop(r3, r5); | 5097 __ Pop(r3, r5); |
5098 } | 5098 } |
5099 __ b(&done_allocate); | 5099 __ b(&done_allocate); |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5586 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 5586 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
5587 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5587 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5588 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5588 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5589 } | 5589 } |
5590 | 5590 |
5591 #undef __ | 5591 #undef __ |
5592 } // namespace internal | 5592 } // namespace internal |
5593 } // namespace v8 | 5593 } // namespace v8 |
5594 | 5594 |
5595 #endif // V8_TARGET_ARCH_PPC | 5595 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |