[kaffe] [patch] Re: Computing remainders

Dalibor Topic robilad at yahoo.com
Mon Jun 30 01:07:01 PDT 2003


Hi Tony, hallo Marc

I've attached a patch for the interpreter that should fix this issue for
gcc-compiled interpreter on all platforms. It works for me on mips-irix and
i386-linux interpreters. 

* It removes the *_MODULO_BROKEN and *_DIVISION_BROKEN test from the configure
script, since it's pointless to test for undefined behaviour. 
* It changes long_rem and int_rem definitions to explicitely test for -1 as the
dividend, and return 0 in that case, like the spec demands. 
* It also fixes int_div and long_div to check for MIN_VALUE / -1 and return
MIN_VALUE in that case, according to the spec. 
* It adds JINT_MIN and JLONG_MIN to jtypes.h.in.

could you give it a try on m68k and powerpc?

cheers,
dalibor topic

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: division.diff
Type: application/octet-stream
Size: 12952 bytes
Desc: division.diff
Url : http://kaffe.org/pipermail/kaffe/attachments/20030630/1f5e9da7/attachment-0002.obj 


More information about the kaffe mailing list