RFR: JDK-8283140: Remove unused encoding classes/operands from x86_64.ad [v2]

Cesar Soares Lucas cslucas at openjdk.org
Fri Oct 27 16:53:30 UTC 2023


On Thu, 26 Oct 2023 06:47:34 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Thanks for reviewing @TobiHartmann . Why do you think it changes the encoding?
>
> Because before your change, the add is encoded with `0x83` if the framesize is small enough and I think `Assembler::addq` always uses the `0x81` encoding, right?

It's kind of confusing but the encoding will end up being the same. The `addq` being called here is the one at assembler_x86.cpp:12899. In that method, the `prefixq_and_encode` will emit the REX_W prefix because the encoding of RSP is < 8. The `emith_arith`, defined on line 313 of the same file, will check that the immediate passed as argument (i.e., framesize) fits in a byte, if so it'll actually emit "0x81 | 0x02".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16319#discussion_r1374828336


More information about the hotspot-compiler-dev mailing list