JDK-8167184 : [s390] Extend relocations for pc-relative instructions.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-10-05
  • Updated: 2016-11-23
  • Resolved: 2016-10-27
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 9
9 b146Fixed
Related Reports
Blocks :  
Relates :  
Description
Instructions can load values from memory at an address computed by an offset to the current pc. S390 aka z/Architecture implements such instructions.

This change implements two extensions to relocation to support this.

On s390, there are call instructions that branch to an address relative to the current pc. If the offset encodable in the instruction does not suffice, a pc-relative load is used to load the target address from the constant section in the code buffer into a register that is then used as branch target.  Relocations must support switching between these two implementations.  For this we need a relocation that stores the offset of the address in the constant section, as this value can not be read from the instruction.

Further the pc-relative instructions encode the offset from the instruction to the constant. If the constant section is resized, or the instruction is moved (as during shorten branches), this offset must be adapted. To compute the new offset, the change in offset must be known. To compute this we store the position of the constant section in the  CodeBlob.
Comments
FC Extension Request Justification: This is an extention to C2's relocations needed for pc-relative instructions on s390. Risk: Low. Few shared code changes not executed on other platforms. Thus they should not affect any other platform. Proposed Integration Date: As soon as reviewed and approved. Remaining work: only review and integration activity is left webrev: http://cr.openjdk.java.net/~goetz/wr16/8167184-s390_relocations/webrev.01/ final, reviewed webrev: http://cr.openjdk.java.net/~goetz/wr16/8167184-s390_relocations/webrev.02/
12-10-2016