--- old/src/cpu/x86/vm/assembler_x86.cpp 2016-04-22 17:27:55.078034500 -0700 +++ new/src/cpu/x86/vm/assembler_x86.cpp 2016-04-22 17:27:54.649010000 -0700 @@ -2323,6 +2323,15 @@ emit_int8((unsigned char)(0xC0 | encode)); } +// This instruction produces ZF or CF flags +void Assembler::ktestql(KRegister src1, KRegister src2) { + assert(VM_Version::supports_avx512bw(), ""); + InstructionAttr attributes(AVX_128bit, /* rex_w */ true, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false); + int encode = vex_prefix_and_encode(src1->encoding(), 0, src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes); + emit_int8((unsigned char)0x99); + emit_int8((unsigned char)(0xC0 | encode)); +} + void Assembler::movb(Address dst, int imm8) { InstructionMark im(this); prefix(dst); @@ -2491,6 +2500,20 @@ emit_operand(src, dst); } +void Assembler::evmovdqub(KRegister mask, bool zeroing, XMMRegister dst, Address src, int vector_len) { + assert(VM_Version::supports_avx512vlbw(), ""); + assert(is_programmed_mask_reg(), ""); + InstructionMark im(this); + InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ false, /* uses_vl */ true); + attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit); + attributes.set_embedded_opmask_register_specifier(mask); + if (zeroing) attributes.set_is_clear_context(); + attributes.set_is_evex_instruction(); + vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); + emit_int8(0x6F); + emit_operand(dst, src); +} + void Assembler::evmovdquw(XMMRegister dst, XMMRegister src, int vector_len) { assert(VM_Version::supports_evex(), ""); InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true); @@ -3275,6 +3298,23 @@ emit_operand(as_Register(dst_enc), src); } +void Assembler::evpcmpeqb(KRegister mask, bool zeroing, KRegister kdst, XMMRegister nds, Address src, int vector_len) { + bool no_reg_mask = (mask == NULL && zeroing == false) ? true : false; + assert(VM_Version::supports_avx512vlbw(), ""); + assert(is_programmed_mask_reg(), ""); + InstructionMark im(this); + InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, no_reg_mask, /* uses_vl */ false); + attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit); + if (!no_reg_mask) { + attributes.set_embedded_opmask_register_specifier(mask); + if (zeroing) attributes.set_is_clear_context(); + } + attributes.set_is_evex_instruction(); + vex_prefix(src, nds->encoding(), kdst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes); + emit_int8(0x74); + emit_operand(as_Register(kdst->encoding()), src); +} + // In this context, the dst vector contains the components that are equal, non equal components are zeroed in dst void Assembler::pcmpeqw(XMMRegister dst, XMMRegister src) { assert(VM_Version::supports_sse2(), "");