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

aarch32: Delete incorrect NativeTrampolineCall::instruction_size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • port-stage-aarch32-8
    • port-stage-aarch32-8
    • hotspot
    • None

      It's redundant and never used, because shared code in some sitations assumes
      NativeTrampolineCall to be same size as NativeCall. However, they are different
      sizes (3 and 5 words on ARMv6), so first one is padded with nops up to second.

      Presence of NativeTrampolineCall::instruction_size encourage it's use and thus
      introducing bugs. Example is nativeCall_before:

      inline NativeCall* nativeCall_before(address return_address) {
        if (NativeTrampolineCall::is_at(return_address - NativeCall::instruction_size)) {
          ...
        }
        ...
      }

      It will be incorrect if `NativeTrampolineCall::instruction_size` used here, but
      looking good.

      NativeCall::instruction_size is not C++ constant and computed at VM start after
      determing weither it's running on ARMv6 or ARMv7.
      Making NativeTrampolineCall::instruction_size to be always equal
      NativeCall::instruction_size implies making one not constant too and adding
      relevant initializing code.

            enevill Ed Nevill
            enevill Ed Nevill
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: