<div dir="auto"><div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Martin Frb via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> schrieb am Mo., 29. Sep. 2025, 12:30:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tested with 3.3.1  d3ac07ad27<br>
-O4<br>
Win 64 bit<br>
<br>
In the code below, compiled with -alr<br>
    .section .text.n_p$project1_$$_foo,"ax"<br>
    ....<br>
    # Var a located in register rbx<br>
(and it stays in rbx, until the call to write is prepared)<br>
<br>
<br>
<br>
But if I comment out the "write", and uncomment the "a.w"<br>
    # Var a located at rsp+32, size=OS_64<br>
<br>
Even the initial 2 lines will then NOT use a register for "a"?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>