Commit 4e524e90 authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64]Implement PrepareForDeoptimizationExits

Bug: v8:12211

Change-Id: Ib12b2327bcbb93ef2556ce32a43a8b5749bbdd39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3153835
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: 's avatarJi Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76781}
parent f90c1ec3
...@@ -1192,6 +1192,14 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { ...@@ -1192,6 +1192,14 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
VectorUnit VU; VectorUnit VU;
void CheckTrampolinePoolQuick(int extra_instructions = 0) {
DEBUG_PRINTF("\tpc_offset:%d %d\n", pc_offset(),
next_buffer_check_ - extra_instructions * kInstrSize);
if (pc_offset() >= next_buffer_check_ - extra_instructions * kInstrSize) {
CheckTrampolinePool();
}
}
protected: protected:
// Readable constants for base and offset adjustment helper, these indicate if // Readable constants for base and offset adjustment helper, these indicate if
// aside from offset, another value like offset + 4 should fit into int16. // aside from offset, another value like offset + 4 should fit into int16.
...@@ -1270,14 +1278,6 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { ...@@ -1270,14 +1278,6 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
bool is_buffer_growth_blocked() const { return block_buffer_growth_; } bool is_buffer_growth_blocked() const { return block_buffer_growth_; }
void CheckTrampolinePoolQuick(int extra_instructions = 0) {
DEBUG_PRINTF("\tpc_offset:%d %d\n", pc_offset(),
next_buffer_check_ - extra_instructions * kInstrSize);
if (pc_offset() >= next_buffer_check_ - extra_instructions * kInstrSize) {
CheckTrampolinePool();
}
}
#ifdef DEBUG #ifdef DEBUG
bool EmbeddedObjectMatches(int pc_offset, Handle<Object> object) { bool EmbeddedObjectMatches(int pc_offset, Handle<Object> object) {
return target_address_at( return target_address_at(
......
...@@ -3061,7 +3061,17 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { ...@@ -3061,7 +3061,17 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
void CodeGenerator::FinishCode() { __ ForceConstantPoolEmissionWithoutJump(); } void CodeGenerator::FinishCode() { __ ForceConstantPoolEmissionWithoutJump(); }
void CodeGenerator::PrepareForDeoptimizationExits( void CodeGenerator::PrepareForDeoptimizationExits(
ZoneDeque<DeoptimizationExit*>* exits) {} ZoneDeque<DeoptimizationExit*>* exits) {
int total_size = 0;
for (DeoptimizationExit* exit : deoptimization_exits_) {
total_size += (exit->kind() == DeoptimizeKind::kLazy)
? Deoptimizer::kLazyDeoptExitSize
: Deoptimizer::kNonLazyDeoptExitSize;
}
__ CheckTrampolinePoolQuick(total_size);
DCHECK(Deoptimizer::kSupportsFixedDeoptExitSizes);
}
void CodeGenerator::AssembleMove(InstructionOperand* source, void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) { InstructionOperand* destination) {
......
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