Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283462

VMReg should encode stack locations as byte offsets instead of slots

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 19
    • hotspot
    • None
    • aarch64
    • os_x

      VMReg is used to abstract over different kinds of machine registers.

      It is used among other things to encode calling conventions. See for instance in SharedRuntime::c_calling_convention.

      However, since VMReg encodes stack locations as stack slots, it can not be used to encode calling conventions that might require more precise stack coordinates. The macos aarch64 ABI is such an ABI for instance.

      Currently, trying to call a function through JNI that uses the problematic parts of the ABI results in a guarantee being triggered, resulting then in a VM crash.

      To facilitate such ABIs, VMReg could be changed to encode stack locations as byte offsets instead of slots. This is mostly a case of changing how VMRegs that encode stack locations are interpreted by code in macro assembler and alike.

            Unassigned Unassigned
            jvernee Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: