RFR: 8286636: MacroAssembler::post_call_nop should have InstructionMark
Aleksey Shipilev
shade at openjdk.java.net
Thu May 12 13:00:04 UTC 2022
`InstructionMark` checks the instruction boundaries, which is important for relocatable instructions. Everywhere where we do any (?) sort of relocation, we do `InstructionMark`. I found that newly added `MacroAssembler::post_call_nop` does not have it, and thus some new code in x86_32 Loom prototype fails with instruction mark / instruction overlapping checks.
If we add it to `InstructionMark` in AArch64 code, then "overlapping instructions" asserts start to fire, because Loom inserted `post_call_nops` when there was an active instruction mark. x86_64 solves this by [resetting the mark before the nop](https://github.com/openjdk/jdk/blob/40f43c6b1ffc88d55dd3223f5d0259ae73cf0356/src/hotspot/cpu/x86/x86_64.ad#L2084), this patch does the same.
Additional testing:
- [x] Linux x86_64 fastdebug `tier1`
- [x] Linux AArch64 fastdebug `tier1`
-------------
Commit messages:
- Some AArch64 paths need a clear insn mark
- Fix
Changes: https://git.openjdk.java.net/jdk/pull/8678/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8678&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8286636
Stats: 5 lines in 3 files changed: 5 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/8678.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8678/head:pull/8678
PR: https://git.openjdk.java.net/jdk/pull/8678
More information about the hotspot-dev
mailing list