RFR: 8293618: x86: Wrong code generation in class Assembler

Quan Anh Mai duke at openjdk.org
Fri Sep 23 07:33:24 UTC 2022


On Fri, 23 Sep 2022 06:44:18 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> @TobiHartmann Thanks for taking a look, method entry barrier needs a 4-byte immediate so it can be patched. This method is used in `Assembler::cmpl_imm32`
>
> Okay, so code before emitted an 8-bit immediate. Why didn't that cause any issues when patching?

`cmpl(Address, int)` unconditionally emits a 32-bit immediate before, I make it emit 8-bit immediate where possible and create `cmpl_imm32` to strictly emit a 32-bit immediate, similar to how we have `subl_imm32` and `subq_imm32`.

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

PR: https://git.openjdk.org/jdk/pull/10240


More information about the hotspot-dev mailing list