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

x86_64 c2i/i2c adapters may use more stack space than necessary

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b13
    • x86_64

      While looking at another bug, I wondered why the c2i adapter for a static call with no arguments is pushing 16 bytes onto the stack:

         pop %rax
         mov %rsp,%r13
         sub $0x10,%rsp
         mov %rax,(%rsp)

      This could be just:

         mov %rsp,%r13
         add $0x8, %r13

      If I'm not mistaken, the alignment invariant is that stack is aligned before the return value is pushed, so the slot for the return value should not be included in the alignment adjustment.

            dlong Dean Long
            dlong Dean Long
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: