Commit 7f51fdac authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC: fix debug build break

Fix debug build break by using pc-relative code on ComputeCodeStartAddress

R=joransiu@ca.ibm.com

Change-Id: I81c3a3e220c9f4f90772bcb39f1a9b9d48661e19
Reviewed-on: https://chromium-review.googlesource.com/1222606Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55840}
parent 350dfb62
......@@ -882,9 +882,7 @@ void CodeGenerator::BailoutIfDeoptimized() {
void CodeGenerator::GenerateSpeculationPoisonFromCodeStartRegister() {
Register scratch = kScratchReg;
__ mflr(r0);
__ LoadPC(scratch);
__ subi(scratch, scratch, Operand(__ pc_offset() - kInstrSize));
__ ComputeCodeStartAddress(scratch);
// Calculate a mask which has all bits set in the normal case, but has all
// bits cleared if we are speculatively executing the wrong PC.
......@@ -893,7 +891,6 @@ void CodeGenerator::GenerateSpeculationPoisonFromCodeStartRegister() {
__ notx(kSpeculationPoisonRegister, scratch);
__ isel(eq, kSpeculationPoisonRegister,
kSpeculationPoisonRegister, scratch);
__ mtlr(r0);
}
void CodeGenerator::AssembleRegisterArgumentPoisoning() {
......
......@@ -906,11 +906,10 @@ void TurboAssembler::LoadPC(Register dst) {
}
void TurboAssembler::ComputeCodeStartAddress(Register dst) {
Label current_pc;
mov_label_addr(dst, &current_pc);
bind(&current_pc);
subi(dst, dst, Operand(pc_offset()));
mflr(r0);
LoadPC(dst);
subi(dst, dst, Operand(pc_offset() - kInstrSize));
mtlr(r0);
}
void TurboAssembler::LoadConstantPoolPointerRegister() {
......
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