another compiler better than gcj ?

Andrew Haley aph@cambridge.redhat.com
Wed Oct 24 05:52:00 GMT 2001


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.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /