[VectorAPI] Enhancement of floating-point math vector API implementation
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Jan 9 10:27:24 UTC 2023
On 09/01/2023 07:11, Xiaohong Gong wrote:
> If Foreign Linker API supports the vector calling convention and used by Vector API for such math operations, the corresponding vector intrinsics are not needed anymore. Does this mean the difference result issue from interpreter/c1 and c2 compiler will do not exist? And the fixing is not needed anymore? Thanks!
The Foreign Linker API does not support, at the time of writing, vector
types in calling conventions. This can be added by:
* adding a memory layout for vectors (probably a new subclass of
GroupLayout, with width, lane info etc.)
* picking a suitable Java carrier for vector objects passed to and fro
the downcall method handles generated by the API (it is tempting to just
use Vector here, but I'm not sure if that would be the best choice
overall - perhaps memory segment, of suitable size? Or a java array?)
* implement the calling conventions accordingly - this involves some
Java changes to the appropriate CallArranger, which determines the
"bindings" for shuffling a Java call into a native call and back. I
believe that once the correct bindings are in place (e.g. according to
the SysV spec for Linux x64), the VM support would just follow the
recipe in the binding and perform the correct shuffle (so that no JVM
changes should be required - Jorn can correct me if I'm wrong in my
assumption here)
Maurizio
More information about the panama-dev
mailing list