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/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 __ push(r3); | 955 __ push(r3); |
956 | 956 |
957 // Push the arguments (skip if none). | 957 // Push the arguments (skip if none). |
958 Label skip; | 958 Label skip; |
959 __ cmpi(r3, Operand::Zero()); | 959 __ cmpi(r3, Operand::Zero()); |
960 __ beq(&skip); | 960 __ beq(&skip); |
961 Generate_InterpreterPushArgs(masm, r5, r3, r7); | 961 Generate_InterpreterPushArgs(masm, r5, r3, r7); |
962 __ bind(&skip); | 962 __ bind(&skip); |
963 | 963 |
964 // Call the constructor with r3, r4, and r6 unmodified. | 964 // Call the constructor with r3, r4, and r6 unmodified. |
965 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 965 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
966 } | 966 } |
967 | 967 |
968 | 968 |
969 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { | 969 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
970 CallRuntimePassFunction(masm, Runtime::kCompileLazy); | 970 CallRuntimePassFunction(masm, Runtime::kCompileLazy); |
971 GenerateTailCallToReturnedCode(masm); | 971 GenerateTailCallToReturnedCode(masm); |
972 } | 972 } |
973 | 973 |
974 | 974 |
975 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { | 975 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 // Copy all arguments from the array to the stack. | 1530 // Copy all arguments from the array to the stack. |
1531 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, | 1531 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, |
1532 kIndexOffset, kLimitOffset); | 1532 kIndexOffset, kLimitOffset); |
1533 | 1533 |
1534 // Use undefined feedback vector | 1534 // Use undefined feedback vector |
1535 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); | 1535 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); |
1536 __ LoadP(r4, MemOperand(fp, kFunctionOffset)); | 1536 __ LoadP(r4, MemOperand(fp, kFunctionOffset)); |
1537 __ LoadP(r6, MemOperand(fp, kNewTargetOffset)); | 1537 __ LoadP(r6, MemOperand(fp, kNewTargetOffset)); |
1538 | 1538 |
1539 // Call the function. | 1539 // Call the function. |
1540 __ Call(masm->isolate()->builtins()->Construct(), | 1540 __ Call(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
1541 RelocInfo::CONSTRUCT_CALL); | |
1542 | 1541 |
1543 // Leave internal frame. | 1542 // Leave internal frame. |
1544 } | 1543 } |
1545 __ addi(sp, sp, Operand(kStackSize * kPointerSize)); | 1544 __ addi(sp, sp, Operand(kStackSize * kPointerSize)); |
1546 __ blr(); | 1545 __ blr(); |
1547 } | 1546 } |
1548 | 1547 |
1549 | 1548 |
1550 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 1549 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
1551 Generate_ApplyHelper(masm, false); | 1550 Generate_ApplyHelper(masm, false); |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2009 __ bkpt(0); | 2008 __ bkpt(0); |
2010 } | 2009 } |
2011 } | 2010 } |
2012 | 2011 |
2013 | 2012 |
2014 #undef __ | 2013 #undef __ |
2015 } // namespace internal | 2014 } // namespace internal |
2016 } // namespace v8 | 2015 } // namespace v8 |
2017 | 2016 |
2018 #endif // V8_TARGET_ARCH_PPC | 2017 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |