Re: [fpc-pascal] i386: strange code generated in simple for loop

2011-12-03 Thread Bernd
2011/12/3 Jonas Maebe : > Note that the "inc" comes before the loop body and the "dec" is inside > [...] > That's for code alignment. You are right. It seems I shouldn't have drunken so much coffee today and not have worked for so long or I would have easily seen where the JG jumps to ;-) I think

Re: [fpc-pascal] i386: strange code generated in simple for loop

2011-12-03 Thread Jonas Maebe
On 03 Dec 2011, at 21:41, Bernd wrote: > Hello, I have observed something I do not understand. The following is > a series of for-loops and the generated code looks strange to me. > There always appears an inc followed by a dec Note that the "inc" comes before the loop body and the "dec" is insi

Re: [fpc-pascal] i386: strange code generated in simple for loop

2011-12-03 Thread Florian Klämpfl
Am 03.12.2011 21:41, schrieb Bernd: > Hello, I have observed something I do not understand. The following is > a series of for-loops and the generated code looks strange to me. > There always appears an inc followed by a dec Leaving the inc away would require an additional jump to do the abort ch

[fpc-pascal] i386: strange code generated in simple for loop

2011-12-03 Thread Bernd
Hello, I have observed something I do not understand. The following is a series of for-loops and the generated code looks strange to me. There always appears an inc followed by a dec and what is even more bizarre is the code in between it: sometimes it inserts a mov %esi,%esi, sometimes lea0x0(