Fixing d2f in interpreter (Was: Re: [kaffe] Re: Re: NetBSD/ppc now works)

Dalibor Topic robilad at kaffe.org
Fri Apr 30 11:59:02 PDT 2004


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 :)

Could you give this patch a try on netbsd-ppc and see if it fixes the 
DoubleCvt test?

cheers,
dalibor topic
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: intrp-cvt-double-float.diff
Url: http://kaffe.org/pipermail/kaffe/attachments/20040430/c38bce29/attachment-0002.txt 


More information about the kaffe mailing list