https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
--- Comment #8 from Oleg Endo olegendo at gcc dot gnu.org ---
Recently some __builtin_*_overflow functions have been added, of which some
could utilize the addv and subv instructions. See also
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
--- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #0)
The addv and subv instructions can be used for at least two things:
1) Implementing trapping signed integer arithmetic (-ftrapv)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
--- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org ---
Another example where addv could be used:
int test (int a)
{
if (a == 0x7FFF)
return a;
return a + 1;
}
currently compiles to:
-O2 -m2a:
mov.l .L6,r1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
--- Comment #2 from Kazumoto Kojima kkojima at gcc dot gnu.org 2012-08-16
11:23:42 UTC ---
(In reply to comment #1)
For linux environment, libc's abort function is a rather complex
function and trapa handler should do equivalent things to keep
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
--- Comment #3 from Oleg Endo olegendo at gcc dot gnu.org 2012-08-16 12:43:09
UTC ---
(In reply to comment #2)
(In reply to comment #1)
For linux environment, libc's abort function is a rather complex
function and trapa handler should do
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
--- Comment #4 from Kazumoto Kojima kkojima at gcc dot gnu.org 2012-08-16
13:00:37 UTC ---
(In reply to comment #3)
How about small variation:
Sounds reasonable to me.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
Oleg Endo olegendo at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54272
Oleg Endo olegendo at gcc dot gnu.org changed:
What|Removed |Added
CC||kkojima at gcc dot