This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: another compiler better than gcj ?
Bryce McKinlay writes:
> Anthony Green wrote:
>
> >Bryce wrote:
> >
> >>Wouldn't the best solution for x86 integer divides be to just emit
> >>something like:
> >>
> >>if (__builtin_expect (divisor== 0), false)
> >> _Jv_ThrowDivideByZero()
> >>else
> >> .. do divide ..
> >>
> >
> >Well, there's usually another goofy case we need to watch for. See _Jv_divI
> >and friends in prims.cc. Do we want to put all of these tests inline?
> >
>
> On x86 at least, I don't think the special case is neccessary because
> the CPU's behaviour matches the Java spec anyway.
No it doesn't. There is some code in the exception handler that fixes
up the division in that case.
Andrew.