Re: [PATCH 4/4] riscv: Addfpgetroundtoi and fpsetroundtoi stubs

"Keith Packard" <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Kito Cheng <[email protected]> writes:

> According RISC-V ISA spec, V20190608 11.7:
> "All floating-point to integer and integer to floating-point
> conversion instructions round according to the rm field."
> So seem like FP_RDI_RD would be better value if hard float is available.

I just realized -- we might be able to do that on targets with hard
float and double, but many targets have only hard float and use software
for doubles. In this case, the rounding mode will differ between float
(hardware) and double (software).

So, perhaps this API should just return -1 as well...

-- 
-keith
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl4mtQ4ACgkQ2yIaaQAA
ABHwyw/9GL2PJB4+FgHzeIcoTlzjgQHfZhGfyIWPWTdmiceWizlD4IsmkBNJoYUA
wPSkyE1Y1rmBRGfCMv4iJeIaAf9oOFJFCMuxmNHKzQE4DYVwE8BkTKYyuiGc/Vw/
bBTXiBILmISrdqt3EBtuE2sWJW5UHWwzXC/H2U9U9ALHXynegFqIaHUA8TjBP8xR
HaowqqHGAZ9WLpex9gkPA6BhaIxqcy6eAp6AeVuOnOrbrf3ZItSVhnUenKGCGrmq
Gvm2mdgzr9n+5rUFdaphg5qus8cqmJhBqGYpApG8SYwh6Cz8aUSHp7/eWs5yusKX
XMqvy3kOqYgmjzNpZ+ymoAIfZAP1zaWRRw2yBCjaeliMjNI+zDaaxrasm3lt1YJA
0wclC6qEngog2leqvPtp/A4GWf3PZTbH3gsnDDOqX9N8ZDmCFvKBBI5rGv+hzaQ2
DmtLLYwuA3u/98jWTBqIFHOsgMBciZmNjBXNXZxpjwW4kTsZjG4kxfVaCKOarSzt
+/iqbY/bEas/4nm7WZmX8diQE81V4YcfiM+FarY4zL6O7V8TxsDuiQMTl2TfERdP
aUGIqKm7n8dXoudLWkHsMuacK7jBza89HwuAvZsgy7imaH6q76rhdb/KPqkjqpST
M+08ty1jgzqFJJcXJaUc7UCWFe2N1hWrwNVd9rT+omTG/fbpczA=
=On6e
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.