RFR(M): 8167184: [s390] Extend relocations for pc-relative instructions.
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Wed Oct 5 15:16:31 UTC 2016
Hi,
This extension to relocations is needed for the s390 port.
Please review:
http://cr.openjdk.java.net/~goetz/wr16/8167184-s390_relocations/webrev.01/
This change implements two extensions to relocation to support pc-relative instructions.
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, our port uses a pc-relative load to load the target address from the constant pool 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 pool, 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 pool 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 pool in the CodeBlob.
Best regards,
Goetz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161005/ea4a3231/attachment.html>
More information about the hotspot-compiler-dev
mailing list