[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Missing clobbered register in gemlib



On Fri, 2009-12-11 at 13:02 +0100, Vincent Rivière wrote:
> Patrice Mandin a écrit :
> > In _aes_trap() function defined in gemlib/gem_aesP.h, a0 register is
> > not listed in the clobbered register list, and thus the compiler is not
> > aware of this register changing its value when calling the trap #2.
> 
> This was a big problem, because of that wrong register the memory was 
> overwritten randomly when calling some GEM functions. I didn't noticed 
> it because I have very few examples of GEM programs, and I don't know 
> much GEM myself. GCC 4.x uses registers a lot to store intermediate 
> values, even across function calls. Fortunately, I believe that no much 
> GEM programs have been compiled with GCC 4.x and distributed, so it 
> should not be a problem.
> 
> I don't know if that bug had effects for programs compiled with GCC 
> 2.95... I hope it is not the case.
> 
> You can find the updated GemLib patch on my website.
> http://vincent.riviere.free.fr/soft/m68k-atari-mint/

Committed to CVS. Thanks Vincent !

Alan.