Dealing with Complex memory values

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jan 20 11:16:10 UTC 2020


For now these are not supported - but not because we'd like to leave 
this to higher level (in some cases I don't think the higher level even 
can -as passing these constants require special handling, such as using 
special registers such as x87 ones).

The main issue is with the fact that we don't have big enough (read 128 
bits) carriers in Java to be used in conjunction with the memory access 
API. But, thankfully, Valhalla will allow us to define any kind of 
additional carriers we need, of any size.

So, the way I see this really ending up is, to use an inline type like 
long128, and use it to model constants like long_double and the likes 
(on Linux).

If this becomes a problem, we could start adding support for long[] 
carriers in the memory access API, and treat values that are too big to 
fit in a Java long as long[] - but I'm less sure that Hotspot will be 
able to optimize VarHandles with long[] efficiently (because of the 
allocation).

Maurizio


On 18/01/2020 21:25, Ty Young wrote:
> Hi,
>
>
> What features, if any, are there currently or going to be to deal with 
> Complex memory values based on SysV's C_COMPLEX_LONGDOUBLE or similar? 
> Or is dealing with such things going to be the responsibility of high 
> level abstractions?
>


More information about the panama-dev mailing list