From f91ac7472f8d221d7e1f5423a80e81a03bbce182 Mon Sep 17 00:00:00 2001 From: luyahan Date: Wed, 9 Sep 2020 11:48:42 +0900 Subject: [PATCH] Fix error about emit constant pool - Can't emit constant pool in deconstruct func. - Forced emit when jump a target. --- src/codegen/riscv64/assembler-riscv64.h | 1 - src/codegen/riscv64/macro-assembler-riscv64.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/codegen/riscv64/assembler-riscv64.h b/src/codegen/riscv64/assembler-riscv64.h index e4e9e2bb8a4d..06fce9ea8020 100644 --- a/src/codegen/riscv64/assembler-riscv64.h +++ b/src/codegen/riscv64/assembler-riscv64.h @@ -154,7 +154,6 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { std::unique_ptr = {}); virtual ~Assembler() { - ForceConstantPoolEmissionWithoutJump(); CHECK(constpool_.IsEmpty()); } diff --git a/src/codegen/riscv64/macro-assembler-riscv64.cc b/src/codegen/riscv64/macro-assembler-riscv64.cc index d0aab6e272ed..ed65f20baec3 100644 --- a/src/codegen/riscv64/macro-assembler-riscv64.cc +++ b/src/codegen/riscv64/macro-assembler-riscv64.cc @@ -2877,7 +2877,7 @@ void TurboAssembler::Jump(Register target, Condition cond, Register rs, BlockTrampolinePoolScope block_trampoline_pool(this); if (cond == cc_always) { jr(target); - EmitConstPoolWithJumpIfNeeded(); + ForceConstantPoolEmissionWithoutJump(); } else { BRANCH_ARGS_CHECK(cond, rs, rt); Branch(kInstrSize * 2, NegateCondition(cond), rs, rt);