This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On -ftrapv vs. libcalls...
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: stevenb at suse dot de (Steven Bosscher)
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 31 Aug 2004 19:10:14 +0100 (BST)
- Subject: Re: On -ftrapv vs. libcalls...
> Note the __mulvdi3 libcall. At the first opportunity to do so, the
> first jump pass, we collapse it to a normal MULT insn:
Which is actually a bug. basic arithmetic traps on signed overflow with
-ftrapv. There is no place for the trap_if side effect in the REG_EQUAL
note, hence these operations are unsuitable to wrap then with
REG_LIBCALL / REG_RETVAL / REG_EQUAL (at least in their current form).