This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Use FPU for integer division on Alpha
- From: Richard Henderson <rth at redhat dot com>
- To: Falk Hueffner <falk at debian dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Mar 2005 04:51:50 -0800
- Subject: Re: [patch] Use FPU for integer division on Alpha
- References: <87d5tyze2u.fsf@debian.org>
On Thu, Mar 17, 2005 at 12:50:17PM +0100, Falk Hueffner wrote:
> problem. The Java frontend (and presumably other frontends where
> division by zero is not undefined) checks for 0 before doing the
> division.
I'm not quite sure why libjava isn't using
DIVIDESPEC=-fno-use-divide-subroutine
on Alpha. Perhaps we missed some little bit?
Anyway, the imprecise traps thing would be solvable by noting that
DIVC can trap, and doing the "&" thing when precise traps are
enabled. That should get a trapb insn added appropriately. And
it'll work for Java, because we enable -mieee there.
And I'm not 100% convinced we shouldn't add an option to disable
this change.
> + (set (match_operand:SI 0 "nonimmediate_operand" "")
> + (subreg:SI (match_dup 8) 0))]
Raw creation of subregs is wrong. You bork endianness.
r~