Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2025-03-07 Thread Sven Barth via fpc-pascal
Peter B schrieb am Di., 4. März 2025, 22:48: > Back in 2022, I did expect that the release 3.2.4, including this fix, > would have been out by now. > > Is it possible, that this fix could be applied as a patch to 3.2.2 > (which is what all the Linux distributions are still using). > i.e. is the

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-14 Thread Peter via fpc-pascal
Testing 3.2.3 on Arch Linux # [584] if not AttackPositionReached then     testb    %r15b,%r15b     je    .Lj270 # [587] TestLoc := AttackLoc;     movl    83288(%rsp),%r13d                # <- *** # Var AttackLoc located in register r13d     movl    %r13d,24(%rsp) # [591] NextLoc :

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-14 Thread Peter via fpc-pascal
On 14/03/2022 06:59, Sven Barth via fpc-pascal wrote: Peter via fpc-pascal schrieb am So., 13. März 2022, 22:58: On 13/03/2022 18:19, Florian Klämpfl via fpc-pascal wrote: > Thanks for tracking this down! I have cherry picked the commit to fixes. Great! It was a nasty bug. Good to

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-14 Thread Sven Barth via fpc-pascal
Peter via fpc-pascal schrieb am So., 13. März 2022, 22:58: > On 13/03/2022 18:19, Florian Klämpfl via fpc-pascal wrote: > > Thanks for tracking this down! I have cherry picked the commit to fixes. > > Great! It was a nasty bug. Good to see it fixed for the next release. > Would you please check

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-13 Thread Peter via fpc-pascal
On 13/03/2022 18:19, Florian Klämpfl via fpc-pascal wrote: Thanks for tracking this down! I have cherry picked the commit to fixes. Great! It was a nasty bug. Good to see it fixed for the next release. ___ fpc-pascal maillist - fpc-pascal@lists.fre

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-13 Thread Florian Klämpfl via fpc-pascal
> Am 13.03.2022 um 16:26 schrieb Peter via fpc-pascal > : > > On 12/03/2022 11:33, Florian Klämpfl via fpc-pascal wrote: >> >>> Am 12.03.2022 um 12:05 schrieb Peter via fpc-pascal >>> : >>> >>> Its looking like it was fixed in main somewhere between >>> >>> 31cd3df724 Jan, 2021 >>> & >>

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-13 Thread Peter via fpc-pascal
On 12/03/2022 11:33, Florian Klämpfl via fpc-pascal wrote: Am 12.03.2022 um 12:05 schrieb Peter via fpc-pascal : Its looking like it was fixed in main somewhere between 31cd3df724 Jan, 2021 & 837b433a28 Apr, 2021 Can you bisect it by any chance? See https://wiki.freepascal.org/FPC_

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-12 Thread Florian Klämpfl via fpc-pascal
> Am 12.03.2022 um 12:05 schrieb Peter via fpc-pascal > : > > Its looking like it was fixed in main somewhere between > > 31cd3df724 Jan, 2021 > & > 837b433a28 Apr, 2021 Can you bisect it by any chance? See https://wiki.freepascal.org/FPC_git#bisect.27ing ___

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-12 Thread Peter via fpc-pascal
Its looking like it was fixed in main somewhere between 31cd3df7    24 Jan, 2021 & 837b433a    28 Apr, 2021 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-11 Thread Sven Barth via fpc-pascal
Peter via fpc-pascal schrieb am Fr., 11. März 2022, 13:47: > I had a look at the assembler generated by 3.3.1 > > . > > # Var uix located in stack [rsp+83240] > movl%edx,%eax > movq%rax,83280(%rsp) > # Var AttackLoc *located in stack [rsp+83280]* > # [503] var > > . > >

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-11 Thread Peter via fpc-pascal
I had a look at the assembler generated by 3.3.1 . # Var uix located in stack [rsp+83240]     movl    %edx,%eax     movq    %rax,83280(%rsp) # Var AttackLoc *located in stack [rsp+83280]* # [503] var . # [587] TestLoc := AttackLoc; *movl    83280(%rsp),%r14d* # <<--

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-11 Thread Peter via fpc-pascal
So it seems it was fixed in main at least. Now the interesting question is 3.2.3... Hi Sven, I found a 3.2.3 in ftp://ftp.freepascal.org/pub/fpc/snapshot/v32/x86_64-linux Testing with version Free Pascal Compiler version 3.2.3 [2022/03/05] for x86_64 the problem is still there I'm afrai

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Sven Barth via fpc-pascal
Peter via fpc-pascal schrieb am Fr., 11. März 2022, 00:48: > Pleased to report that with version > "Free Pascal Compiler version 3.3.1-10685-gf6ac49a139-unpushed-dirty > [2022/03/08] for x86_64" > > it seems fine. > So it seems it was fixed in main at least. Now the interesting question is 3.2.3

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Peter via fpc-pascal
On 10/03/2022 22:46, Sven Barth via fpc-pascal wrote: Peter via fpc-pascal schrieb am Do., 10. März 2022, 23:39: There are four source files, around 250k, to compile this library. I can supply them if anyone wants to investigate. Is this sufficient for a bug report?  Does anyone know

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Sven Barth via fpc-pascal
Peter via fpc-pascal schrieb am Do., 10. März 2022, 23:39: > There are four source files, around 250k, to compile this library. I can > supply them if anyone wants to investigate. > Is this sufficient for a bug report? Does anyone know of any existing > bugs like this? Maybe already fixed? > Wo

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Peter via fpc-pascal
Attaching source & assembler function TBarbarina.DoAttack(uix, AttackLoc: integer): boolean; // AttackLoc=maNextCity means bombard only var MoveResult, Kind, Temp, MoveStyle, TestLoc, TestTime, NextLoc, NextTime, V8, RecoverTurns, ecix: integer; NextTile: cardinal; AttackPositionReached