[Libre-soc-dev] GPR-to-FPR and FPR-to-GPR move operations

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu Jun 3 23:45:22 BST 2021

On Thu, Jun 3, 2021 at 2:40 AM Jacob Lifshay <programmerjake at gmail.com>

I finished writing the initial draft of the RFC that was requested in
> the OpenPower/Libre-SOC weekly sync meeting:
> https://libre-soc.org/openpower/sv/int_fp_mv/ (you may need to refresh)

fantastic. lots of progress already.

the following code-snippets (which can be compiled in godbolt.org online)
really hit home - for me - why the different language support is needed:

even straight c is 5 instructions, including one LD, one ST, taking up
local stack space and using 3 integer registers.

the rust and javascripts ones are, if i am honest, really shocking.
in the rust case, two const-loads using TOC have to be performed,
in order to perform three fcmps.  something like *six* FP registers
are used, and approximately 9 GPRs.

the javascript case, using standard code that is from webkit, is over
*thirty five* instructions, including five branches!

in normal analysis of standards, when justifying additions to an ISA,
i learned from observing how RISC-V proposals are done, that commonly
used sequences of instructions over 3 are reasonable to include.
*35* is nowhere near what i was expecting, that's a real shock, and
given that it's javascript (one of the top TIOBE languages) it's
pretty important.


More information about the Libre-soc-dev mailing list