Index: src/ppc/builtins-ppc.cc |
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc |
index 6e44bc64656cb1d4441e9abfc3a0602b7ffbba50..5935896205dc11cafc655f2bbdf9f56c2bda38a9 100644 |
--- a/src/ppc/builtins-ppc.cc |
+++ b/src/ppc/builtins-ppc.cc |
@@ -233,7 +233,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
__ push(function); // Preserve the function. |
__ IncrementCounter(counters->string_ctor_conversions(), 1, r6, r7); |
{ |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
__ push(r3); |
__ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); |
} |
@@ -253,7 +253,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
__ bind(&gc_required); |
__ IncrementCounter(counters->string_ctor_gc_required(), 1, r6, r7); |
{ |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
__ push(argument); |
__ CallRuntime(Runtime::kNewStringWrapper, 1); |
} |
@@ -263,7 +263,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
static void CallRuntimePassFunction(MacroAssembler* masm, |
Runtime::FunctionId function_id) { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
// Push a copy of the function onto the stack. |
// Push function as parameter to the runtime call. |
__ Push(r4, r4); |
@@ -354,7 +354,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// Enter a construct frame. |
{ |
- FrameScope scope(masm, StackFrame::CONSTRUCT); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); |
if (create_memento) { |
__ AssertUndefinedOrAllocationSite(r5, r7); |
@@ -753,7 +753,7 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) { |
CHECK(!FLAG_pretenuring_call_new); |
{ |
- FrameScope scope(masm, StackFrame::CONSTRUCT); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); |
// Smi-tagged arguments count. |
__ mr(r7, r3); |
@@ -962,7 +962,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
// Push a copy of the function onto the stack. |
// Push function as parameter to the runtime call. |
__ Push(r4, r4); |
@@ -1080,7 +1080,7 @@ void Builtins::Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm) { |
static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, |
SaveFPRegsMode save_doubles) { |
{ |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
// Preserve registers across notification, this is important for compiled |
// stubs that tail call the runtime on deopts passing their parameters in |
@@ -1109,7 +1109,7 @@ void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
Deoptimizer::BailoutType type) { |
{ |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
// Pass the function and deoptimization type to the runtime system. |
__ LoadSmiLiteral(r3, Smi::FromInt(static_cast<int>(type))); |
__ push(r3); |
@@ -1157,7 +1157,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
// Lookup the function in the JavaScript frame. |
__ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
{ |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
// Pass function as argument. |
__ push(r3); |
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1); |
@@ -1176,8 +1176,13 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
__ LoadP(r4, FieldMemOperand(r3, Code::kDeoptimizationDataOffset)); |
{ |
+ ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
__ addi(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start |
+ if (FLAG_enable_embedded_constant_pool) { |
+ __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r3); |
+ } |
+ |
// Load the OSR entrypoint offset from the deoptimization data. |
// <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset] |
__ LoadP(r4, FieldMemOperand( |
@@ -1202,7 +1207,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { |
__ cmpl(sp, ip); |
__ bge(&ok); |
{ |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
__ CallRuntime(Runtime::kStackGuard, 0); |
} |
__ Jump(masm->isolate()->builtins()->OnStackReplacement(), |
@@ -1293,7 +1298,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
{ |
// Enter an internal frame in order to preserve argument count. |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
__ SmiTag(r3); |
__ Push(r3, r5); |
__ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
@@ -1460,7 +1465,7 @@ static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) { |
const int kStackSize = kFormalParameters + 1; |
{ |
- FrameScope frame_scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope frame_scope(masm, StackFrame::INTERNAL); |
const int kArgumentsOffset = kFPOnStackSize + kPCOnStackSize; |
const int kReceiverOffset = kArgumentsOffset + kPointerSize; |
const int kFunctionOffset = kReceiverOffset + kPointerSize; |
@@ -1589,7 +1594,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) { |
const int kStackSize = kFormalParameters + 1; |
{ |
- FrameScope frame_scope(masm, StackFrame::INTERNAL); |
+ FrameAndConstantPoolScope frame_scope(masm, StackFrame::INTERNAL); |
const int kNewTargetOffset = kFPOnStackSize + kPCOnStackSize; |
const int kArgumentsOffset = kNewTargetOffset + kPointerSize; |
const int kFunctionOffset = kArgumentsOffset + kPointerSize; |
@@ -1689,7 +1694,11 @@ static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
__ LoadSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
__ mflr(r0); |
__ push(r0); |
- __ Push(fp, r7, r4, r3); |
+ if (FLAG_enable_embedded_constant_pool) { |
+ __ Push(fp, kConstantPoolRegister, r7, r4, r3); |
+ } else { |
+ __ Push(fp, r7, r4, r3); |
+ } |
__ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + |
kPointerSize)); |
} |