How is the preempt stub be like?

xtex xtex at envs.net
Mon Jan 20 10:41:06 UTC 2025


Hi!

I am working on porting JEP-491 to LoongArch (it is not in the upstream 
OpenJDK, also I am not employed to do that, just an amateur).
I am trying to understand the code in [1].

When a monitorenter is called, StubAssembler::epilogue will be asked not to 
restore the stack pointer from frame pointer register.
The comment says "fp restored from the stub would be invalid" when the current 
frame is frozen. I wonder if there are any documentation about how does the 
freezing process happen and why FP is invalid but FP and return address (RA) 
loaded from the address pointed by SP is still valid?

Thanks!

[1] https://github.com/openjdk/jdk/pull/21565

-- 
xtex @ Mon, 20 Jan 2025 10:35:48 +0000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250120/0af7fdef/signature-0001.asc>


More information about the loom-dev mailing list