Commit 815c3758 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: add LoadPC to fix compilation error

R=joransiu@ca.ibm.com

Change-Id: Ia8cb93f4d01e252ec6b3b538f795550768db5726
Reviewed-on: https://chromium-review.googlesource.com/c/1362083Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58033}
parent 7866cb26
...@@ -1336,11 +1336,7 @@ void CodeGenerator::BailoutIfDeoptimized() { ...@@ -1336,11 +1336,7 @@ void CodeGenerator::BailoutIfDeoptimized() {
void CodeGenerator::GenerateSpeculationPoisonFromCodeStartRegister() { void CodeGenerator::GenerateSpeculationPoisonFromCodeStartRegister() {
Register scratch = r1; Register scratch = r1;
Label current_pc; __ ComputeCodeStartAddress(scratch);
__ larl(scratch, &current_pc);
__ bind(&current_pc);
__ SubP(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.
......
...@@ -4400,6 +4400,12 @@ void TurboAssembler::ComputeCodeStartAddress(Register dst) { ...@@ -4400,6 +4400,12 @@ void TurboAssembler::ComputeCodeStartAddress(Register dst) {
larl(dst, Operand(-pc_offset() / 2)); larl(dst, Operand(-pc_offset() / 2));
} }
void TurboAssembler::LoadPC(Register dst) {
Label current_pc;
larl(dst, &current_pc);
bind(&current_pc);
}
void TurboAssembler::JumpIfEqual(Register x, int32_t y, Label* dest) { void TurboAssembler::JumpIfEqual(Register x, int32_t y, Label* dest) {
Cmp32(x, Operand(y)); Cmp32(x, Operand(y));
beq(dest); beq(dest);
......
...@@ -1006,6 +1006,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -1006,6 +1006,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void ResetSpeculationPoisonRegister(); void ResetSpeculationPoisonRegister();
void ComputeCodeStartAddress(Register dst); void ComputeCodeStartAddress(Register dst);
void LoadPC(Register dst);
private: private:
static const int kSmiShift = kSmiTagSize + kSmiShiftSize; static const int kSmiShift = kSmiTagSize + kSmiShiftSize;
......
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