@@ -3475,6 +3475,22 @@ void Assembler::vmovdqu(XMMRegister dst, XMMRegister src) {
34753475 emit_int16(0x6F, (0xC0 | encode));
34763476}
34773477
3478+ void Assembler::vmovw(XMMRegister dst, Register src) {
3479+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
3480+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
3481+ attributes.set_is_evex_instruction();
3482+ int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_MAP5, &attributes, true);
3483+ emit_int16(0x6E, (0xC0 | encode));
3484+ }
3485+
3486+ void Assembler::vmovw(Register dst, XMMRegister src) {
3487+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
3488+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
3489+ attributes.set_is_evex_instruction();
3490+ int encode = vex_prefix_and_encode(src->encoding(), 0, dst->encoding(), VEX_SIMD_66, VEX_OPCODE_MAP5, &attributes, true);
3491+ emit_int16(0x7E, (0xC0 | encode));
3492+ }
3493+
34783494void Assembler::vmovdqu(XMMRegister dst, Address src) {
34793495 assert(UseAVX > 0, "");
34803496 InstructionMark im(this);
@@ -8442,6 +8458,70 @@ void Assembler::vpaddq(XMMRegister dst, XMMRegister nds, Address src, int vector
84428458 emit_operand(dst, src, 0);
84438459}
84448460
8461+ void Assembler::vaddsh(XMMRegister dst, XMMRegister nds, XMMRegister src) {
8462+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8463+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8464+ attributes.set_is_evex_instruction();
8465+ int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8466+ emit_int16(0x58, (0xC0 | encode));
8467+ }
8468+
8469+ void Assembler::vsubsh(XMMRegister dst, XMMRegister nds, XMMRegister src) {
8470+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8471+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8472+ attributes.set_is_evex_instruction();
8473+ int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8474+ emit_int16(0x5C, (0xC0 | encode));
8475+ }
8476+
8477+ void Assembler::vdivsh(XMMRegister dst, XMMRegister nds, XMMRegister src) {
8478+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8479+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8480+ attributes.set_is_evex_instruction();
8481+ int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8482+ emit_int16(0x5E, (0xC0 | encode));
8483+ }
8484+
8485+ void Assembler::vmulsh(XMMRegister dst, XMMRegister nds, XMMRegister src) {
8486+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8487+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8488+ attributes.set_is_evex_instruction();
8489+ int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8490+ emit_int16(0x59, (0xC0 | encode));
8491+ }
8492+
8493+ void Assembler::vmaxsh(XMMRegister dst, XMMRegister nds, XMMRegister src) {
8494+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8495+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8496+ attributes.set_is_evex_instruction();
8497+ int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8498+ emit_int16(0x5F, (0xC0 | encode));
8499+ }
8500+
8501+ void Assembler::vminsh(XMMRegister dst, XMMRegister nds, XMMRegister src) {
8502+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8503+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8504+ attributes.set_is_evex_instruction();
8505+ int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8506+ emit_int16(0x5D, (0xC0 | encode));
8507+ }
8508+
8509+ void Assembler::vsqrtsh(XMMRegister dst, XMMRegister src) {
8510+ assert(VM_Version::supports_avx512_fp16(), "requires AVX512-FP16");
8511+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8512+ attributes.set_is_evex_instruction();
8513+ int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_MAP5, &attributes);
8514+ emit_int16(0x51, (0xC0 | encode));
8515+ }
8516+
8517+ void Assembler::vfmadd132sh(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
8518+ assert(VM_Version::supports_avx512_fp16(), "");
8519+ InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
8520+ attributes.set_is_evex_instruction();
8521+ int encode = vex_prefix_and_encode(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_66, VEX_OPCODE_MAP6, &attributes);
8522+ emit_int16((unsigned char)0x99, (0xC0 | encode));
8523+ }
8524+
84458525void Assembler::vpaddsb(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
84468526 assert(UseAVX > 0 && (vector_len == Assembler::AVX_512bit || (!needs_evex(dst, nds, src) || VM_Version::supports_avx512vl())), "");
84478527 assert(!needs_evex(dst, nds, src) || VM_Version::supports_avx512bw(), "");
0 commit comments