Where the writeRight variable is declared before the pBase pointer is initialized, leads to the JIT incorrectly deciding to NOT promote writeRight into a register, later within the function:
M08_L00:movrcx,rsisubrcx,raxmovr8,rcxsarr8,3Fandr8,3addrcx,r8sarrcx,2movr8,[rbp-38] ; This is writeRight!movr9,r8subr9,rdxmovr10,r9sarr10,3Fandr10,3addr9,r10sarr9,2cmprcx,r9jg short M08_L02learcx,[rsi+20]jmp short M08_L03
@damageboy When you say "bug", are you saying that the JIT is generating incorrect code (that generates an incorrect result, or crashes)? Or just that the JIT is generating sub-optimal code because it isn't using a register for something it could?
It's not critical for me personally anymore, as I've worked around it, and I admit it's pretty obscure in many senses.
But these things always end up being surprising in the sense it might be affecting more people than just me.
Just to be clear, nothing is being blocked by this in any way on my end.