RFR 8222384 [lworld] Calling convention - C2 to C1 (floating point params)
Ioi Lam
ioi.lam at oracle.com
Tue Apr 16 06:25:45 UTC 2019
On 4/15/19 12:18 AM, Tobias Hartmann wrote:
> Hi Ioi,
>
> On 14.04.19 07:28, Ioi Lam wrote:
>> Actually, please ignore this webrev.
>>
>> I just realized that when shuffling the arguments, the stack may shrink (e.g., if a value argument
>> has 2 int fields) or expand (e.g., if a value argument has 2 float fields). Also, there can be
>> circular dependencies between the vmreg slots. So I need to rewrite the whole thing to mirror
>> unpack_value_args() :-(
> Right, I should have mentioned that but thought you were going to address it in another patch. I
> think it would be good if the logic in MacroAssembler::unpack_value_args and ::unpack_value_helper
> could be adapted to support unpacking *and* packing.
Hi Tobias,
Thanks for the suggestion.
I've refactored MacroAssembler::unpack_value_args so that it can be used
for both packing and unpacking. This makes the logic a little messy, but
I think it's still better than having two separate loops for packing and
unpacking.
The packing logic is quite different than unpacking, so I wasn't able to
reuse unpack_value_helper. Instead, I added pack_value_helper.
Here's the updated webrev:
http://cr.openjdk.java.net/~iklam/valhalla/8222384-c1-calling-convention-floats.v02/
I added a new class ScalarizedValueArgsStream to make it a little easier
to iterate over the scalarized args. Maybe we should put this inside
signature.hpp?
Testing: to make sure I didn't mess up the C2 code, I ran the following
tests and they all passed:
test/hotspot/jtreg/compiler/valhalla
test/hotspot/jtreg/runtime/valhalla
test/jdk/valhalla
Thanks
- Ioi
More information about the valhalla-dev
mailing list