MulOutputData was only 64-bit output not 128-bit
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 5 Jul 2022 13:20:11 +0000 (14:20 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 5 Jul 2022 13:20:11 +0000 (14:20 +0100)
meaning that mulhd is truncated (always zero)
https://bugs.libre-soc.org/show_bug.cgi?id=855

src/soc/fu/mul/pipe_data.py

index ded4c5089a56dd22319a2343324830a9a99bd8f6..a5047be722cc36559018cfd9485c7b7b82ce70ac 100644 (file)
@@ -25,7 +25,7 @@ class MulOutputData(FUBaseData):
 
     @property
     def regspec(self):
-        return [('INT', 'o', "0:%d" % (self.pspec.XLEN)),
+        return [('INT', 'o', "0:%d" % (self.pspec.XLEN*2)), # 2xXLEN
                ('XER', 'xer_so', '32')] # XER bit 32: SO