Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (notsureabout x86-64 on Linux)

2017-11-01 Thread J. Gareth Moreton
Okay, I'm about to start attempting to implement my versions of FillWord, FillDWord and FillQWord (along with some fixes to bugs that I noticed in my code in the interim)... given that I have to push and pop RDI to use REP STOSQ etc, what do I need to do in order to ensure SEH handles the

Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (notsure about x86-64 on Linux)

2017-11-01 Thread J. Gareth Moreton
Thanks for the feedback everyone. I wasn't sure about internal functions because FillWord, for example, is surrounded by "{$ifndef FPC_SYSTEM_HAS_FILLWORD}", which isn't defined under Win64, whereas FPC_SYSTEM_HAS_FILLCHAR is defined and the implementation of FillChar is nowhere to be found

Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (not sure about x86-64 on Linux)

2017-11-01 Thread Sergei Gorelkin via fpc-devel
01.11.2017 10:46, Sven Barth via fpc-devel wrote: Am 01.11.2017 05:58 schrieb "J. Gareth Moreton" >: Would it be worth opening up a bug report for this, with the attached assembler routines as suggestions? I haven't

Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (not sure about x86-64 on Linux)

2017-11-01 Thread Martok
Am 01.11.2017 um 05:58 schrieb J. Gareth Moreton: > So I've been doing some playing around recently, and noticed that while > FillChar has some very fast internal > code for initialising a block of memory, making use of non-temporal hints and > memory fences, the versions > for the larger

Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (not sure about x86-64 on Linux)

2017-11-01 Thread Florian Klämpfl
Am 01.11.2017 um 05:58 schrieb J. Gareth Moreton: > I also made versions that use memory fences and other checks such as memory > alignment in order to gain speed > - I've converted them to use the System V ABI of Linux as well, but are > currently completely untested as I > don't have the

Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (not sure about x86-64 on Linux)

2017-11-01 Thread Sven Barth via fpc-devel
Am 01.11.2017 05:58 schrieb "J. Gareth Moreton" : Would it be worth opening up a bug report for this, with the attached assembler routines as suggestions? I haven't worked out how to implement internal functions into the compiler yet, and I rather clear it with you guys