Bug in Jitter

Alexandre Oliva oliva at dcc.unicamp.br
Tue Jul 7 20:31:37 PDT 1998


Godmar Back <gback at cs.utah.edu> writes:

>  I bet you wrote this off the top of your head or with a non-current
> version in mind.

Ok, I confess :-)

> Also, sync_register doesn't reset the modified flags.

I thought it did.  At least, it should; I can't find any reason for it 
not to do it.

> I think what we want is prepare_function_call() (maybe minus the part 
> where temps are spilled?).

I thought it would invalidate all registers, but now I see it doesn't.
It's good to know, now I may get some performance improvements in
Guaraná <URL:http://www.dcc.unicamp.br/~oliva/guarana>

> With all that said:  I tried it, and I believe your idea works.

Cool!

> Could you elaborate some more on that patch for the x86 you're mentioned?

The problem is that, when a x86 float register is read from, it's
removed from the arithmetic processor stack, so any computation that
depends on it still being on the stack breaks.  When I found the
problem, I was using sync_registers(), and it would not mark the
register as clean, so it would be spilled twice.  However, even if
this were not the case, if the value of the register were read after
the first spill, an invalid value would be read, because the expected
value would have been popped from the stack already.

I'm not sure this still applies (i.e., if you mark the register as not 
modified), but the patch is attached anyway.

-- 
Alexandre Oliva
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i386jit.diff
Type: application/octet-stream
Size: 1631 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19980708/8c181890/attachment-0006.obj 


More information about the kaffe mailing list