On 04 Nov 2008, at 22:12, Sergei Gorelkin wrote:

Jonas Maebe wrote:

Could you rewrite it so it does not do that? I have already fixed several times in the past code generator bugs which were fixed for one architecture but not for another (or not in the generic code) exactly due to this sort of duplication.
Done, attached is a modified patch witout duplication.

Thanks, comment with one small change: you cannot first release both EDX and EAX, then allocate 2 new registers and move EDX and EAX into them. The reason is that in this case the first allocated register may be mapped to EAX by the register allocator, so you can get this in the end:

movl %edx, %eax
movl %eax, %ecx

or even

movl %edx, %eax
movl %eax, %edx


Jonas
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to