Martin Frb via fpc-devel <[email protected]> schrieb am Mo., 29. Sep. 2025, 12:30:
> Tested with 3.3.1 d3ac07ad27 > -O4 > Win 64 bit > > In the code below, compiled with -alr > .section .text.n_p$project1_$$_foo,"ax" > .... > # Var a located in register rbx > (and it stays in rbx, until the call to write is prepared) > > > > But if I comment out the "write", and uncomment the "a.w" > # Var a located at rsp+32, size=OS_64 > > Even the initial 2 lines will then NOT use a register for "a"? > The Self parameter of a type helper is a pointer, so the compiler needs to be able to take the address which in turn prohibits the use of the regvar optimization for that variable. Regards, Sven
_______________________________________________ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
