-
Enhancement
-
Resolution: Fixed
-
P4
-
15, 16
-
b06
-
x86
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8254347 | 15.0.2 | Vladimir Kozlov | P4 | Resolved | Fixed | b02 |
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)
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)
- backported by
-
JDK-8254347 Remove unneeded nops introduced by 8234160 changes
- Resolved
- relates to
-
JDK-8234160 Enable optimized mitigation for Intel jcc erratum in C2
- Resolved