JDK-8308695 : PPC64: The Parameter Save Area for ABIv2 calls is in most cases redundant
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • CPU: ppc
  • Submitted: 2023-05-23
  • Updated: 2023-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
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/