aarch64: incorrect array index load in aastore

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: hotspot
    • aarch64

      From the jvm spec, array index is is of type int for aastore. But we use `ldr` to get index in TemplateTable::aastore().
      AArch64 `ldr` instruction loads 64-bit value from memory, which doesn't match the type of array index.
      This doesn't cause an issue as we only use the lower 32-bit of the loaded value for index check (`cmpw`).
      We should use `ldrw` here instead as the `ldr` would exceed the boundary of array index.

            Assignee:
            Fei Yang
            Reporter:
            Fei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: