RFR: JDK-8274795: AArch64: avoid spilling and restoring r18 in macro assembler [v3]

Andrew Haley aph at openjdk.java.net
Wed Oct 13 07:25:53 UTC 2021


On Thu, 7 Oct 2021 08:50:15 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Bernhard Urban-Forster has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix linux/aarch64 build: s/r18/r18_tls
>
> So we have fixed the only use of `popa()` so that it does not clobber R18. That is good.
> However, I think we've found another bug.  `reguard_yellow_pages()` is a native function, so we should be saving floating-point registers too. It looks to me like this code should use `push_call_clobbered_registers()`. Then we'll have no use for `pusha()` in trunk, and your fix for `popa()` can go into 11u.

> Thanks for the suggestion @theRealAph. By looking through the code I discovered another buggy set of helpers, `{push,pop}_CPU_state()` which also messed with `r18`.

Sure, so we can do the same thing there, if we stil need it.

> Does it look fine to you, or should the code around `reguard_yellow_pages()` rather use `{push,pop}-call_clobbered_registers()`?

Yes, very much so.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5828


More information about the hotspot-dev mailing list