PPC/s390: [turbofan] Better checking of code start register.
Port 5586ecfc68
Original Commit Message:
This decouples the checking of the {kJavaScriptCallCodeStartRegister}
from the deoptimization checks. We now rely more heavily on the above
register and should check its validity more broadly. Note that there
also is a bug fix for the ARM port contained in this change.
R=mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N
Change-Id: Ic8b58994b083c6c0ec73173120cedf6391b1c964
Reviewed-on: https://chromium-review.googlesource.com/938522
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51620}
This commit is contained in:
parent
278b00c527
commit
1ce7a7f92a
@ -793,7 +793,15 @@ void CodeGenerator::AssembleTailCallAfterGap(Instruction* instr,
|
||||
|
||||
// Check that {kJavaScriptCallCodeStartRegister} is correct.
|
||||
void CodeGenerator::AssembleCodeStartRegisterCheck() {
|
||||
// TODO(mstarzinger): Implement me.
|
||||
Register scratch = kScratchReg;
|
||||
|
||||
Label current_pc;
|
||||
__ mov_label_addr(scratch, ¤t_pc);
|
||||
|
||||
__ bind(¤t_pc);
|
||||
__ subi(scratch, scratch, Operand(__ pc_offset()));
|
||||
__ cmp(scratch, kJavaScriptCallCodeStartRegister);
|
||||
__ Assert(eq, AbortReason::kWrongFunctionCodeStart);
|
||||
}
|
||||
|
||||
// Check if the code object is marked for deoptimization. If it is, then it
|
||||
|
@ -1040,7 +1040,11 @@ void CodeGenerator::AssembleTailCallAfterGap(Instruction* instr,
|
||||
|
||||
// Check that {kJavaScriptCallCodeStartRegister} is correct.
|
||||
void CodeGenerator::AssembleCodeStartRegisterCheck() {
|
||||
// TODO(mstarzinger): Implement me.
|
||||
Register scratch = r1;
|
||||
int pc_offset = __ pc_offset();
|
||||
__ larl(scratch, Operand(-pc_offset/2));
|
||||
__ CmpP(scratch, kJavaScriptCallCodeStartRegister);
|
||||
__ Assert(eq, AbortReason::kWrongFunctionCodeStart);
|
||||
}
|
||||
|
||||
// Check if the code object is marked for deoptimization. If it is, then it
|
||||
|
Loading…
Reference in New Issue
Block a user