RFR: 8286636: MacroAssembler::post_call_nop should have InstructionMark
Vladimir Kozlov
kvn at openjdk.java.net
Mon May 16 16:09:39 UTC 2022
On Thu, 12 May 2022 11:32:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> `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 missing 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`
Looks good. And your analysis is correct.
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8678
More information about the hotspot-dev
mailing list