This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Use FPU for integer division on Alpha


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]