From 749e8b5c7147c440a1f4a0467dcf1a67ca130588 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 11 Jul 2020 12:35:23 +0100 Subject: [PATCH] whoops output trunc_divs not trunc_div --- src/soc/decoder/pseudo/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: -- 2.30.2