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

PPC/s390: Fix register mapping and imm16 issue

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

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2283773003
Cr-Commit-Position: refs/heads/master@{#38954}
parent 81f824ca
......@@ -1462,7 +1462,7 @@ void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
// Preserve argument count for later compare.
__ Move(r5, r3);
__ Move(r7, r3);
// Push a copy of the target function and the new target.
// Push function as parameter to the runtime call.
__ SmiTag(r3);
......@@ -1473,13 +1473,13 @@ void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) {
for (int j = 0; j < 4; ++j) {
Label over;
if (j < 3) {
__ cmpi(r5, Operand(j));
__ cmpi(r7, Operand(j));
__ bne(&over);
}
for (int i = j - 1; i >= 0; --i) {
__ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerSPOffset +
__ LoadP(r7, MemOperand(fp, StandardFrameConstants::kCallerSPOffset +
i * kPointerSize));
__ push(r5);
__ push(r7);
}
for (int i = 0; i < 3 - j; ++i) {
__ PushRoot(Heap::kUndefinedValueRootIndex);
......@@ -1497,11 +1497,12 @@ void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) {
__ JumpIfSmi(r3, &failed);
__ Drop(2);
__ pop(r5);
__ SmiUntag(r5);
__ pop(r7);
__ SmiUntag(r7);
scope.GenerateLeaveFrame();
__ Drop(r5);
__ addi(r7, r7, Operand(1));
__ Drop(r7);
__ Ret();
__ bind(&failed);
......
......@@ -1467,7 +1467,7 @@ void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
// Preserve argument count for later compare.
__ Move(r4, r2);
__ Move(r6, r2);
// Push a copy of the target function and the new target.
__ SmiTag(r2);
// Push another copy as a parameter to the runtime call.
......@@ -1478,13 +1478,13 @@ void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) {
for (int j = 0; j < 4; ++j) {
Label over;
if (j < 3) {
__ CmpP(r4, Operand(j));
__ CmpP(r6, Operand(j));
__ b(ne, &over);
}
for (int i = j - 1; i >= 0; --i) {
__ LoadP(r9, MemOperand(fp, StandardFrameConstants::kCallerSPOffset +
__ LoadP(r6, MemOperand(fp, StandardFrameConstants::kCallerSPOffset +
i * kPointerSize));
__ push(r9);
__ push(r6);
}
for (int i = 0; i < 3 - j; ++i) {
__ PushRoot(Heap::kUndefinedValueRootIndex);
......@@ -1502,12 +1502,12 @@ void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) {
__ JumpIfSmi(r2, &failed);
__ Drop(2);
__ pop(r4);
__ SmiUntag(r4);
__ pop(r6);
__ SmiUntag(r6);
scope.GenerateLeaveFrame();
__ AddP(r4, r4, Operand(1));
__ Drop(r4, r7);
__ AddP(r6, r6, Operand(1));
__ Drop(r6);
__ Ret();
__ bind(&failed);
......
......@@ -1833,7 +1833,8 @@ void FullCodeGenerator::EmitOperandStackDepthCheck() {
int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp +
operand_stack_depth_ * kPointerSize;
__ sub(r3, fp, sp);
__ cmpi(r3, Operand(expected_diff));
__ mov(ip, Operand(expected_diff));
__ cmp(r3, ip);
__ Assert(eq, kUnexpectedStackDepth);
}
}
......
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