-
Enhancement
-
Resolution: Unresolved
-
P4
-
21
-
ppc
With ABIv2, calls require a Parameter Save Area (PSA) as part of their frame only if the parameters cannot all be passed in registers or if the callee is variadic [1]
This is in contrast to ABIv1 where the PSA must always be allocated.
Currently we allocate the PSA according to ABIv1 even if ABIv2 is used.
This is in most cases redundant. We should adopt ABIv2 in this respect.
Note that the behaviour isn't incorrect but a waste of stack space. And it is confusing if we don't follow the specification.
Areas that need to be revisited:
- Runtime calls by the interpreter, c1, and c2
- Runtime calls by GC barriers
- Interpreted and compiled JNI calls
- FFM API ("Panama") calls
- Runtime calls by continuation intrisics
- Interpreted frames should have a frame::java_abi just like compiled frames.
frame::top_ijava_frame_abi and frame::parent_ijava_frame_abi should only be available if !defined(ABI_ELFv2)
[1] Parameter Save Area in 2.2.3.3. Optional Save Areas in ELF ABI V2.1.5
https://openpowerfoundation.org/specifications/64bitelfabi/
This is in contrast to ABIv1 where the PSA must always be allocated.
Currently we allocate the PSA according to ABIv1 even if ABIv2 is used.
This is in most cases redundant. We should adopt ABIv2 in this respect.
Note that the behaviour isn't incorrect but a waste of stack space. And it is confusing if we don't follow the specification.
Areas that need to be revisited:
- Runtime calls by the interpreter, c1, and c2
- Runtime calls by GC barriers
- Interpreted and compiled JNI calls
- FFM API ("Panama") calls
- Runtime calls by continuation intrisics
- Interpreted frames should have a frame::java_abi just like compiled frames.
frame::top_ijava_frame_abi and frame::parent_ijava_frame_abi should only be available if !defined(ABI_ELFv2)
[1] Parameter Save Area in 2.2.3.3. Optional Save Areas in ELF ABI V2.1.5
https://openpowerfoundation.org/specifications/64bitelfabi/
- relates to
-
JDK-8315801 [PPC64] JNI code should be more similar to the Panama implementation
- Resolved
-
JDK-8306111 PPC64: RT call after thaw with exception requires larger ABI section
- Resolved
-
JDK-8303040 linux PPC64le: Implementation of Foreign Function & Memory API (Preview)
- Resolved