RFR 8222384 [lworld] Calling convention - C2 to C1 (floating point params)

Ioi Lam ioi.lam at oracle.com
Sun Apr 14 01:51:07 UTC 2019


Hi Tobias,

Thanks for the code review.

On 4/12/19 5:38 AM, Tobias Hartmann wrote:
> Hi Ioi,
>
> looks good to me. Little typo: "overwrite it now and and".
Fixed

> I wonder if you could use MacroAssembler::move_helper() to avoid code duplication?
That's a good idea. I changed it as you suggested, and saved a bunch of 
code!

Here's the delta from my last webrev:

http://cr.openjdk.java.net/~iklam/valhalla/8222384-c1-calling-convention-floats.v02-delta/

Thanks
- Ioi

> Thanks,
> Tobias
>
> On 12.04.19 06:58, Ioi Lam wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8222384
>> http://cr.openjdk.java.net/~iklam/valhalla/8222384-c1-calling-convention-floats.v01/
>>
>> This changeset supports floating point parameters (x64 only, i.e., XMM registers). I also fixed an
>> issue wheresome registers may be trashed before their contents are shuffled. Here's an example (see
>> the rdx register).
>>
>>
>> C2 passes outgoing parameters as:
>>
>>    # {method} {0x00007fb8593f8420} 'test' '(IQFloatTriplet;I)I' in 'Test'
>>    # parm0:    rsi       = int
>>    # parm1:    xmm0      = float
>>    # parm2:    xmm1      = float
>>    # parm3:    xmm2      = float
>>    # parm4:    rdx       = int
>>
>>
>> C1 expects incoming parameters as:
>>
>>    # parm0:    rsi       = int
>>    # parm1:    rdx:rdx   = 'FloatTriplet'
>>    # parm2:    rcx       = int
>>
>> shuffling code:
>>
>>       20: mov    0x10(%rax),%r11d  ;r11 = buffered FloatTriplet obj
>>       24: shl    $0x3,%r11
>>       28: vmovss %xmm0,0x10(%r11)
>>       34: vmovss %xmm1,0x14(%r11)
>>       40: vmovss %xmm2,0x18(%r11)
>>       46: push   %r11              ; can't write to rdx yet -> save it
>>       48: mov    %rdx,%rcx         ; rdx is now shuffled
>>       51: pop    %rdx              ; now update rdx
>>
>> Thanks
>> - Ioi



More information about the valhalla-dev mailing list