cpu: Add IsInvalid flag to StaticInstFlags

The IsInvalid flag indicates that the static instruction is not part
of the executing ISA and not part of m5's pseudo-instructions. This
flag provides a way to recognize an illegal instruction at the decode
stage.

Change-Id: I2779c6edcd8c5e6a77ea11cad3ff73bacb79d800
Signed-off-by: Hoa Nguyen <hn@hnpl.org>
This commit is contained in:
Hoa Nguyen
2024-04-25 02:00:58 +00:00
parent d198380489
commit 369029d2be
2 changed files with 3 additions and 0 deletions

View File

@@ -99,4 +99,5 @@ class StaticInstFlags(Enum):
"IsHtmStart", # Starts a HTM transaction
"IsHtmStop", # Stops (commits) a HTM transaction
"IsHtmCancel", # Explicitely aborts a HTM transaction
"IsInvalid", # An invalid instruction
]

View File

@@ -196,6 +196,8 @@ class StaticInst : public RefCounted, public StaticInstFlags
bool isHtmStop() const { return flags[IsHtmStop]; }
bool isHtmCancel() const { return flags[IsHtmCancel]; }
bool isInvalid() const { return flags[IsInvalid]; }
bool
isHtmCmd() const
{