add implicit rs detection for maddsubrs
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Apr 2023 20:01:28 +0000 (21:01 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Apr 2023 20:01:28 +0000 (21:01 +0100)
src/openpower/decoder/power_decoder2.py

index 88b2023859061d7601a9dc94e052c75ec59fd8b1..2b9af402cfca43edfb53891f13166fc3de1c2d07 100644 (file)
@@ -1066,6 +1066,12 @@ class PowerDecodeSubset(Elaboratable):
                 )):
                 comb += self.implicit_rs.eq(1)
                 comb += self.extend_rc_maxvl.eq(1) # RS=RT+MAXVL or RS=RC
+            # implicit RS for major 22, integer maddsubrs
+            with m.If((major == 22) & xo6.matches(
+                    '-01000',  # maddsubrs
+                )):
+                comb += self.implicit_rs.eq(1)
+                comb += self.extend_rb_maxvl.eq(1) # extend RB
 
         # rc and oe out
         comb += self.do_copy("rc", dec_rc.rc_out)