Commit ca73b435 authored by Liu Yu's avatar Liu Yu Committed by V8 LUCI CQ

[mips] Fix a test error in mips32

Add registers to WriteBarrierDescriptor::registers, because the second
and third registers should not be v0;

Modify the scratch registers in the baseline to prevent conflicts with
WriteBarrierDescriptor::registers;

Fix an error in AdjustBaseAndOffset().

Change-Id: Ibd16b280147d03aff03d05db1a5eb2d567d40aa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3069176Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#76070}
parent 649d3c10
......@@ -22,7 +22,7 @@ class BaselineAssembler::ScratchRegisterScope {
if (!assembler_->scratch_register_scope_) {
// If we haven't opened a scratch scope yet, for the first one add a
// couple of extra registers.
wrapped_scope_.Include(t0.bit() | t1.bit() | t2.bit() | t3.bit());
wrapped_scope_.Include(t4.bit() | t5.bit() | t6.bit() | t7.bit());
}
assembler_->scratch_register_scope_ = this;
}
......
......@@ -1988,11 +1988,11 @@ void Assembler::AdjustBaseAndOffset(MemOperand* src,
constexpr int32_t kMaxOffsetForSimpleAdjustment =
2 * kMinOffsetForSimpleAdjustment;
if (0 <= src->offset() && src->offset() <= kMaxOffsetForSimpleAdjustment) {
addiu(at, src->rm(), kMinOffsetForSimpleAdjustment);
addiu(scratch, src->rm(), kMinOffsetForSimpleAdjustment);
src->offset_ -= kMinOffsetForSimpleAdjustment;
} else if (-kMaxOffsetForSimpleAdjustment <= src->offset() &&
src->offset() < 0) {
addiu(at, src->rm(), -kMinOffsetForSimpleAdjustment);
addiu(scratch, src->rm(), -kMinOffsetForSimpleAdjustment);
src->offset_ += kMinOffsetForSimpleAdjustment;
} else if (IsMipsArchVariant(kMips32r6)) {
// On r6 take advantage of the aui instruction, e.g.:
......
......@@ -34,7 +34,7 @@ void StaticCallInterfaceDescriptor<DerivedDescriptor>::
// static
constexpr auto WriteBarrierDescriptor::registers() {
return RegisterArray(a1, v0, a0, a2, a3);
return RegisterArray(a1, t1, t0, a0, a2, v0, a3);
}
// static
......
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