Commit 77599ffe authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64] Add block before LoadAddress

fix node.js DCHECK failed
issue: https://github.com/riscv-collab/v8/issues/514

Change-Id: I07f40e6aca05be3eb7304a43235185fd40ebc1f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3260979Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#77750}
parent 057ffb82
......@@ -437,6 +437,7 @@ void BaselineAssembler::Switch(Register reg, int case_value_base,
CHECK(is_int32(imm64 + 0x800));
int32_t Hi20 = (((int32_t)imm64 + 0x800) >> 12);
int32_t Lo12 = (int32_t)imm64 << 20 >> 20;
__ BlockTrampolinePoolFor(2);
__ auipc(t6, Hi20); // Read PC + Hi20 into t6
__ addi(t6, t6, Lo12); // jump PC + Hi20 + Lo12
......
......@@ -3543,6 +3543,7 @@ void TurboAssembler::LoadAddress(Register dst, Label* target,
CHECK(is_int32(offset + 0x800));
int32_t Hi20 = (((int32_t)offset + 0x800) >> 12);
int32_t Lo12 = (int32_t)offset << 20 >> 20;
BlockTrampolinePoolScope block_trampoline_pool(this);
auipc(dst, Hi20);
addi(dst, dst, Lo12);
} else {
......
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