[Libre-soc-isa] [Bug 650] write rfc for OpenPower fpr <-> gpr moves/conversions
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Thu May 26 08:39:09 BST 2022
https://bugs.libre-soc.org/show_bug.cgi?id=650
--- Comment #33 from Jacob Lifshay <programmerjake at gmail.com> ---
Lkcl, I noticed you renamed the Rust conversion semantics to Java conversion
semantics, imho that makes it more confusing since those semantics only match
Java for fp -> 32/64-bit integers, Java fp -> 8/16-bit integers instead convert
to 32-bit integer and then truncate that 32-bit integer to 16/8-bit.
Rust saturates for all integer sizes, so is more consistent with what I want
those instructions to do.
For example, Java converts 257.0 to the unsigned 8-bit value 1 (because 257
fits in a 32-bit integer, then the top 24 bits are removed to leave the value
1),
whereas Rust correctly saturates to 255.
Also, WebAssembly recently introduced saturating fp -> int conversions:
https://webassembly.github.io/spec/core/exec/numerics.html#op-trunc-sat-u
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libre-SOC-ISA
mailing list