From 9e30d0054e7b3eb10e4e464b12ae3cc1eecc9585 Mon Sep 17 00:00:00 2001 From: bd Date: Tue, 1 Apr 2025 23:22:12 -0400 Subject: Fix bug with decode pushing checked_out when delayed with RAW --- src/sim/id.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/sim/id.cc') diff --git a/src/sim/id.cc b/src/sim/id.cc index 0df26f4..0c0be91 100644 --- a/src/sim/id.cc +++ b/src/sim/id.cc @@ -102,9 +102,10 @@ void ID::decode_R_type(signed int &s1, signed int &s2, signed int &s3) r1 = this->read_guard(s1); r2 = this->read_guard(s2); - this->write_guard(s3); - this->status = (r1 == OK && r2 == OK) ? OK : STALLED; + + if (this->status == OK) + this->write_guard(s3); } void ID::decode_I_type( @@ -123,7 +124,8 @@ void ID::decode_I_type( r1 = this->read_guard(s1); if (m != STORE && m != STOREV) { this->status = r1; - this->write_guard(s2); + if (r1 == OK) + this->write_guard(s2); } else this->status = (this->read_guard(s2) == OK && r1 == OK) ? OK : STALLED; } -- cgit v1.2.3