[15] RFR (S): 8241434: x86: Fix Assembler::emit_operand asserts for XMM registers
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Wed Mar 25 14:11:59 UTC 2020
Forgot to include bug id in the subject. Fixed.
Best regards,
Vladimir Ivanov
On 25.03.2020 15:50, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8241434/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8241434
>
> Assembler::emit_operand() on x86 works with Registers, but is used to
> encode both GP registers (Register) and XMM registers (XMMRegisters).
>
> It can cause problems since some asserts assume the arguments are
> Registers (e.g, assert(index != rsp)) and may fail when XMMRegister with
> the same encoding is passed.
>
> The fix refactors operand encoding logic into
> Assembler::emit_operand_helper() which works with register encodings and
> it is called from overloaded Assembler::emit_operand() where proper
> asserts are put.
>
> Also, as a cleanup, made Assembler::emit_operand32() and
> Assembler::emit_farith() available only on x86-32.
>
> Testing: tier1-4
>
> Thanks!
>
> Best regards,
> Vladimir Ivanov
More information about the hotspot-dev
mailing list