add mfspr and mtspr to sv_analysis.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 28 Dec 2020 20:11:12 +0000 (20:11 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 28 Dec 2020 20:11:12 +0000 (20:11 +0000)
openpower/isatables/RM-2P-1S1D.csv
openpower/sv_analysis.py

index 49bcb6d38dfbeee2bd6a6a7994a51f4c31276700..393bc24828ae4347c4f6e37de8daaae1b34abd30 100644 (file)
@@ -12,9 +12,9 @@ neg,2P,EXTRA3,d:RT,s:RA,,,RA,NONE,NONE,RT,NONE,NONE
 popcntb,2P,EXTRA3,d:RA,s:RS,,,RS,NONE,NONE,RA,NONE,NONE
 prtyw,2P,EXTRA3,d:RA,s:RS,,,RS,NONE,NONE,RA,NONE,NONE
 prtyd,2P,EXTRA3,d:RA,s:RS,,,RS,NONE,NONE,RA,NONE,NONE
-mfspr,2P,EXTRA3,TODO,,,,SPR,NONE,NONE,RT,NONE,NONE
+mfspr,2P,EXTRA3,d:RS,s:SPR,,,SPR,NONE,NONE,RT,NONE,NONE
 popcntw,2P,EXTRA3,d:RA,s:RS,,,RS,NONE,NONE,RA,NONE,NONE
-mtspr,2P,EXTRA3,TODO,,,,RS,NONE,NONE,SPR,NONE,NONE
+mtspr,2P,EXTRA3,d:SPR,s:RS,,,RS,NONE,NONE,SPR,NONE,NONE
 popcntd,2P,EXTRA3,d:RA,s:RS,,,RS,NONE,NONE,RA,NONE,NONE
 nego,2P,EXTRA3,d:RT,s:RA,,,RA,NONE,NONE,RT,NONE,NONE
 addic,2P,EXTRA3,d:RT,s:RA,,,RA,,NONE,RT,NONE,NONE
index 9698bc457183ebe5bc76c235b8cf1561193a89db..95593856426fc58b4d2d396abef061b6519bc48f 100644 (file)
@@ -416,7 +416,13 @@ def process_csvs():
 
             elif value == 'RM-2P-1S1D':
                 res['Etype'] = 'EXTRA3' # RM EXTRA3 type
-                if name == 'CRio' and insn_name == 'mcrf':
+                if insn_name == 'mtspr':
+                    res['0'] = 'd:SPR' # SPR: Rdest1_EXTRA3
+                    res['1'] = 's:RS' # RS: Rsrc1_EXTRA3
+                elif insn_name == 'mfspr':
+                    res['0'] = 'd:RS' # RS: Rdest1_EXTRA3
+                    res['1'] = 's:SPR' # SPR: Rsrc1_EXTRA3
+                elif name == 'CRio' and insn_name == 'mcrf':
                     res['0'] = 'd:BF' # BFA: Rdest1_EXTRA3
                     res['1'] = 's:BFA' # BFA: Rsrc1_EXTRA3
                 elif 'mfcr' in insn_name or 'mfocrf' in insn_name: