[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:58:31 GMT 2021


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

--- Comment #52 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
 272                 if imm >= 0:
 273                     value = (~initial_regs[1]+2**64) + (imm) + 1
 274                 else:
 275                     value = (~initial_regs[1]+2**64) + (imm+2**64) + 1

can become:

    value = (~initial_regs[1]+2**64) + (imm) + 1
    if imm < 0:
        value += 2**64

always look for patterns like that, rather than duplicate complex
identical expressions.

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


More information about the libre-soc-bugs mailing list