[Bug target/70216] [SH] Implement __builtin_trap
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 24 15:23:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70216
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 38083
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38083&action=edit
Proposed patch
This patch adds two new target options:
-msh4-trapa-sleep-bug
-mbuiltin-trap=
and two configure options:
--with-builtin-trap
--enable-sh4-trapa-sleep-bug / --disable-sh4-trapa-sleep-bug
On sh*-linux it should configure itself to use -mbuiltin-trap=trapa,imm=84 by
default.
I'm not sure if the -msh4-trapa-sleep-bug should be enabled by default on
sh*-linux to always emit the workaround insn sequence (trap + 5x or r0,r0). If
--enable-sh4-trapa-sleep-bug is not specified, it will only be enabled when
compiling code for SH4.
More information about the Gcc-bugs
mailing list