public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [RISC-V] Support for trapping math in RISC-V
@ 2024-04-24 12:53 Krishna Narayanan
  2024-04-29 20:28 ` Joseph Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Krishna Narayanan @ 2024-04-24 12:53 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

Hi all,
Is the RISC-V community planning to add support for trapping math in RISC-V
in the near future!?
This LLVM thread
https://discourse.llvm.org/t/trapping-math-for-risc-v/72168/7  suggests a
software emulation of traps, is the GNU team also on similar lines to this
implementation or has some different views.

Thanks,
Krishna Narayanan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RISC-V] Support for trapping math in RISC-V
  2024-04-24 12:53 [RISC-V] Support for trapping math in RISC-V Krishna Narayanan
@ 2024-04-29 20:28 ` Joseph Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Myers @ 2024-04-29 20:28 UTC (permalink / raw)
  To: Krishna Narayanan; +Cc: gcc

On Wed, 24 Apr 2024, Krishna Narayanan via Gcc wrote:

> Hi all,
> Is the RISC-V community planning to add support for trapping math in RISC-V
> in the near future!?
> This LLVM thread
> https://discourse.llvm.org/t/trapping-math-for-risc-v/72168/7  suggests a
> software emulation of traps, is the GNU team also on similar lines to this
> implementation or has some different views.

That strategy sounds both very slow and not even complete (it doesn't 
cover the case of exact underflow, which doesn't raise the exception flag, 
but should signal the exception when trapping is enabled).

Traps are not part of standard C.  I'm not aware of any implementations of 
the TS 18661-5 interfaces to alternate exception handling either.

-- 
Joseph S. Myers
josmyers@redhat.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-29 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 12:53 [RISC-V] Support for trapping math in RISC-V Krishna Narayanan
2024-04-29 20:28 ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).