This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On -ftrapv vs. libcalls...
- From: Richard Henderson <rth at redhat dot com>
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 31 Aug 2004 13:04:45 -0700
- Subject: Re: On -ftrapv vs. libcalls...
- References: <200408221254.28457.stevenb@suse.de>
On Tue, Aug 31, 2004 at 03:22:49PM +0200, Steven Bosscher wrote:
> Note the __mulvdi3 libcall. At the first opportunity to do so, the
> first jump pass, we collapse it to a normal MULT insn:
That is a bug.
> Is there a way to avoid emiting a libcall in this case?
If the target doesn't have a mulv pattern, then it could be
emulated with a widening multiply, compare, branch, and trap.
Targets like x86 could define a mulv expander to use a trap
on overflow instruction.
r~