[Libre-soc-bugs] [Bug 1072] implement fcvt/fmv instructions in ISACaller (ls006)

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri May 12 08:06:11 BST 2023


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

--- Comment #23 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #22)
> (In reply to Jacob Lifshay from comment #21)
> 
> > next is adding smoke tests of the rest of fp_working_format, and deciding if
> > we want the bfp_* functions to be manually translated from mostly english
> > prose to pseudocode (preferred) 
> 
> yes agreed. ultimately they could be submitted to the OPF ISAWG
> to add to the Appendix.

ok, in that case I won't add the comment saying they're not intended for
submission.

I started implementing the required bfp_* functions. I ran into a few issues,
two of which are worth mentioning:
1. I kept on running into the lack of shift operators  ...they added <<< and
>>> for rotate operators...shift operators are defined for the section where
all the bfp_* functions are defined, so we should be able to use them there.

2. there is no truediv operator available in pseudocode -- the PowerISA spec
specifies to use `/` for that, but you decided to use that for trunc_div.
therefore I made operator.truediv available to pseudocode as a function. when
translating to latex, we can do `/` -> `÷` and `truediv` -> `/`.

commit f81a4bdb764b21be6c6d11cd2b7c2da137e00157
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:48:06 2023 -0700

    add some bfp_* functions -- this isn't yet enough to run fcvt*

commit 75b7af33c1aa0ef9373a44a679da87ac4171487f
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:44:51 2023 -0700

    make truediv available to pseudocode

    technically `/` in pseudocode is supposed to be real number division,
    with `÷` being division with result truncated to integer, however
    luke decided to just use `/` for integer division in pseudocode,
    so we need a way to work around that.

commit 0ebd4c333d0deab4a2459750124c6f41a543af96
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:43:41 2023 -0700

    add bfp classification predicates

commit 2fd9dc8c963af023b03e8bda07d353cf4b4d0a86
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:38:09 2023 -0700

    allow assigning BFPState and SelectableMSB0Fraction values in pseudo-code

commit aceb10a5053c82c35b97b9228a6af89a4e6b8a98
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:35:41 2023 -0700

    add support for *_flag global variables needed by bfp_* functions

commit f6fbc46dd0a4cc4dcee7c20b7d898d11b7634fa4
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:32:16 2023 -0700

    make lexer replace class with class_ since it's a python keyword

commit 1a6d7f573af34407b1423c0bad7b6bb4a43bc5b7
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:31:02 2023 -0700

    fix SelectableMSB0Fraction's constructor

commit 36ce3b2f3106e934eac9d3ad0e9f535c342da42c
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 23:30:12 2023 -0700

    undefined is a function that needs to be called

commit f88d2ee9e6fbe6b3caec214b4a035c8d294a1ff0
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 22:49:34 2023 -0700

    fix broken FPSCR fields

commit f99d9cd515995b2d628ca295bfc94a8565700c88
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu May 11 18:53:59 2023 -0700

    Revert "add stub reset_xflags function"

    the function actually should be in pseudocode

    This reverts commit c44cd164b385a18fb635e7087c2a253c30d9c81c.

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


More information about the libre-soc-bugs mailing list