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

x86: make r12_heapbase register available when compressed oops do not require it

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 14
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:

      Description

      JDK-8217909 untied %r12 (heap_base) register when CompressedOops are disabled. We can improve on that by also untying heap_base register when zero-based/32-bit compressed oops are enabled, like this:

      diff -r 7a9a828195c7 src/hotspot/cpu/x86/x86_64.ad
      --- a/src/hotspot/cpu/x86/x86_64.ad Mon Mar 11 18:44:40 2019 +0100
      +++ b/src/hotspot/cpu/x86/x86_64.ad Thu Mar 21 12:44:49 2019 +0100
      @@ -352,11 +352,12 @@
       RegMask _STACK_OR_PTR_REG_mask;
       RegMask _STACK_OR_LONG_REG_mask;
       RegMask _STACK_OR_INT_REG_mask;
       
       static bool need_r12_heapbase() {
      - return UseCompressedOops || UseCompressedClassPointers;
      + return (UseCompressedOops && (Universe::narrow_oop_base() != NULL)) ||
      + (UseCompressedClassPointers && (Universe::narrow_klass_base() != NULL));
       }
       
       void reg_mask_init() {
         // _ALL_REG_mask is generated by adlc from the all_reg register class below.
         // We derive a number of subsets from it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: