public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99299] New: Need a recoverable version of __builtin_trap()
@ 2021-02-27 10:30 christophe.leroy at csgroup dot eu
  2021-02-27 21:18 ` [Bug middle-end/99299] " segher at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: christophe.leroy at csgroup dot eu @ 2021-02-27 10:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99299

            Bug ID: 99299
           Summary: Need a recoverable version of __builtin_trap()
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christophe.leroy at csgroup dot eu
  Target Milestone: ---

Linux kernel implements WARN() and WARN_ON() asserts using trap instructions.

Because gcc __builtin_trap() is not recoverable, Linux Kernel has hand code the
trap, at the moment using 'twnei'. This leads to sub-optimal code generation.

As the powerpc trap instruction is recoverable as it generated a recoverable
exception, it would be extremely usefull to also have a recoverable version of
__builtin_trap() in gcc. Maybe call it __buitin_recoverable_trap()

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

end of thread, other threads:[~2021-08-26 12:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 10:30 [Bug c/99299] New: Need a recoverable version of __builtin_trap() christophe.leroy at csgroup dot eu
2021-02-27 21:18 ` [Bug middle-end/99299] " segher at gcc dot gnu.org
2021-02-27 21:45 ` pinskia at gcc dot gnu.org
2021-02-28  6:23 ` segher at gcc dot gnu.org
2021-03-01  9:13 ` rguenth at gcc dot gnu.org
2021-03-01 10:23 ` sirl at gcc dot gnu.org
2021-03-01 16:45 ` segher at gcc dot gnu.org
2021-03-01 16:46 ` segher at gcc dot gnu.org
2021-03-01 17:49 ` sirl at gcc dot gnu.org
2021-03-01 18:48 ` segher at gcc dot gnu.org
2021-06-09 15:45 ` pinskia at gcc dot gnu.org
2021-08-26 12:38 ` segher at gcc dot gnu.org

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).