On Tue, 21 Apr 2026 10:38:11 GMT, Tobias Hartmann <[email protected]> wrote:

>> src/hotspot/share/oops/inlineKlass.cpp line 232:
>> 
>>> 230: // the first word is a tri-state value (null, tagged InlineKlass*, or 
>>> oop) and the remaining
>>> 231: // registers carry the field values.
>>> 232: void InlineKlass::initialize_calling_convention(TRAPS) {
>> 
>> Thanks for the explanation, I see that below we talk about a null marker 
>> slot at scalarized return value, is it the null marker of the return value, 
>> or is it something else? If it is the null marker of the return value, it 
>> seems the tri-state of the oop is unnecessary, as we are passing the values 
>> similar to how we pass them as an argument.
>
> Unfortunately, it's a bit more complicated than that. The actual call will 
> **not** return the null marker as a separate field but use the tri-state inf 
> the first register to signal null. However, in C2 IR, we model the null 
> marker as a separate projection and therefore need to add it to the 
> signature. The "translation" from the tri state to the separate field is done 
> here:
> https://github.com/openjdk/valhalla/blob/8b2263f38bdc38b7d219d9eb813ceea1311077b2/src/hotspot/cpu/x86/x86.ad#L4624-L4626

I see, thanks for your clarification.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2339#discussion_r3116922853

Reply via email to