[fpc-pascal] Broken code with PEEPHOLE & REGVAR
Peter
peter at pblackman.plus.com
Fri Mar 11 13:47:30 CET 2022
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.
Cheers,
Peter
More information about the fpc-pascal
mailing list