RFR: 8294729: [s390] Implement nmethod entry barriers [v13]

Lutz Schmidt lucy at openjdk.org
Fri Oct 28 08:14:36 UTC 2022


On Thu, 27 Oct 2022 23:18:46 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

>> src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp line 169:
>> 
>>> 167:   // Load class loader data to determine whether the method's holder is concurrently unloading.
>>> 168:   __ load_method_holder(Z_R0_scratch, Z_method);
>>> 169:   __ z_lg(Z_R0_scratch, in_bytes(InstanceKlass::class_loader_data_offset()), Z_R0_scratch);
>> 
>> I don't think R0 can be used for storage addressing.
>
> Those cases where 'if you use R0 it really means 0 and not the contents of the register' are a real gotcha.

It's very simple, basically. R0 is good for everything, except for address calculations which are performed as part of an instruction execution, in which case R0 indicates "not specified". Take LA Z_R0,0(Z_R0,Z_R0) as an example. The leftmost use of Z_R0 is perfectly fine. It just serves result register. The middle (index) and right (base address) occurrences, however, are inputs for the triadic add to form the address. As said above, index and base register are "not specified" in the example and a "0" is fed into the adder. 

You will get used to this pretty quick.

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

PR: https://git.openjdk.org/jdk/pull/10558


More information about the hotspot-dev mailing list