loongson-community / discussions

Cross-community issue tracker & discussions / 跨社区工单追踪 & 讨论场所
11 stars 0 forks source link

[Specs] Need to codify `ftint` edge-case behavior in the LoongArch manual #38

Open xen0n opened 10 months ago

xen0n commented 10 months ago

Patch: zherczeg/sljit#226

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

lrzlin commented 10 months ago

risc-v-f-extension

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)

xry111 commented 10 months ago

Need to raise this to an engineer from Loongson.

@heiher :)