From: Luke Kenneth Casson Leighton Date: Mon, 14 Jun 2021 21:49:59 +0000 (+0100) Subject: whoops forgot format-to-format conversion X-Git-Tag: xlen-bcd~467 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=115c29db017e4a2d1f9c78a568fd899ac4c0ee9d;p=openpower-isa.git whoops forgot format-to-format conversion --- diff --git a/src/openpower/sv/trans/svp64.py b/src/openpower/sv/trans/svp64.py index 7d2a7346..e3aa1d3f 100644 --- a/src/openpower/sv/trans/svp64.py +++ b/src/openpower/sv/trans/svp64.py @@ -751,21 +751,21 @@ def macro_subst(macros, txt): toreplace = '%s.s' % macro if toreplace == txt: again = True - replaced = txt.replace(toreplace, value) + replaced = txt.replace(toreplace, "%s.s" % value) print ("macro", txt, "replaced", replaced, toreplace, value) txt = replaced continue toreplace = '%s.v' % macro if toreplace == txt: again = True - replaced = txt.replace(toreplace, value) + replaced = txt.replace(toreplace, "%s.v" % value) print ("macro", txt, "replaced", replaced, toreplace, value) txt = replaced continue toreplace = '(%s)' % macro - if toreplace == txt: + if toreplace in txt: again = True - replaced = txt.replace(toreplace, value) + replaced = txt.replace(toreplace, '(%s)' % value) print ("macro", txt, "replaced", replaced, toreplace, value) txt = replaced continue