Integrated: 8286636: MacroAssembler::post_call_nop should have InstructionMark

Aleksey Shipilev shade at openjdk.java.net
Wed May 18 07:12:09 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`

This pull request has now been integrated.

Changeset: 44b243a0
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/44b243a0619d69830a029f93a7ce2b68159e9e8f
Stats:     5 lines in 3 files changed: 5 ins; 0 del; 0 mod

8286636: MacroAssembler::post_call_nop should have InstructionMark

Reviewed-by: kvn, eosterlund

-------------

PR: https://git.openjdk.java.net/jdk/pull/8678


More information about the hotspot-dev mailing list