[Libre-soc-bugs] [Bug 730] adapt ALU test cases to include expected results

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Nov 25 00:46:31 GMT 2021


https://bugs.libre-soc.org/show_bug.cgi?id=730

--- Comment #51 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
 260                 if result < 0:
 261                     e.intregs[3] = (result + 2**64) & ((2**64)-1)
 262                 else:
 263                     e.intregs[3] = result & ((2**64)-1)

can just be:

 263                     e.intregs[3] = result & ((2**64)-1)

(a negative number in python is automatically made a +ve
 result if ANDed)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list