From: Luke Kenneth Casson Leighton Date: Wed, 21 Sep 2022 00:15:46 +0000 (+0100) Subject: add sv.madd* to sv_analysis X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa52f5542ad95b989b3087a97c6b8a49e6c90e97;p=openpower-isa.git add sv.madd* to sv_analysis --- diff --git a/openpower/isatables/RM-1P-3S1D.csv b/openpower/isatables/RM-1P-3S1D.csv index fefd9cd1..55634f36 100644 --- a/openpower/isatables/RM-1P-3S1D.csv +++ b/openpower/isatables/RM-1P-3S1D.csv @@ -31,6 +31,9 @@ isel,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:BC,RA_OR_ZERO,RB,0,RT,BC,0,0 isel,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:BC,RA_OR_ZERO,RB,0,RT,BC,0,0 isel,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:BC,RA_OR_ZERO,RB,0,RT,BC,0,0 isel,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:BC,RA_OR_ZERO,RB,0,RT,BC,0,0 +maddhd,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:RC,RA,RB,RC,RT,0,0,0 +maddhdu,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:RC,RA,RB,RC,RT,0,0,0 +maddld,NORMAL,,1P,EXTRA2,NO,d:RT,s:RA,s:RB,s:RC,RA,RB,RC,RT,0,0,0 absdacs,NORMAL,,1P,EXTRA2,NO,d:RT;d:CR0,s:RA,s:RB,s:RT,RA,RB,RT,RT,0,CR0,0 absdacu,NORMAL,,1P,EXTRA2,NO,d:RT;d:CR0,s:RA,s:RB,s:RT,RA,RB,RT,RT,0,CR0,0 ternlogi,NORMAL,,1P,EXTRA2,NO,d:RT;d:CR0,s:RA,s:RB,s:RT,RA,RB,RT,RT,0,CR0,0 diff --git a/src/openpower/sv/sv_analysis.py b/src/openpower/sv/sv_analysis.py index c1edc668..63a9be67 100644 --- a/src/openpower/sv/sv_analysis.py +++ b/src/openpower/sv/sv_analysis.py @@ -597,7 +597,12 @@ def extra_classifier(insn_name, value, name, res, regs): elif value == 'RM-1P-3S1D': res['Etype'] = 'EXTRA2' # RM EXTRA2 type - if regs == ['RA', 'RB', 'RT', 'RT', '', 'CR0']: + if regs == ['RA', 'RB', 'RC', 'RT', '', '']: # madd* + res['0'] = 'd:RT' # RT,CR0: Rdest1_EXTRA2 + res['1'] = 's:RA' # RA: Rsrc1_EXTRA2 + res['2'] = 's:RB' # RT: Rsrc2_EXTRA2 + res['3'] = 's:RC' # RT: Rsrc3_EXTRA2 + elif regs == ['RA', 'RB', 'RT', 'RT', '', 'CR0']: # overwrite 3-in res['0'] = 'd:RT;d:CR0' # RT,CR0: Rdest1_EXTRA2 res['1'] = 's:RA' # RA: Rsrc1_EXTRA2 res['2'] = 's:RB' # RT: Rsrc2_EXTRA2 @@ -607,7 +612,7 @@ def extra_classifier(insn_name, value, name, res, regs): res['1'] = 's:RA' # RA: Rsrc1_EXTRA2 res['2'] = 's:RB' # RT: Rsrc2_EXTRA2 res['3'] = 's:BC' # BC: Rsrc3_EXTRA2 - else: + else: # fmadd* res['0'] = 'd:FRT;d:CR1' # FRT, CR1: Rdest1_EXTRA2 res['1'] = 's:FRA' # FRA: Rsrc1_EXTRA2 res['2'] = 's:FRB' # FRB: Rsrc2_EXTRA2 @@ -640,6 +645,7 @@ def process_csvs(format): # mapping to old SVPrefix "Forms" mapsto = {'3R-1W-CRo': 'RM-1P-3S1D', + '3R-1W': 'RM-1P-3S1D', '2R-1W-CRio': 'RM-1P-2S1D', '2R-1W-CRi': 'RM-1P-3S1D', '2R-1W-CRo': 'RM-1P-2S1D',