JDK-8266257 : Fix foreign linker build issues for ppc and s390
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-04-28
  • Updated: 2021-08-05
  • Resolved: 2021-06-03
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.
JDK 17
17 b26Fixed
Related Reports
Relates :  
Description
The implementation for JEP-412 introduces 4 functions in sharedRuntime:

static void   move32_64(MacroAssembler* masm, VMRegPair src, VMRegPair dst);
  static void   long_move(MacroAssembler* masm, VMRegPair src, VMRegPair dst);
  static void  float_move(MacroAssembler* masm, VMRegPair src, VMRegPair dst);
  static void double_move(MacroAssembler* masm, VMRegPair src, VMRegPair dst);

Having these functions declaration in sharedRuntime makes sense as a way to reuse code; note that these are then implemented in platform specific ways (see sharedRuntime_aarch64.cpp).

Unfortunately, in certain architectures (s390, ppc) the implementation for these routines has an incompatible signature, which means the build for these architecture fails.

Since these routine are only used by universalUpcallHandler (which is also platform specific), a better approach would be to move these routines under the (platform-specific) MacroAssembler class. This way these functions will not be forced on all architectures.

A preview of these changes are in the following branch:
https://github.com/openjdk/jdk/compare/master...mcimadamore:JEP-412-build-platforms?expand=1
Comments
Changeset: 29ab1628 Author: Maurizio Cimadamore <mcimadamore@openjdk.org> Date: 2021-06-03 09:41:21 +0000 URL: https://git.openjdk.java.net/jdk/commit/29ab16284a4f1ac7ed691fd12cb622b0440c04be
03-06-2021