[Libre-soc-bugs] [Bug 1066] New: fix bug where pseudo-code assignments modify more than just the variable being assigned to

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Apr 25 07:23:32 BST 2023


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

            Bug ID: 1066
           Summary: fix bug where pseudo-code assignments modify more than
                    just the variable being assigned to
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: IN_PROGRESS
          Severity: normal
          Priority: ---
         Component: Source Code
          Assignee: programmerjake at gmail.com
          Reporter: programmerjake at gmail.com
                CC: libre-soc-bugs at lists.libre-soc.org,
                    programmerjake at gmail.com
   NLnet milestone: ---
       The table of jacob=0
  payments (in EUR)
     for this task;
       TOML format:

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=4e701a851536bba6648779c183293ba75e7ea7b8

commit 4e701a851536bba6648779c183293ba75e7ea7b8
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Mon Apr 24 23:15:11 2023 -0700

    fix bug where pseudo-code assignments modify more than just the variable
being assigned to

I added `copy_assign_rhs` calls to all pseudo-code assignment RHSes so that
SelectableInt instances (and whatever other stuff is needed) can be copied.

Example from commit:
# this needs to copy the SelectableInt instance in RA
# not just assign a reference to it to A
A <- RA
A[0] <- 1  # if the copy wasn't performed, we just modified RA too!

This shows up in the `minmax` pseudo-code:
b <- (RB)
...
b[0] <- ¬b[0]

before this fix, that pseudo-code undesirably modified the value in the GPR!

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


More information about the libre-soc-bugs mailing list