Commit 00de0e8b authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC: use pc-relative sequence for poisoning

Use pc relative code on poisoning to allow
relocation of bytecode handler. This is allow
v8_enable_embedded_bytecode_handlers on ppc.

Bug: v8:8068

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