whoops output trunc_divs not trunc_div
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 11 Jul 2020 11:35:23 +0000 (12:35 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 11 Jul 2020 11:35:23 +0000 (12:35 +0100)
src/soc/decoder/pseudo/parser.py

index ddd49fabeeb9c4fff5edb6623d37a4c664d0d965..8c6a1f2e1de2ba2150747beab8936f44b90af5ad 100644 (file)
@@ -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: