RFR: 8293618: x86: Wrong code generation in class Assembler
Tobias Hartmann
thartmann at openjdk.org
Thu Sep 22 07:07:16 UTC 2022
On Mon, 12 Sep 2022 15:30:01 GMT, Quan Anh Mai <duke at openjdk.org> wrote:
> Hi,
>
> This patch fixes some issues in the code generation of x86 assembler:
>
> - `Assembler::testl` misses `prefix(dst)`
> - `Assembler::addw` misses the 0x66 prefix
> - `Assembler::emit_operand` needs the length of the instruction from the address operand, this is often forgotten, making this parameter explicit to prevent potential issues
> - The assembler should not do optimisations that change the actual emitted instructions, these should be moved to `MacroAssembler` instead
>
> AFAICT there is no failure due to these mistakes. Please take a look and give reviews.
> Thanks you very much.
src/hotspot/cpu/x86/assembler_x86.cpp line 351:
> 349: }
> 350:
> 351: void Assembler::emit_arith_operand_imm32(int op1, Register rm, Address adr, int32_t imm32) {
Why is this needed?
-------------
PR: https://git.openjdk.org/jdk/pull/10240
More information about the hotspot-dev
mailing list