Re:[fpc-pascal] Registers in loops

2012-12-14 Thread denisgolovan
> Indeed, adding inline assembler to a routine disables many > optimizations. > > Jonas Hm. Yeap. Looks like I completely missed the point :) Thanks for the explanation. -- Regards, Denis Golovan ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

Re: [fpc-pascal] Registers in loops

2012-12-14 Thread Jonas Maebe
On 14 Dec 2012, at 13:46, michael.vancann...@wisa.be wrote: On Fri, 14 Dec 2012, Jonas Maebe wrote: Indeed, adding inline assembler to a routine disables many optimizations. Doesn't adding the list of modified registers to the 'ASM' block help in this case ? I thought this was why we suppo

Re: [fpc-pascal] Registers in loops

2012-12-14 Thread michael . vancanneyt
On Fri, 14 Dec 2012, Jonas Maebe wrote: On 14 Dec 2012, at 09:26, patspiper wrote: On 13/12/12 21:51, denisgolovan wrote: Hi all Recently I discovered that fpc refuses to use registers in my loops even with optimization turned on (-O1,-O3 used). With the asm code commented out and withou

Re: [fpc-pascal] Registers in loops

2012-12-14 Thread Jonas Maebe
On 14 Dec 2012, at 09:26, patspiper wrote: On 13/12/12 21:51, denisgolovan wrote: Hi all Recently I discovered that fpc refuses to use registers in my loops even with optimization turned on (-O1,-O3 used). With the asm code commented out and without any optimization, the registers are use

Re: [fpc-pascal] Registers in loops

2012-12-14 Thread patspiper
On 13/12/12 21:51, denisgolovan wrote: Hi all Recently I discovered that fpc refuses to use registers in my loops even with optimization turned on (-O1,-O3 used). With the asm code commented out and without any optimization, the registers are used. .Ll12: # [47] for i:=1 to 1 do

[fpc-pascal] Registers in loops

2012-12-13 Thread denisgolovan
Hi all Recently I discovered that fpc refuses to use registers in my loops even with optimization turned on (-O1,-O3 used). I tested using both Linux x86 and Windows x64 version. The results are basically the same. The compiler just uses stack variables. I've also included naive asm version of