On Thu, 30 Apr 2026 17:21:54 GMT, Ashutosh Mehra <[email protected]> wrote:

> > I agree with using general NOPs as well.
> 
> did you mean we should use single-byte nop when generating aot compiled code?

See my following comment.

@ashu-mehra. I looked on Loom post call nops and they use address nops without 
checking `UseAddressNop`:

void MacroAssembler::post_call_nop() {
  if (!Continuations::enabled()) {
    return;
  }
  InstructionMark im(this);
  relocate(post_call_nop_Relocation::spec());
  InlineSkippedInstructionsCounter skipCounter(this);
  emit_int8((uint8_t)0x0f);
  emit_int8((uint8_t)0x1f);
  emit_int8((uint8_t)0x84);
  emit_int8((uint8_t)0x00);
  emit_int32(0x00);
}

which matches 8 bytes address not:

8: 0x0F 0x1F 0x84 0x00 0x00 0x00 0x00 0x00

So we may not be able to switch off `UseAddressNop` for AOT code.
I checked and all 64-bit x86 processors seems supported this form. So I think 
we should be fine.

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

PR Comment: https://git.openjdk.org/jdk/pull/30778#issuecomment-4355567296
PR Comment: https://git.openjdk.org/jdk/pull/30778#issuecomment-4355698504

Reply via email to