[fpc-devel] (patch) optimized 32 to 64 bits multiplication for i386

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Nov 6 22:06:52 CET 2008

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  

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

or even

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


More information about the fpc-devel mailing list