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

aarch64: use load/store pair instructions in call_stub

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • hotspot
    • None
    • 9
    • b110
    • aarch64
    • linux

        Currently, aarch64 port does not make use of load/store pair instructions in the call_stub code to save space (or maybe improve performance):
        StubRoutines::call_stub [0x0000007f7407a540, 0x0000007f7407a6b0[ (368 bytes)
          0x0000007f7407a540: stp x29, x30, [sp,#-16]!
          0x0000007f7407a544: mov x29, sp
          0x0000007f7407a548: sub sp, x29, #0xd0
          0x0000007f7407a54c: str x7, [x29,#-8]
          0x0000007f7407a550: str w6, [x29,#-16]
          0x0000007f7407a554: str x5, [x29,#-24]
          0x0000007f7407a558: str x4, [x29,#-32]
          0x0000007f7407a55c: str x3, [x29,#-40]
          0x0000007f7407a560: str x2, [x29,#-48]
          0x0000007f7407a564: str x1, [x29,#-56]
          0x0000007f7407a568: str x0, [x29,#-64]
          0x0000007f7407a56c: str x19, [x29,#-72]
          0x0000007f7407a570: str x20, [x29,#-80]
          0x0000007f7407a574: str x21, [x29,#-88]
          0x0000007f7407a578: str x22, [x29,#-96]
          0x0000007f7407a57c: str x23, [x29,#-104]
          0x0000007f7407a580: str x24, [x29,#-112]
          0x0000007f7407a584: str x25, [x29,#-120]
          0x0000007f7407a588: str x26, [x29,#-128]
          0x0000007f7407a58c: str x27, [x29,#-136]
          0x0000007f7407a590: str x28, [x29,#-144]
          0x0000007f7407a594: str d8, [x29,#-152]
          0x0000007f7407a598: str d9, [x29,#-160]
          0x0000007f7407a59c: str d10, [x29,#-168]
          0x0000007f7407a5a0: str d11, [x29,#-176]
          0x0000007f7407a5a4: str d12, [x29,#-184]
          0x0000007f7407a5a8: str d13, [x29,#-192]
          0x0000007f7407a5ac: str d14, [x29,#-200]
          0x0000007f7407a5b0: str d15, [x29,#-208]
          ......
          0x0000007f7407a624: ldr d15, [x29,#-208]
          0x0000007f7407a628: ldr d14, [x29,#-200]
          0x0000007f7407a62c: ldr d13, [x29,#-192]
          0x0000007f7407a630: ldr d12, [x29,#-184]
          0x0000007f7407a634: ldr d11, [x29,#-176]
          0x0000007f7407a638: ldr d10, [x29,#-168]
          0x0000007f7407a63c: ldr d9, [x29,#-160]
          0x0000007f7407a640: ldr d8, [x29,#-152]
          0x0000007f7407a644: ldr x28, [x29,#-144]
          0x0000007f7407a648: ldr x27, [x29,#-136]
          0x0000007f7407a64c: ldr x26, [x29,#-128]
          0x0000007f7407a650: ldr x25, [x29,#-120]
          0x0000007f7407a654: ldr x24, [x29,#-112]
          0x0000007f7407a658: ldr x23, [x29,#-104]
          0x0000007f7407a65c: ldr x22, [x29,#-96]
          0x0000007f7407a660: ldr x21, [x29,#-88]
          0x0000007f7407a664: ldr x20, [x29,#-80]
          0x0000007f7407a668: ldr x19, [x29,#-72]
          0x0000007f7407a66c: ldr x0, [x29,#-64]
          0x0000007f7407a670: ldr x1, [x29,#-56]
          0x0000007f7407a674: ldr w2, [x29,#-48]
          0x0000007f7407a678: ldr x3, [x29,#-40]
          0x0000007f7407a67c: ldr x4, [x29,#-32]
          0x0000007f7407a680: ldr x5, [x29,#-24]
          0x0000007f7407a684: ldr x6, [x29,#-16]
          0x0000007f7407a688: ldr x7, [x29,#-8]


        The above code stub can be optimized into the following code sequence saving 24 instructions:

        StubRoutines::call_stub [0x0000007f8c07a540, 0x0000007f8c07a650[ (272 bytes)
          0x0000007f8c07a540: stp x29, x30, [sp,#-16]!
          0x0000007f8c07a544: mov x29, sp
          0x0000007f8c07a548: sub sp, x29, #0xd0
          0x0000007f8c07a54c: str x7, [x29,#-8]
          0x0000007f8c07a550: str w6, [x29,#-16]
          0x0000007f8c07a554: stp x4, x5, [x29,#-32]
          0x0000007f8c07a558: stp x2, x3, [x29,#-48]
          0x0000007f8c07a55c: stp x0, x1, [x29,#-64]
          0x0000007f8c07a560: stp x20, x19, [x29,#-80]
          0x0000007f8c07a564: stp x22, x21, [x29,#-96]
          0x0000007f8c07a568: stp x24, x23, [x29,#-112]
          0x0000007f8c07a56c: stp x26, x25, [x29,#-128]
          0x0000007f8c07a570: stp x28, x27, [x29,#-144]
          0x0000007f8c07a574: stp d9, d8, [x29,#-160]
          0x0000007f8c07a578: stp d11, d10, [x29,#-176]
          0x0000007f8c07a57c: stp d13, d12, [x29,#-192]
          0x0000007f8c07a580: stp d15, d14, [x29,#-208]
          ......
          0x0000007f8c07a5f4: ldp d15, d14, [x29,#-208]
          0x0000007f8c07a5f8: ldp d13, d12, [x29,#-192]
          0x0000007f8c07a5fc: ldp d11, d10, [x29,#-176]
          0x0000007f8c07a600: ldp d9, d8, [x29,#-160]
          0x0000007f8c07a604: ldp x28, x27, [x29,#-144]
          0x0000007f8c07a608: ldp x26, x25, [x29,#-128]
          0x0000007f8c07a60c: ldp x24, x23, [x29,#-112]
          0x0000007f8c07a610: ldp x22, x21, [x29,#-96]
          0x0000007f8c07a614: ldp x20, x19, [x29,#-80]
          0x0000007f8c07a618: ldp x0, x1, [x29,#-64]
          0x0000007f8c07a61c: ldr w2, [x29,#-48]
          0x0000007f8c07a620: ldr x3, [x29,#-40]
          0x0000007f8c07a624: ldp x4, x5, [x29,#-32]
          0x0000007f8c07a628: ldp x6, x7, [x29,#-16]

              fyang Fei Yang
              fyang Fei Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: