Commit ddea5a67 authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [stubs] Port CreateWeakCellStub to turbofan

Port 7f1fa30e

Original commit message:

    In the process also inline the stub into the appropriate interpreter bytecode
    handler and make sure that the context register is preserved in hand-written
    assembly code that calls the stub and expects the context register to be
    preserved.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=608675
LOG=N

Review-Url: https://codereview.chromium.org/2188483008
Cr-Commit-Position: refs/heads/master@{#38148}
parent 4f0029a4
......@@ -1707,9 +1707,11 @@ static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) {
// Number-of-arguments register must be smi-tagged to call out.
__ SmiTag(r3);
__ Push(r6, r5, r4, r3);
__ Push(cp);
__ CallStub(stub);
__ Pop(cp);
__ Pop(r6, r5, r4, r3);
__ SmiUntag(r3);
}
......@@ -2022,9 +2024,9 @@ void CallICStub::Generate(MacroAssembler* masm) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
CreateWeakCellStub create_stub(masm->isolate());
__ Push(r4);
__ Push(cp, r4);
__ CallStub(&create_stub);
__ Pop(r4);
__ Pop(cp, r4);
}
__ b(&call_function);
......
......@@ -1715,9 +1715,11 @@ static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) {
// Number-of-arguments register must be smi-tagged to call out.
__ SmiTag(r2);
__ Push(r5, r4, r3, r2);
__ Push(cp);
__ CallStub(stub);
__ Pop(cp);
__ Pop(r5, r4, r3, r2);
__ SmiUntag(r2);
}
......@@ -2021,9 +2023,9 @@ void CallICStub::Generate(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
CreateWeakCellStub create_stub(masm->isolate());
__ Push(r3);
__ Push(cp, r3);
__ CallStub(&create_stub);
__ Pop(r3);
__ Pop(cp, r3);
}
__ b(&call_function);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment