Commit 5304b24a authored by Ivica Bogosavljevic's avatar Ivica Bogosavljevic Committed by Commit Bot

MIPS32R6: Put subroutine address in the jump register

Fix afd6351d

After `[csa][builtins] Port CompileLazy* to CSA` landed,
there is an implicit expectation that the address of the JS code
is stored in the target register. Due to optimizations on MIPSR6,
this address was not properly loaded.

We fix this by loading target address explicitly before performing
the jump.

TEST=mjsunit/json2,mjsunit/packed-elements

Change-Id: Ida9cb062910415bf15aa40dd20a17fc42fdba719
Reviewed-on: https://chromium-review.googlesource.com/1095155Reviewed-by: 's avatarSreten Kovacevic <sreten.kovacevic@mips.com>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53642}
parent eb5d449b
......@@ -641,7 +641,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
DCHECK_IMPLIES(
HasCallDescriptorFlag(instr, CallDescriptor::kFixedTargetRegister),
reg == kJavaScriptCallCodeStartRegister);
__ Jump(reg, reg, Code::kHeaderSize - kHeapObjectTag);
__ Addu(reg, reg, Code::kHeaderSize - kHeapObjectTag);
__ Jump(reg);
}
frame_access_state()->ClearSPDelta();
frame_access_state()->SetFrameAccessToDefault();
......
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