when dividing 0xC4E32B68 by 0x32867D69, the ISA simulator appears to give 0xFFFFFFFF as the result -- the correct result is 0x3
see comment on mailing list: http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-July/008637.html
yep, that's down to changing of a "hack" function which is now no longer appropriate diff --git a/src/soc/decoder/pseudo/parser.py b/src/soc/decoder/pseudo/parser.py index 346e3f98..3d75fbb0 100644 --- a/src/soc/decoder/pseudo/parser.py +++ b/src/soc/decoder/pseudo/parser.py @@ -615,7 +615,8 @@ class PowerParser: 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': + # XXX DISABLE BAD HACK (False) + if False and isinstance(l, ast.Name) and l.id == 'dividend': if p[2] == '/': fn = 'trunc_divs' else:
this is related to that helper function that you wrote (which is great btw). it turns out that it's a signed (only) floor_div function, and that calling "standard" (python3) floordiv is appropriate in unsigned cases (such as divwuo) i had messed up the parser and called the wrong function since changing the pseudo-code to actually *explicitly* call DIVS: http://lists.mailinglist.openpowerfoundation.org/pipermail/openpower-hdl-cores/2020-July/000078.html