Fixing d2f in interpreter (Was: Re: [kaffe] Re: Re: NetBSD/ppc now works)
Dalibor Topic
robilad at kaffe.org
Tue May 11 10:08:02 PDT 2004
Dalibor Topic wrote:
> Dalibor Topic wrote:
>
>> Riccardo wrote:
>
>
>> I suspect that d2f is broken in the interpreter. The Java language
>> spec demands that in case of overflow the value of float is a signed
>> infinity, but the C standard says oveflow results in undefined
>> behaviour. So I assume we'd have to check whether the double is
>> representable as a float before we convert it, and handle the special
>> cases that would invoke undefined behaviour ourself.
>>
>> I'm working on a patch.
>
>
> Okay, I've got a patch for the interpreter. I'm unsure if it's really
> necessary, or if it really fixes things, but hey, it's worth a try :)
That one didn't work that well, as it seems your netbsd2-ppc box really,
really, desperately rounds to next odd no matter what. So I've got an
updated patch ;)
Riccardo, could you try it out on your machine? If this one works
better, I'd add a configure check for 'round to odd' and clean up the
code further.
cheers,
dalibor topic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intrp-cvt-double-float-3.diff.gz
Type: application/gzip
Size: 5115 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20040511/f17dc0c8/attachment-0002.bin
More information about the kaffe
mailing list