[fpc-devel] x86-64 optimizations

J. Gareth Moreton gareth at moreton-family.com
Tue Sep 26 17:36:17 CEST 2017


Thank you Anthony,

Admittedly I was a little nervous, wondering if you guys might think "what's this squirt doing submitting 
something that isn't even a bug?!"

Good to know that it looks reasonable.  I did do a full build of FPC and Lazarus with it to ensure it 
actually compiled and ran (Lazarus appeared to work without any problems), and also did a compilation of a 
test project that printed the output of a function that set a 64-bit result (to ensure a 64-bit register was 
used).

It's not perfect though because there are some minor hacks in the assembler instruction list in order to get 
the compiler to look out for 32-bit signed opcodes.  A cleaner solution would be to revert the changes to 
the assembler list, but fix the compiler's handling of signed operands, since I think it only handles signed 
bytes currently (which is understandable, as signed 32-bit immediates only first appeared with x86-64 
extensions).

Thanks once again - I hope it actually works and gets merged.  Call it a source of personal pride if it 
does!

Gareth

On Tue 26/09/17 13:47 , Anthony Walter sysrpl at gmail.com sent:
> J,
> Thanks for the contribution. I looked over your patch and seems reasonable,
> though I didn't try building fpc with it. We need moreĀ  people like you
> helping to improve the compiler. Thanks!
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel [1]
> 
> 
> 
> Links:
> ------
> [1]
> http://secureweb.fast.net.uk/parse.php?redirect=http://lists.freepascal.org
> /cgi-bin/mailman/listinfo/fpc-devel
> 




More information about the fpc-devel mailing list