On Fri, 27 Oct 2023 10:23:43 GMT, Quan Anh Mai <qa...@openjdk.org> wrote:
>> Question: `r12` does not need to remember? >> >> According to [CallingSequences in OpenJDK >> Wiki](https://wiki.openjdk.org/display/HotSpot/CallingSequences), `r12` may >> be reserved for HeapBase if COOP is enabled. >> (`r12` is also used in another places in downcallLinker_x86_64.cpp without >> restoring...) > > @YaSuenag `r12` is restored in `reinit_heapbase()` if needed and no, `r12` > does not need remembering because it is a constant and can be restored from > somewhere else. I think your code is fine. Restoring `r12_heapbase` at this point is not bad because `runtime_call` is only for slow paths. I don't think it should be moved. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16201#discussion_r1374436854