[fpc-pascal] Broken code with PEEPHOLE & REGVAR

Sven Barth pascaldragon at googlemail.com
Fri Mar 11 14:23:29 CET 2022


Peter via fpc-pascal <fpc-pascal at lists.freepascal.org> 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
>
> .....
>
> # [587] TestLoc := AttackLoc;
> *movl    83280(%rsp),%r14d*                 # <<--------------********
> # Var AttackLoc *located in register r14d*
>      movl    %r14d,24(%rsp)
> .....
>
>
> AttackLoc location is changed to a register as before, but here it is
> actually moved with a movl.
> It seems the bug is caused by the absence of this movl instruction.
>

If we could find out which revision fixed it we could merge that to 3.2.3
as well...

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220311/9e90f5d9/attachment.htm>


More information about the fpc-pascal mailing list