--- old/src/hotspot/cpu/x86/assembler_x86.cpp 2018-03-09 13:15:37.482686297 -0800 +++ new/src/hotspot/cpu/x86/assembler_x86.cpp 2018-03-09 13:15:37.186685189 -0800 @@ -8709,6 +8709,24 @@ emit_int8((unsigned char)(0xC0 | encode)); } +void Assembler::vpopcntd(XMMRegister dst, XMMRegister src, int vector_len) { + assert(UseAVX > 2 && VM_Version::support_avx512_vpopcntdq(), "must support vpopcntdq feature"); + InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); + attributes.set_is_evex_instruction(); + int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); + emit_int8(0x55); + emit_int8((unsigned char)(0xC0 | encode)); +} + +void Assembler::vpopcntq(XMMRegister dst, XMMRegister src, int vector_len) { + assert(UseAVX > 2 && VM_Version::support_avx512_vpopcntdq(), "must support vpopcntdq feature"); + InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); + attributes.set_is_evex_instruction(); + int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); + emit_int8(0x55); + emit_int8((unsigned char)(0xC0 | encode)); +} + void Assembler::popq(Address dst) { InstructionMark im(this); prefixq(dst);