How can I correctly invoke external methods in the JVM interpreter?
Andrew Haley
aph-open at littlepinkcloud.com
Sat May 4 10:09:33 UTC 2024
On 5/3/24 14:38, zhengxianwei wrote:
> Could you please tell me what's incorrect about the method I implemented above ?
Think about register contents. Calls from the interpreter to
native code use the C calling convention, which preserves the
contents of some registers but clobbers others. You need to know
that calling convention, and ensure that anything in use gets
saved when you call native code.
Also, you must step through the generated code in a debugger.
Then you would see what had gone wrong.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev
mailing list