Commit ff0432c8 authored by Pierre Langlois's avatar Pierre Langlois Committed by V8 LUCI CQ

[baseline][arm64] Do not generate BTI instructions for every label.

We already generate BTI instructions with
`BaselineAssembler::JumpTarget()` on `VisitSingleBytecode()`, so we
shouldn't need to do it when binding a label.

Bug: v8:13082
Change-Id: Ie4d645a2379c3feb4909be524b42ebd85a8d35af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3771861Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/main@{#81813}
parent a2ac1ac6
......@@ -93,7 +93,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
}
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP on arm.
......
......@@ -88,12 +88,7 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
return MemOperand(fp, BaselineFrameConstants::kFeedbackVectorFromFp);
}
void BaselineAssembler::Bind(Label* label) {
// All baseline compiler binds on arm64 are assumed to be for jump targets.
__ BindJumpTarget(label);
}
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ Bind(label); }
void BaselineAssembler::Bind(Label* label) { __ Bind(label); }
void BaselineAssembler::JumpTarget() { __ JumpTarget(); }
......
......@@ -44,10 +44,6 @@ class BaselineAssembler {
inline void DecodeField(Register reg);
inline void Bind(Label* label);
// Binds the label without marking it as a valid jump target.
// This is only useful, when the position is already marked as a valid jump
// target (i.e. at the beginning of the bytecode).
inline void BindWithoutJumpTarget(Label* label);
// Marks the current position as a valid jump target on CFI enabled
// architectures.
inline void JumpTarget();
......
......@@ -472,12 +472,12 @@ void BaselineCompiler::VisitSingleBytecode() {
// Bind labels for this offset that have already been linked to a
// jump (i.e. forward jumps, excluding jump tables).
for (auto&& label : labels_[offset]->linked) {
__ BindWithoutJumpTarget(&label->label);
__ Bind(&label->label);
}
#ifdef DEBUG
labels_[offset]->linked.Clear();
#endif
__ BindWithoutJumpTarget(&labels_[offset]->unlinked);
__ Bind(&labels_[offset]->unlinked);
}
// Mark position as valid jump target. This is required for the deoptimizer
......
......@@ -95,7 +95,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
}
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP on ia32.
......
......@@ -89,8 +89,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP.
}
......
......@@ -91,8 +91,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP.
}
......
......@@ -89,8 +89,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP.
}
......
......@@ -174,7 +174,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
}
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP on arm.
......
......@@ -87,8 +87,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// Nop
}
......
......@@ -174,7 +174,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
}
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP on arm.
......
......@@ -97,7 +97,6 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() {
}
void BaselineAssembler::Bind(Label* label) { __ bind(label); }
void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); }
void BaselineAssembler::JumpTarget() {
// NOP on x64.
......
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