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); }