truncate CR regspec_decode_write reg mask to 8 bit
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 16 Nov 2021 19:13:24 +0000 (19:13 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 16 Nov 2021 19:13:24 +0000 (19:13 +0000)
src/openpower/decoder/power_regspec_map.py

index a7f150ecb79bc015f769978b00d2c094042e2521..5ec5f6290665c5dd791e5b98402cb2ce5d1c0f3a 100644 (file)
@@ -145,7 +145,7 @@ def regspec_decode_write(e, regfile, name):
         if name == 'full_cr': # full CR (from FXM field)
             return e.do.write_cr_whole.ok, e.do.write_cr_whole.data
         if name == 'cr_a': # CR A
-            return e.write_cr.ok, 1<<(7-e.write_cr.data)
+            return e.write_cr.ok, (1<<(7-e.write_cr.data))[0:8]
 
     # XER regfile