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

Jacob Lifshay programmerjake at gmail.com
Wed Jun 2 19:43:40 BST 2021

On Sat, May 29, 2021, 22:44 Jacob Lifshay <programmerjake at gmail.com> wrote:

> On Sat, May 29, 2021, 02:05 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> wrote:
>> links:
>> https://bugs.libre-soc.org/show_bug.cgi?id=230#c71
>> https://libre-soc.org/openpower/sv/int_fp_mv/
>> Lauri is kindly investigating MP3 in SVP64 assembler and it's turning out
>> to
>> be a good test of what opcodes are needed.  in the bi-weekly meeting last
>> week, Paul, we mentioned briefly the need for GPR-to-FPR and FPR-to-GPR
>> mv operations (straight bit-wise) given that VSX/SIMD will not be added to
>> Libre-SOC as a GPU / VPU.
> If we're going to add bitwise FPR <-> GPR move instructions, it is also
> very important to also add the combined integer <-> fp conversion + move
> instructions, since those are easily >90% of FPR <-> GPR moves, converting
> a common 2 instruction sequence to a 1 instruction sequence, as explained
> in more detail here:
> https://bugs.libre-soc.org/show_bug.cgi?id=230#c74

Since the desired fp in FPR -> int in GPR conversion semantics don't match
OpenPower's preexisting semantics (many languages (Rust, OpenCL, etc.)
require NaN converts to 0, OpenPower converts to INT_MIN), I think we
should add a mode field to the new fp -> int conversion instructions,
allowing supporting OpenPower, Rust, and JavaScript semantics. Details here:



More information about the Libre-soc-dev mailing list