[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 12:21:08 BST 2022


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

--- Comment #5 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #4)
> 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 again.

yep that sounds like a normal debugging technique.  good to see it occurred
to you.

> https://git.libre-soc.org/?p=openpower-isa.git;a=commit;
> h=d648bc9ed1fc7403e41011ed2d06ba1d08b0939a
> 
> I also fixed line number counting, so the parser's parse errors should have
> the correct line numbers.

ah nice

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

ahh very nice.  i would have done it as a global.  in fact that may have
to be done that way, as FPSCR should be expected to be
in the namespace of ISACaller.

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

briilliant

> 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?

unfortunately there isn't any (for this topic), which is one of the reasons
i didn't raise it or tackle it.

it might be possible to sneak in under another bugreport that *needs* this.
which will need some searching.

> caller.py", line 1691, in check_step_increment
>     return nia_update
> UnboundLocalError: local variable 'nia_update' referenced before assignment

i know what that is. part of splitting ISACaller into functions.
bug #728. i know what to do.

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


More information about the Libre-SOC-ISA mailing list