From: Dmitry Selyutin Date: Wed, 31 May 2023 21:04:13 +0000 (+0300) Subject: power_insn: forbid r0 for RA0 and RT0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8498fc42d2b690e32c4c54ba880fe08a32763a5;p=openpower-isa.git power_insn: forbid r0 for RA0 and RT0 --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index f93037dd..d480a3f3 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1264,6 +1264,8 @@ class ExtendableOperand(DynamicOperand): value = value[1:] vector = True if value.startswith(prefix): + if (self.extra_reg.or_zero and (value == f"{prefix}0")): + raise ValueError(value) value = value[len(prefix):] value = int(value, 0)