From b7fb8ef89edf21ab1d6197ca8aff5a421d82c74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20=C3=96sterlund?= Date: Tue, 17 Jan 2023 12:16:05 +0000 Subject: [PATCH] 8299323: Allow extended registers for cmpw Reviewed-by: sviswanathan, kvn --- src/hotspot/cpu/x86/assembler_x86.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hotspot/cpu/x86/assembler_x86.cpp b/src/hotspot/cpu/x86/assembler_x86.cpp index 67ff8a97c7a..1748a9fb06f 100644 --- a/src/hotspot/cpu/x86/assembler_x86.cpp +++ b/src/hotspot/cpu/x86/assembler_x86.cpp @@ -1763,8 +1763,9 @@ void Assembler::cmpl_imm32(Address dst, int32_t imm32) { void Assembler::cmpw(Address dst, int imm16) { InstructionMark im(this); - assert(!dst.base_needs_rex() && !dst.index_needs_rex(), "no extended registers"); - emit_int16(0x66, (unsigned char)0x81); + emit_int8(0x66); + prefix(dst); + emit_int8((unsigned char)0x81); emit_operand(rdi, dst, 2); emit_int16(imm16); }