MIPS64 Correct LLD and SCD implementation in simulator.
Change-Id: I18300c788d1a0eecb280e4cac72e52db81dd681d Reviewed-on: https://chromium-review.googlesource.com/c/1322452 Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com> Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com> Cr-Commit-Position: refs/heads/master@{#57313}
This commit is contained in:
parent
47764c761f
commit
d684678713
@ -7041,13 +7041,13 @@ void Simulator::DecodeTypeImmediate() {
|
|||||||
case LLD: {
|
case LLD: {
|
||||||
// LL/SC sequence cannot be simulated properly
|
// LL/SC sequence cannot be simulated properly
|
||||||
DCHECK_EQ(kArchVariant, kMips64r2);
|
DCHECK_EQ(kArchVariant, kMips64r2);
|
||||||
set_register(rt_reg, ReadD(rs + se_imm16, instr_.instr()));
|
set_register(rt_reg, Read2W(rs + se_imm16, instr_.instr()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SCD: {
|
case SCD: {
|
||||||
// LL/SC sequence cannot be simulated properly
|
// LL/SC sequence cannot be simulated properly
|
||||||
DCHECK_EQ(kArchVariant, kMips64r2);
|
DCHECK_EQ(kArchVariant, kMips64r2);
|
||||||
WriteD(rs + se_imm16, rt, instr_.instr());
|
Write2W(rs + se_imm16, rt, instr_.instr());
|
||||||
set_register(rt_reg, 1);
|
set_register(rt_reg, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -7149,7 +7149,7 @@ void Simulator::DecodeTypeImmediate() {
|
|||||||
DCHECK_EQ(kArchVariant, kMips64r6);
|
DCHECK_EQ(kArchVariant, kMips64r6);
|
||||||
int64_t base = get_register(instr_.BaseValue());
|
int64_t base = get_register(instr_.BaseValue());
|
||||||
int32_t offset9 = instr_.Imm9Value();
|
int32_t offset9 = instr_.Imm9Value();
|
||||||
set_register(rt_reg, ReadD(base + offset9, instr_.instr()));
|
set_register(rt_reg, Read2W(base + offset9, instr_.instr()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SC_R6: {
|
case SC_R6: {
|
||||||
@ -7166,7 +7166,7 @@ void Simulator::DecodeTypeImmediate() {
|
|||||||
DCHECK_EQ(kArchVariant, kMips64r6);
|
DCHECK_EQ(kArchVariant, kMips64r6);
|
||||||
int64_t base = get_register(instr_.BaseValue());
|
int64_t base = get_register(instr_.BaseValue());
|
||||||
int32_t offset9 = instr_.Imm9Value();
|
int32_t offset9 = instr_.Imm9Value();
|
||||||
WriteD(base + offset9, rt, instr_.instr());
|
Write2W(base + offset9, rt, instr_.instr());
|
||||||
set_register(rt_reg, 1);
|
set_register(rt_reg, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user