[baseline] Use a more obvious error message when the accumulator is clobbered
This error type is very common and deserves its own error message instead of the generic "Unexpected value" one. Change-Id: I07a0de8b190db58e97fae98d0f7347872efd9995 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892694 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#83180}
This commit is contained in:
parent
c8a2d899e2
commit
c894fee0c7
@ -610,7 +610,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->cmp(reg, kInterpreterAccumulatorRegister);
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue);
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered);
|
||||
}
|
||||
|
||||
} // namespace baseline
|
||||
|
@ -677,7 +677,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->CmpTagged(reg, kInterpreterAccumulatorRegister);
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue);
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered);
|
||||
}
|
||||
|
||||
} // namespace baseline
|
||||
|
@ -577,7 +577,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->cmp(reg, kInterpreterAccumulatorRegister);
|
||||
assembler_->masm()->Assert(equal, AbortReason::kUnexpectedValue);
|
||||
assembler_->masm()->Assert(equal, AbortReason::kAccumulatorClobbered);
|
||||
}
|
||||
|
||||
} // namespace baseline
|
||||
|
@ -569,7 +569,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue, reg,
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered, reg,
|
||||
Operand(kInterpreterAccumulatorRegister));
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue, reg,
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered, reg,
|
||||
Operand(kInterpreterAccumulatorRegister));
|
||||
}
|
||||
|
||||
|
@ -754,7 +754,7 @@ inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
} else {
|
||||
assembler_->masm()->CmpU64(reg, kInterpreterAccumulatorRegister);
|
||||
}
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue);
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered);
|
||||
}
|
||||
|
||||
} // namespace baseline
|
||||
|
@ -602,7 +602,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue, reg,
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered, reg,
|
||||
Operand(kInterpreterAccumulatorRegister));
|
||||
}
|
||||
} // namespace baseline
|
||||
|
@ -752,7 +752,7 @@ inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
} else {
|
||||
assembler_->masm()->CmpU64(reg, kInterpreterAccumulatorRegister);
|
||||
}
|
||||
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue);
|
||||
assembler_->masm()->Assert(eq, AbortReason::kAccumulatorClobbered);
|
||||
}
|
||||
|
||||
} // namespace baseline
|
||||
|
@ -639,7 +639,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
|
||||
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
|
||||
Register reg) {
|
||||
assembler_->masm()->cmp_tagged(reg, kInterpreterAccumulatorRegister);
|
||||
assembler_->masm()->Assert(equal, AbortReason::kUnexpectedValue);
|
||||
assembler_->masm()->Assert(equal, AbortReason::kAccumulatorClobbered);
|
||||
}
|
||||
|
||||
} // namespace baseline
|
||||
|
@ -17,6 +17,7 @@ namespace internal {
|
||||
"32 bit value in register is not zero-extended") \
|
||||
V(kSignedBitOfSmiIsNotZero, "Signed bit of 31 bit smi register is not zero") \
|
||||
V(kAPICallReturnedInvalidObject, "API call returned invalid object") \
|
||||
V(kAccumulatorClobbered, "Accumulator clobbered") \
|
||||
V(kAllocatingNonEmptyPackedArray, "Allocating non-empty packed array") \
|
||||
V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \
|
||||
V(kExpectedOptimizationSentinel, \
|
||||
|
Loading…
Reference in New Issue
Block a user