RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v2]
Andrew Haley
aph at openjdk.java.net
Mon Jan 25 10:00:43 UTC 2021
On Sun, 24 Jan 2021 16:29:31 GMT, Vladimir Kempik <vkempik at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 5272:
>>
>>> 5270: void MacroAssembler::get_thread(Register dst) {
>>> 5271: RegSet saved_regs = RegSet::range(r0, r1) + BSD_ONLY(RegSet::range(r2, r17)) + lr - dst;
>>> 5272: push(saved_regs, sp);
>>
>> This isn't very nice.
>
> Hello
> Why is it not nice ?
> linux_aarch64 uses some linux specific tls function _ZN10JavaThread25aarch64_get_thread_helperEv from hotspot/os_cpu/linux_aarch64/threadLS_linux_aarch64.s
> which clobbers only r0 and r1
> macos_aarch64 has no such tls code and uses generic C-call to Thread::current();
> Hence we are saving possibly clobbered regs here.
Surely if you did as Linux does you wouldn't need to clobber all those registers.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2200
More information about the build-dev
mailing list