whoops must include SVSTATE in STATE regfile regspec read/write map
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 4 May 2021 17:33:36 +0000 (18:33 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 4 May 2021 17:33:36 +0000 (18:33 +0100)
src/openpower/decoder/power_regspec_map.py

index eee049672dc6bf61fe92d124760f6e42c99ee4c4..c55ffe61b271d7f45888323ee5d90d042cda2da5 100644 (file)
@@ -92,10 +92,13 @@ def regspec_decode_read(e, regfile, name):
         # STATE register numbering is *unary* encoded
         PC = 1<<StateRegsEnum.PC
         MSR = 1<<StateRegsEnum.MSR
+        SVSTATE = 1<<StateRegsEnum.SVSTATE
         if name in ['cia', 'nia']:
             return Const(1), PC # TODO: detect read-conditions
         if name == 'msr':
             return Const(1), MSR # TODO: detect read-conditions
+        if name == 'svstate':
+            return Const(1), SVSTATE # TODO: detect read-conditions
 
     # FAST regfile
 
@@ -161,10 +164,13 @@ def regspec_decode_write(e, regfile, name):
         # STATE register numbering is *unary* encoded
         PC = 1<<StateRegsEnum.PC
         MSR = 1<<StateRegsEnum.MSR
+        SVSTATE = 1<<StateRegsEnum.SVSTATE
         if name in ['cia', 'nia']:
             return None, PC # hmmm
         if name == 'msr':
             return None, MSR # hmmm
+        if name == 'svstate':
+            return None, SVSTATE # hmmm
 
     # FAST regfile