Re: [fpc-devel] Vectorization

2017-12-11 Thread Michael Schnell
On 10.12.2017 20:01, J. Gareth Moreton wrote: Starting at the 4th command, it looks back to find a match in the 1st command, What about loops (such as using arrays of n elements as obvious Vectors). Supposedly, here some higher level optimization would be necessary. -Michael

Re: [fpc-devel] AVR calling convention for shortstring result type

2017-12-11 Thread Christo Crause
On 11 Dec 2017 11:44 PM, "Florian Klämpfl" wrote: > > Am 11.12.2017 um 21:58 schrieb Christo: > > It appears from the generated code as if the function result location is assigned before the > > function is called, with the reference to the function result passed as first

Re: [fpc-devel] Vectorization

2017-12-11 Thread J. Gareth Moreton
Okay, sit back everyone - this is a long read! I'm starting with the problem as listed in https://bugs.freepascal.org/view.php?id=27870 with the source code provided, although with {$codealign varmin=16} and {$codealign localmin=16} at the top. I'm running the latest version of the

Re: [fpc-devel] Vectorization

2017-12-11 Thread J. Gareth Moreton
I created a Wiki page to plan things out: http://wiki.lazarus.freepascal.org/Vectorization It's a stub currently. Kit On Mon 11/12/17 20:34 , "J. Gareth Moreton" gar...@moreton-family.com sent: > P.S. For design ideas and patches that need collaboration, is the Wiki > usually the way of going

Re: [fpc-devel] AVR calling convention for shortstring result type

2017-12-11 Thread Florian Klämpfl
Am 11.12.2017 um 21:58 schrieb Christo: > I'm trying to write an assembler function to read a string from program > memory using LPM and > return a shortstring result.  Consider the following prototype function: > > function readProgmemStr(constref s: shortstring): shortstring; > > It appears

[fpc-devel] AVR calling convention for shortstring result type

2017-12-11 Thread Christo
I'm trying to write an assembler function to read a string from program memory using LPM and return a shortstring result.  Consider the following prototype function: function readProgmemStr(constref s: shortstring): shortstring; It appears from the generated code as if the function result

Re: [fpc-devel] Vectorization

2017-12-11 Thread J. Gareth Moreton
P.S. For design ideas and patches that need collaboration, is the Wiki usually the way of going about it? Kit ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] Vectorization

2017-12-11 Thread J. Gareth Moreton
I might need to set up a Wiki page of some kind containing a design spec, because even fixing that bug will require some extra features. Case in point: - There is no desire to include MOVUPS instructions because, while they will work for unaligned memory, are much slower than MOVAPS, but

Re: [fpc-devel] Compiler error for target AVR - r37660

2017-12-11 Thread Christo
On Sun, 2017-12-10 at 18:02 +0100, Florian Klämpfl wrote: > Am 04.12.2017 um 20:19 schrieb Christo: > > > > > > > > > > > I guess I'm missing something? > > OK, missed a comment marker in the config file which is now fixed. Now I > > get the origninal > > error > > - Cannot find system type

Re: [fpc-devel] Vectorization

2017-12-11 Thread Adriaan van Os
J. Gareth Moreton wrote: I guess fixing that might be a good starting point. There's also the issue of memory alignment causing crashes. I (and others I think) would much welcome the fix. WIth regard to memory aligment, you would have to test what is already fixed in the current (svn)

Re: [fpc-devel] Vectorization

2017-12-11 Thread J. Gareth Moreton
I guess fixing that might be a good starting point. There's also the issue of memory alignment causing crashes. Kit On Mon 11/12/17 12:19 , mar...@stack.nl (Marco van de Voort) sent: > In our previous episode, Adriaan van Os said: > > > > Since I'm masochistic in my desire to > understand

Re: [fpc-devel] Vectorization

2017-12-11 Thread Marco van de Voort
In our previous episode, Adriaan van Os said: > > Since I'm masochistic in my desire to understand and improve the Free > > Pascal Compiler, I would like to add > > some vectorisation support in its optimisation cycle, since that is one > > thing that many other compilers > > attempt to do

Re: [fpc-devel] Vectorization

2017-12-11 Thread Adriaan van Os
J. Gareth Moreton wrote: Hi everyone, Since I'm masochistic in my desire to understand and improve the Free Pascal Compiler, I would like to add some vectorisation support in its optimisation cycle, since that is one thing that many other compilers attempt to do these days. But before I

Re: [fpc-devel] Vectorization

2017-12-11 Thread Sven Barth via fpc-devel
Am 10.12.2017 20:01 schrieb "J. Gareth Moreton" : The idea I had currently (this is without looking at any previous theory) was to use a kind of sliding window, similar to how ZIP and other LZ77-based algorithms work when compressing repeating strings, to look backwards