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

Tobias Hartmann thartmann at openjdk.org
Fri Sep 23 07:41:22 UTC 2022


On Fri, 23 Sep 2022 07:29:04 GMT, Quan Anh Mai <duke at openjdk.org> wrote:

>> 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`.

Ah! Now I got it. Thanks for the explanation.

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

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


More information about the hotspot-dev mailing list