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

RISC-V: Move alignment shim into initialize_header() in C1_MacroAssembler::allocate_array

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • hotspot
    • b14
    • riscv
    • linux

      Hi, I noticed that RISC-V missed this change from #11044 [1]:

      `I know @albertnetymk already touched on this but some thoughts on the unclear boundaries between the header and the data. My feeling is that the most pragmatic solution would be to have the header initialization always initialize up to the word aligned (up) header_size_in_bytes. (Similarly to how it is done for the instanceOop where the klass gap gets initialized with the header, even if it may be data.) And have the body initialization do the rest (word aligned to word aligned clear).`

      `This seems preferable than adding these extra alignment shims in-between the header and body/payload/data initialization. (I also tried moving the alignment fix into the body initialization, but it seems a little bit messier in the implementation.)`


      [1] https://github.com/openjdk/jdk/pull/11044#pullrequestreview-1894323275

      ### Tests

      - [x] Run tier1-3 tests on SiFive unmatched (release)

            gcao Gui Cao
            gcao Gui Cao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: