Open xen0n opened 10 months ago
A simple table like this would be great, hoping we could find this in future LoongArch manual or spec. Reference: RISC-V Unprev Spec Chapter 13.7 Table 15. Domains of float-to-integer conversions and behavior for invalid inputs (Version 20191214, Revised 20230723)
Need to raise this to an engineer from Loongson.
@heiher :)
But this patch seems relying on the implicit behavior documented nowhere. The instruction manual only says the ftint instructions satisfy IEEE 754-2008 where these results are unspecified.
We cannot just rely on the Hyrum rule here because the user base of LoongArch is not large enough. We should either avoid relying on the undocumented behavior, or tell the hardware engineers to add this into the specification and keep it in future products.
Originally posted by @xry111 in https://github.com/loongson-community/discussions/issues/36#issuecomment-1891943841