[Libre-soc-isa] [Bug 896] DOUBLE2SINGLE doesn't handle generating the return value for inf/nan inputs

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Jul 28 11:09:06 BST 2022


Jacob Lifshay <programmerjake at gmail.com> changed:

           What    |Removed                     |Added
       The table of|                            |jacob=0
  payments (in EUR)|                            |
     for this task;|                            |
        TOML format|                            |
    NLnet milestone|---                         |Future
                 CC|                            |lkcl at lkcl.net
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
    parent task for|                            |487
  budget allocation|                            |

--- Comment #4 from Jacob Lifshay <programmerjake at gmail.com> ---
I re-converted the code from the PowerISA v3.1B spec. it took me quite a bit
more time than anticipated, since I had to improve the pseudocode parser to let
me figure out where the code was it didn't like -- even then I had to resort to
commenting everything in the pseudo-code and uncommenting stuff until it broke


I also fixed line number counting, so the parser's parse errors should have the
correct line numbers.

I renamed DOUBLE2SINGLE to FRSP since that's the instruction name, and since I
had to add the FPSCR argument and return it.

I added a helper wrapper DOUBLE2SINGLE that just calls FRSP, so we don't have
to migrate everything right now.

I ran all the test_caller*.py files that mention DOUBLE2SINGLE, they all pass
except for test_caller_svp64_fft.py, which fails in a way that afaict is
unrelated (I also checked on commit 5f111b1fb9 before I made these changes).

Luke, can you add some funding to this bug?

test_caller_svp64_fft.py backtrace:

  File "src/openpower/decoder/isa/test_caller_svp64_fft.py", line 369, in
    sim = self.run_tst_program(program, svstate=svstate,
  File "src/openpower/decoder/isa/test_caller_svp64_fft.py", line 769, in
    simulator = run_tst(prog, initial_regs, mem=initial_mem,
line 166, in run_tst
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/core.py", line 177,
in run
    while self.advance():
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/core.py", line 168,
in advance
    return self._engine.advance()
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/pysim.py", line 319,
in advance
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/pysim.py", line 308,
in _step
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/_pycoro.py", line
125, in run
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/_pycoro.py", line 64,
in run
    command = self.coroutine.send(response)
  File "/home/jacob/projects/libreriscv/nmigen/nmigen/sim/core.py", line 82, in
    yield from process()
line 154, in process
    yield from simulator.execute_one()
line 1044, in execute_one
    yield from self.call(opname)         # execute the instruction
line 1447, in call
    nia_update = (yield from self.check_step_increment(results, rc_en,
line 1691, in check_step_increment
    return nia_update
UnboundLocalError: local variable 'nia_update' referenced before assignment

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

More information about the Libre-SOC-ISA mailing list