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

Remove unneeded nops introduced by 8234160 changes

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      x86
    • OS:
      generic

      Backports

        Description

        Changes for JDK-8234160: "Enable optimized mitigation for Intel jcc erratum in C2" added NOP instructions before branch instructions to avoid crossing cache line.

        But code which checks for branch instruction assumes that all blocks in generated code have a branch as last instruction:
        http://hg.openjdk.java.net/jdk/jdk/file/e7d0ec2d06e8/src/hotspot/cpu/x86/c2_intelJccErratum_x86.cpp#l48

        Which is not true for block which fall through to next block - C2 removes branch in such blocks.

        Because of incorrect check we may see unneeded NOPs in code:

        04c movq R10, [R10 + #192 (32-bit)] # long
        053 movq [RAX], R10 # long

                nop # 10 bytes pad for loops and calls

        060 movl [RAX + #8 (8-bit)], narrowklass: precise klass java/lang/Object: 0x00007fe6b02b86c0:Constant:exact *
        067 movl [RAX + #12 (8-bit)], R12 # int (R12_heapbase==0)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kvn Vladimir Kozlov
                Reporter:
                kvn Vladimir Kozlov
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: