From: Luke Kenneth Casson Leighton Date: Sat, 11 Jul 2020 11:35:23 +0000 (+0100) Subject: whoops output trunc_divs not trunc_div X-Git-Tag: div_pipeline~96 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=749e8b5c7147c440a1f4a0467dcf1a67ca130588;p=soc.git whoops output trunc_divs not trunc_div --- diff --git a/src/soc/decoder/pseudo/parser.py b/src/soc/decoder/pseudo/parser.py index ddd49fab..8c6a1f2e 100644 --- a/src/soc/decoder/pseudo/parser.py +++ b/src/soc/decoder/pseudo/parser.py @@ -611,15 +611,15 @@ class PowerParser: elif p[2] in ['/', '%']: # bad hack: if % or / used anywhere other than div/mod ops, # do % or /. however if the argument names are "dividend" - # we must call the special trunc_div and trunc_rem functions + # we must call the special trunc_divs and trunc_rems functions l, r = p[1], p[3] # actual call will be "dividend / divisor" - just check # LHS name if isinstance(l, ast.Name) and l.id == 'dividend': if p[2] == '/': - fn = 'trunc_div' + fn = 'trunc_divs' else: - fn = 'trunc_rem' + fn = 'trunc_rems' # return "function trunc_xxx(l, r)" p[0] = ast.Call(ast.Name(fn, ast.Load()), (l, r), []) else: