This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: sqrt interpreter Q
> Andreas> [titanium:~] andreast% gij my_sqrt
> Andreas> sqrt_int: -2147483648
> Andreas> sqrt_double: NaN
> Andreas> sqrt_long: -9223372034707292160
> I haven't looked into it more deeply than this. It does suggest that
> the f2* and d2* instructions in the interpreter might need to be
> modified to handle the special cases.
I second you. Java spec needs `(int) NaN' translated to `0'.
The gij does not treat the special case, I guess.
The f2i, f2l, d2i and d2l instructions have to handle NaN specially.
Unfortunately, this means those instructions involve a conditional
branch.
Kazuyuki Shudo shudo@computer.org http://www.shudo.net/