/*
 * Copyright (c) 2017 Trail of Bits, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

namespace {

template <typename D, typename S>
DEF_SEM(MOV, D dst, const S src) {
  WriteZExt(dst, Read(src));
  return memory;
}

template <typename D1, typename S1, typename D2, typename S2>
DEF_SEM(XCHG, D1 dst, S1 dst_val, D2 src, S2 src_val) {
  auto old_dst = Read(dst_val);
  auto old_src = Read(src_val);
  WriteZExt(dst, old_src);
  WriteZExt(src, old_dst);
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVBE16, D dst, const S src) {
  WriteZExt(dst, __builtin_bswap16(Read(src)));
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVBE32, D dst, const S src) {
  WriteZExt(dst, __builtin_bswap32(Read(src)));
  return memory;
}


#if 64 == ADDRESS_SIZE_BITS
template <typename D, typename S>
DEF_SEM(MOVBE64, D dst, const S src) {
  Write(dst, __builtin_bswap64(Read(src)));
  return memory;
}
#endif

template <typename D, typename S>
DEF_SEM(MOVQ, D dst, S src) {
  UWriteV64(dst, UExtractV64(UReadV64(src), 0));
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVD, D dst, S src) {
  UWriteV32(dst, UExtractV32(UReadV32(src), 0));
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVxPS, D dst, S src) {
  FWriteV32(dst, FReadV32(src));
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVxPD, D dst, S src) {
  FWriteV64(dst, FReadV64(src));
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVDQx, D dst, S src) {
  UWriteV128(dst, UReadV128(src));
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVLPS, D dst, S src) {
  auto src_vec = FReadV32(src);
  auto low1 = FExtractV32(src_vec, 0);
  auto low2 = FExtractV32(src_vec, 1);
  FWriteV32(dst, FInsertV32(FInsertV32(FReadV32(dst), 0, low1), 1, low2));
  return memory;
}

DEF_SEM(MOVLHPS, V128W dst, V128 src) {
  auto res = FReadV32(dst);
  auto src1 = FReadV32(src);
  res = FInsertV32(res, 2, FExtractV32(src1, 0));
  res = FInsertV32(res, 3, FExtractV32(src1, 1));
  FWriteV32(dst, res);
  return memory;
}

DEF_SEM(MOVHLPS, V128W dst, V128 src) {
  auto res = FReadV32(dst);
  auto src1 = FReadV32(src);
  res = FInsertV32(res, 0, FExtractV32(src1, 2));
  res = FInsertV32(res, 1, FExtractV32(src1, 3));
  FWriteV32(dst, res);
  return memory;
}

template <typename D, typename S>
DEF_SEM(MOVLPD, D dst, S src) {
  FWriteV64(dst, FInsertV64(FReadV64(dst), 0, FExtractV64(FReadV64(src), 0)));
  return memory;
}

#if HAS_FEATURE_AVX

DEF_SEM(VMOVLPS, VV128W dst, V128 src1, MV64 src2) {
  auto low_vec = FReadV32(src2);
  FWriteV32(
      dst, FInsertV32(FInsertV32(FReadV32(src1), 0, FExtractV32(low_vec, 0)), 1,
                      FExtractV32(low_vec, 1)));
  return memory;
}

DEF_SEM(VMOVLPD, VV128W dst, V128 src1, MV64 src2) {
  FWriteV64(dst, FInsertV64(FReadV64(src1), 0, FExtractV64(FReadV64(src2), 0)));
  return memory;
}

DEF_SEM(VMOVLHPS, VV128W dst, V128 src1, V128 src2) {

  /* DEST[63:0] ← SRC1[63:0] */
  /* DEST[127:64] ← SRC2[63:0] */
  /* DEST[VLMAX-1:128] ← 0 */

  auto src1_vec = FReadV32(src1);
  auto src2_vec = FReadV32(src2);

  float32v4_t temp_vec = {};
  temp_vec = FInsertV32(temp_vec, 0, FExtractV32(src1_vec, 0));
  temp_vec = FInsertV32(temp_vec, 1, FExtractV32(src1_vec, 1));
  temp_vec = FInsertV32(temp_vec, 2, FExtractV32(src2_vec, 0));
  temp_vec = FInsertV32(temp_vec, 3, FExtractV32(src2_vec, 1));

  FWriteV32(dst, temp_vec);
  return memory;
}

DEF_SEM(VMOVHLPS, VV128W dst, V128 src1, V128 src2) {
  auto src1_vec = FReadV32(src1);
  auto src2_vec = FReadV32(src2);

  float32v4_t temp_vec = {};
  temp_vec = FInsertV32(temp_vec, 0, FExtractV32(src2_vec, 2));
  temp_vec = FInsertV32(temp_vec, 1, FExtractV32(src2_vec, 3));
  temp_vec = FInsertV32(temp_vec, 2, FExtractV32(src1_vec, 2));
  temp_vec = FInsertV32(temp_vec, 3, FExtractV32(src1_vec, 3));

  FWriteV32(dst, temp_vec);
  return memory;
}

#endif  // HAS_FEATURE_AVX

}  // namespace

// Fused `CALL $0; POP reg` sequences.
DEF_ISEL(CALL_POP_FUSED_32) = MOV<R32W, I32>;
DEF_ISEL(CALL_POP_FUSED_64) = MOV<R64W, I64>;

DEF_ISEL(MOV_GPR8_IMMb_C6r0) = MOV<R8W, I8>;
DEF_ISEL(MOV_MEMb_IMMb) = MOV<M8W, I8>;
DEF_ISEL_RnW_In(MOV_GPRv_IMMz, MOV);
DEF_ISEL_MnW_In(MOV_MEMv_IMMz, MOV);
DEF_ISEL(MOVBE_GPRv_MEMv_16) = MOVBE16<R16W, M16>;
DEF_ISEL(MOVBE_GPRv_MEMv_32) = MOVBE32<R32W, M32>;
IF_64BIT(DEF_ISEL(MOVBE_GPRv_MEMv_64) = MOVBE64<R64W, M64>;)
DEF_ISEL(MOV_GPR8_GPR8_88) = MOV<R8W, R8>;
DEF_ISEL(MOV_MEMb_GPR8) = MOV<M8W, R8>;
DEF_ISEL_MnW_Rn(MOV_MEMv_GPRv, MOV);
DEF_ISEL_RnW_Rn(MOV_GPRv_GPRv_89, MOV);
DEF_ISEL_RnW_Rn(MOV_GPRv_GPRv_8B, MOV);
DEF_ISEL(MOV_GPR8_MEMb) = MOV<R8W, M8>;
DEF_ISEL(MOV_GPR8_GPR8_8A) = MOV<R8W, R8>;
DEF_ISEL_RnW_Mn(MOV_GPRv_MEMv, MOV);
DEF_ISEL_MnW_Rn(MOV_MEMv_GPRv_8B, MOV);
DEF_ISEL(MOV_AL_MEMb) = MOV<R8W, M8>;
DEF_ISEL_RnW_Mn(MOV_OrAX_MEMv, MOV);
DEF_ISEL(MOV_MEMb_AL) = MOV<M8W, R8>;
DEF_ISEL_MnW_Rn(MOV_MEMv_OrAX, MOV);
DEF_ISEL(MOV_GPR8_IMMb_D0) = MOV<R8W, I8>;
DEF_ISEL(MOV_GPR8_IMMb_B0) =
    MOV<R8W, I8>;  // https://github.com/intelxed/xed/commit/906d25
DEF_ISEL_RnW_In(MOV_GPRv_IMMv, MOV);

DEF_ISEL(MOVNTI_MEMd_GPR32) = MOV<M32W, R32>;
IF_64BIT(DEF_ISEL(MOVNTI_MEMq_GPR64) = MOV<M64W, R64>;)

DEF_ISEL(XCHG_MEMb_GPR8) = XCHG<M8W, M8, R8W, R8>;
DEF_ISEL(XCHG_GPR8_GPR8) = XCHG<R8W, R8, R8W, R8>;
DEF_ISEL_MnW_Mn_RnW_Rn(XCHG_MEMv_GPRv, XCHG);
DEF_ISEL_RnW_Rn_RnW_Rn(XCHG_GPRv_GPRv, XCHG);
DEF_ISEL_RnW_Rn_RnW_Rn(XCHG_GPRv_OrAX, XCHG);

DEF_ISEL(MOVQ_MMXq_MEMq_0F6E) = MOVQ<V64W, MV64>;
DEF_ISEL(MOVQ_MMXq_GPR64) = MOVQ<V64W, V64>;
DEF_ISEL(MOVQ_MEMq_MMXq_0F7E) = MOVQ<V64W, V64>;
DEF_ISEL(MOVQ_GPR64_MMXq) = MOVQ<V64W, V64>;
DEF_ISEL(MOVQ_MMXq_MEMq_0F6F) = MOVQ<V64W, MV64>;
DEF_ISEL(MOVQ_MMXq_MMXq_0F6F) = MOVQ<V64W, V64>;
DEF_ISEL(MOVQ_MEMq_MMXq_0F7F) = MOVQ<MV64W, V64>;
DEF_ISEL(MOVQ_MMXq_MMXq_0F7F) = MOVQ<V64W, V64>;

DEF_ISEL(MOVQ_XMMdq_MEMq_0F6E) = MOVQ<V128W, MV64>;
IF_64BIT(DEF_ISEL(MOVQ_XMMdq_GPR64) = MOVQ<V128W, V64>;)
DEF_ISEL(MOVQ_MEMq_XMMq_0F7E) = MOVQ<MV64W, V128>;
IF_64BIT(DEF_ISEL(MOVQ_GPR64_XMMq) = MOVQ<V64W, V128>;)
DEF_ISEL(MOVQ_MEMq_XMMq_0FD6) = MOVQ<MV64W, V128>;
DEF_ISEL(MOVQ_XMMdq_XMMq_0FD6) = MOVQ<V128W, V128>;
DEF_ISEL(MOVQ_XMMdq_MEMq_0F7E) = MOVQ<V128W, MV64>;
DEF_ISEL(MOVQ_XMMdq_XMMq_0F7E) = MOVQ<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVQ_XMMdq_MEMq_6E) = MOVQ<VV128W, MV64>;
IF_64BIT(DEF_ISEL(VMOVQ_XMMdq_GPR64q) = MOVQ<VV128W, V64>;)
DEF_ISEL(VMOVQ_MEMq_XMMq_7E) = MOVQ<MV64W, V128>;
IF_64BIT(DEF_ISEL(VMOVQ_GPR64q_XMMq) = MOVQ<V64W, V128>;)
DEF_ISEL(VMOVQ_XMMdq_MEMq_7E) = MOVQ<VV128W, MV64>;
DEF_ISEL(VMOVQ_XMMdq_XMMq_7E) = MOVQ<VV128W, V128>;
DEF_ISEL(VMOVQ_MEMq_XMMq_D6) = MOVQ<MV64W, V128>;
DEF_ISEL(VMOVQ_XMMdq_XMMq_D6) = MOVQ<VV128W, V128>;

#  if HAS_FEATURE_AVX512
DEF_ISEL(VMOVQ_XMMu64_MEMu64_AVX512) = MOVQ<VV128W, MV64>;
IF_64BIT(DEF_ISEL(VMOVQ_GPR64u64_XMMu64_AVX512) = MOVQ<V64W, V128>;)
IF_64BIT(DEF_ISEL(VMOVQ_XMMu64_GPR64u64_AVX512) = MOVQ<VV128W, V64>;)
DEF_ISEL(VMOVQ_XMMu64_XMMu64_AVX512) = MOVQ<VV128W, V128>;
DEF_ISEL(VMOVQ_MEMu64_XMMu64_AVX512) = MOVQ<MV64W, V128>;
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVD_MMXq_MEMd) = MOVD<V32W, MV32>;
DEF_ISEL(MOVD_MMXq_GPR32) = MOVD<V32W, V32>;
DEF_ISEL(MOVD_MEMd_MMXd) = MOVD<MV32W, V32>;
DEF_ISEL(MOVD_GPR32_MMXd) = MOVD<V32W, V32>;

DEF_ISEL(MOVD_XMMdq_MEMd) = MOVD<V128W, MV32>;
DEF_ISEL(MOVD_XMMdq_GPR32) = MOVD<V128W, V32>;  // Zero extends.
DEF_ISEL(MOVD_MEMd_XMMd) = MOVD<MV32W, V128>;
DEF_ISEL(MOVD_GPR32_XMMd) = MOVD<V32W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVD_XMMdq_MEMd) = MOVD<VV128W, MV32>;
DEF_ISEL(VMOVD_XMMdq_GPR32d) = MOVD<VV128W, V32>;
DEF_ISEL(VMOVD_MEMd_XMMd) = MOVD<MV32W, V128>;
DEF_ISEL(VMOVD_GPR32d_XMMd) = MOVD<V32W, V128>;
#  if HAS_FEATURE_AVX512
DEF_ISEL(VMOVD_XMMu32_MEMu32_AVX512) = MOVD<VV128W, MV32>;
DEF_ISEL(VMOVD_XMMu32_GPR32u32_AVX512) = MOVD<VV128W, V32>;
DEF_ISEL(VMOVD_MEMu32_XMMu32_AVX512) = MOVD<MV32W, V128>;
DEF_ISEL(VMOVD_GPR32u32_XMMu32_AVX512) = MOVD<V32W, V128>;
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVAPS_XMMps_MEMps) = MOVxPS<V128W, MV128>;
DEF_ISEL(MOVAPS_XMMps_XMMps_0F28) = MOVxPS<V128W, V128>;
DEF_ISEL(MOVAPS_MEMps_XMMps) = MOVxPS<MV128W, V128>;
DEF_ISEL(MOVAPS_XMMps_XMMps_0F29) = MOVxPS<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVAPS_XMMdq_MEMdq) = MOVxPS<VV128W, MV128>;
DEF_ISEL(VMOVAPS_XMMdq_XMMdq_28) = MOVxPS<VV128W, VV128>;
DEF_ISEL(VMOVAPS_MEMdq_XMMdq) = MOVxPS<MV128W, VV128>;
DEF_ISEL(VMOVAPS_XMMdq_XMMdq_29) = MOVxPS<VV128W, VV128>;
DEF_ISEL(VMOVAPS_YMMqq_MEMqq) = MOVxPS<VV256W, MV256>;
DEF_ISEL(VMOVAPS_YMMqq_YMMqq_28) = MOVxPS<VV256W, VV256>;
DEF_ISEL(VMOVAPS_MEMqq_YMMqq) = MOVxPS<MV256W, VV256>;
DEF_ISEL(VMOVAPS_YMMqq_YMMqq_29) = MOVxPS<VV256W, VV256>;
#  if HAS_FEATURE_AVX512

//4102 VMOVAPS VMOVAPS_ZMMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//4103 VMOVAPS VMOVAPS_ZMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//4104 VMOVAPS VMOVAPS_ZMMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//4105 VMOVAPS VMOVAPS_MEMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//4106 VMOVAPS VMOVAPS_XMMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//4107 VMOVAPS VMOVAPS_XMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//4108 VMOVAPS VMOVAPS_XMMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//4109 VMOVAPS VMOVAPS_MEMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//4110 VMOVAPS VMOVAPS_YMMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//4111 VMOVAPS VMOVAPS_YMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//4112 VMOVAPS VMOVAPS_YMMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//4113 VMOVAPS VMOVAPS_MEMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVNTPS_MEMdq_XMMps) = MOVxPS<MV128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVNTPS_MEMdq_XMMdq) = MOVxPS<MV128W, VV128>;
DEF_ISEL(VMOVNTPS_MEMqq_YMMqq) = MOVxPS<MV256W, VV256>;
#  if HAS_FEATURE_AVX512

//6168 VMOVNTPS VMOVNTPS_MEMf32_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//6169 VMOVNTPS VMOVNTPS_MEMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//6170 VMOVNTPS VMOVNTPS_MEMf32_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVUPS_XMMps_MEMps) = MOVxPS<V128W, MV128>;
DEF_ISEL(MOVUPS_XMMps_XMMps_0F10) = MOVxPS<V128W, V128>;
DEF_ISEL(MOVUPS_MEMps_XMMps) = MOVxPS<MV128W, V128>;
DEF_ISEL(MOVUPS_XMMps_XMMps_0F11) = MOVxPS<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVUPS_XMMdq_MEMdq) = MOVxPS<VV128W, MV128>;
DEF_ISEL(VMOVUPS_XMMdq_XMMdq_10) = MOVxPS<VV128W, VV128>;
DEF_ISEL(VMOVUPS_MEMdq_XMMdq) = MOVxPS<MV128W, VV128>;
DEF_ISEL(VMOVUPS_XMMdq_XMMdq_11) = MOVxPS<VV128W, VV128>;
DEF_ISEL(VMOVUPS_YMMqq_MEMqq) = MOVxPS<VV256W, MV256>;
DEF_ISEL(VMOVUPS_YMMqq_YMMqq_10) = MOVxPS<VV256W, VV256>;
DEF_ISEL(VMOVUPS_MEMqq_YMMqq) = MOVxPS<MV256W, VV256>;
DEF_ISEL(VMOVUPS_YMMqq_YMMqq_11) = MOVxPS<VV256W, VV256>;
#  if HAS_FEATURE_AVX512

//4954 VMOVUPS VMOVUPS_ZMMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//4955 VMOVUPS VMOVUPS_ZMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4956 VMOVUPS VMOVUPS_ZMMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//4957 VMOVUPS VMOVUPS_MEMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4958 VMOVUPS VMOVUPS_XMMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//4959 VMOVUPS VMOVUPS_XMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4960 VMOVUPS VMOVUPS_XMMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//4961 VMOVUPS VMOVUPS_MEMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4962 VMOVUPS VMOVUPS_YMMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//4963 VMOVUPS VMOVUPS_YMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4964 VMOVUPS VMOVUPS_YMMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//4965 VMOVUPS VMOVUPS_MEMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVAPD_XMMpd_MEMpd) = MOVxPD<V128W, MV128>;
DEF_ISEL(MOVAPD_XMMpd_XMMpd_0F28) = MOVxPD<V128W, V128>;
DEF_ISEL(MOVAPD_MEMpd_XMMpd) = MOVxPD<MV128W, V128>;
DEF_ISEL(MOVAPD_XMMpd_XMMpd_0F29) = MOVxPD<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVAPD_XMMdq_MEMdq) = MOVxPD<VV128W, MV128>;
DEF_ISEL(VMOVAPD_XMMdq_XMMdq_28) = MOVxPD<VV128W, VV128>;
DEF_ISEL(VMOVAPD_MEMdq_XMMdq) = MOVxPD<MV128W, VV128>;
DEF_ISEL(VMOVAPD_XMMdq_XMMdq_29) = MOVxPD<VV128W, VV128>;
DEF_ISEL(VMOVAPD_YMMqq_MEMqq) = MOVxPD<VV256W, MV256>;
DEF_ISEL(VMOVAPD_YMMqq_YMMqq_28) = MOVxPD<VV256W, VV256>;
DEF_ISEL(VMOVAPD_MEMqq_YMMqq) = MOVxPD<MV256W, VV256>;
DEF_ISEL(VMOVAPD_YMMqq_YMMqq_29) = MOVxPD<VV256W, VV256>;
#  if HAS_FEATURE_AVX512

//5585 VMOVAPD VMOVAPD_ZMMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//5586 VMOVAPD VMOVAPD_ZMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//5587 VMOVAPD VMOVAPD_ZMMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//5588 VMOVAPD VMOVAPD_MEMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//5589 VMOVAPD VMOVAPD_XMMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//5590 VMOVAPD VMOVAPD_XMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//5591 VMOVAPD VMOVAPD_XMMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//5592 VMOVAPD VMOVAPD_MEMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//5593 VMOVAPD VMOVAPD_YMMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//5594 VMOVAPD VMOVAPD_YMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
//5595 VMOVAPD VMOVAPD_YMMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//5596 VMOVAPD VMOVAPD_MEMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVNTPD_MEMdq_XMMpd) = MOVxPD<MV128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVNTPD_MEMdq_XMMdq) = MOVxPD<MV128W, VV128>;
DEF_ISEL(VMOVNTPD_MEMqq_YMMqq) = MOVxPD<MV256W, VV256>;
#  if HAS_FEATURE_AVX512

//6088 VMOVNTPD VMOVNTPD_MEMf64_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//6089 VMOVNTPD VMOVNTPD_MEMf64_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//6090 VMOVNTPD VMOVNTPD_MEMf64_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVUPD_XMMpd_MEMpd) = MOVxPD<V128W, MV128>;
DEF_ISEL(MOVUPD_XMMpd_XMMpd_0F10) = MOVxPD<V128W, V128>;
DEF_ISEL(MOVUPD_MEMpd_XMMpd) = MOVxPD<MV128W, V128>;
DEF_ISEL(MOVUPD_XMMpd_XMMpd_0F11) = MOVxPD<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVUPD_XMMdq_MEMdq) = MOVxPD<VV128W, MV128>;
DEF_ISEL(VMOVUPD_XMMdq_XMMdq_10) = MOVxPD<VV128W, VV128>;
DEF_ISEL(VMOVUPD_MEMdq_XMMdq) = MOVxPD<MV128W, VV128>;
DEF_ISEL(VMOVUPD_XMMdq_XMMdq_11) = MOVxPD<VV128W, VV128>;
DEF_ISEL(VMOVUPD_YMMqq_MEMqq) = MOVxPD<VV256W, MV256>;
DEF_ISEL(VMOVUPD_YMMqq_YMMqq_10) = MOVxPD<VV256W, VV256>;
DEF_ISEL(VMOVUPD_MEMqq_YMMqq) = MOVxPD<MV256W, VV256>;
DEF_ISEL(VMOVUPD_YMMqq_YMMqq_11) = MOVxPD<VV256W, VV256>;
#  if HAS_FEATURE_AVX512

//4991 VMOVUPD VMOVUPD_ZMMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//4992 VMOVUPD VMOVUPD_ZMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4993 VMOVUPD VMOVUPD_ZMMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
//4994 VMOVUPD VMOVUPD_MEMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4995 VMOVUPD VMOVUPD_XMMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//4996 VMOVUPD VMOVUPD_XMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4997 VMOVUPD VMOVUPD_XMMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
//4998 VMOVUPD VMOVUPD_MEMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//4999 VMOVUPD VMOVUPD_YMMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//5000 VMOVUPD VMOVUPD_YMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
//5001 VMOVUPD VMOVUPD_YMMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
//5002 VMOVUPD VMOVUPD_MEMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVNTDQ_MEMdq_XMMdq) = MOVDQx<MV128W, V128>;
DEF_ISEL(MOVNTDQA_XMMdq_MEMdq) = MOVDQx<V128W, MV128>;

DEF_ISEL(MOVDQU_XMMdq_MEMdq) = MOVDQx<V128W, MV128>;
DEF_ISEL(MOVDQU_XMMdq_XMMdq_0F6F) = MOVDQx<V128W, V128>;
DEF_ISEL(MOVDQU_MEMdq_XMMdq) = MOVDQx<MV128W, V128>;
DEF_ISEL(MOVDQU_XMMdq_XMMdq_0F7F) = MOVDQx<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVNTDQ_MEMdq_XMMdq) = MOVDQx<MV128W, V128>;
DEF_ISEL(VMOVNTDQ_MEMqq_YMMqq) = MOVDQx<MV256W, VV256>;

//5061 VMOVNTDQ VMOVNTDQ_MEMu32_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//5062 VMOVNTDQ VMOVNTDQ_MEMu32_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//5063 VMOVNTDQ VMOVNTDQ_MEMu32_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT

DEF_ISEL(VMOVNTDQA_XMMdq_MEMdq) = MOVDQx<VV128W, MV128>;
DEF_ISEL(VMOVNTDQA_YMMqq_MEMqq) = MOVDQx<VV256W, MV256>;

//4142 VMOVNTDQA VMOVNTDQA_ZMMu32_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//4143 VMOVNTDQA VMOVNTDQA_XMMu32_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT
//4144 VMOVNTDQA VMOVNTDQA_YMMu32_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM NOTSX REQUIRES_ALIGNMENT

DEF_ISEL(VMOVDQU_XMMdq_MEMdq) = MOVDQx<VV128W, MV128>;
DEF_ISEL(VMOVDQU_XMMdq_XMMdq_6F) = MOVDQx<VV128W, VV128>;
DEF_ISEL(VMOVDQU_MEMdq_XMMdq) = MOVDQx<MV128W, VV128>;
DEF_ISEL(VMOVDQU_XMMdq_XMMdq_7F) = MOVDQx<VV128W, VV128>;
DEF_ISEL(VMOVDQU_YMMqq_MEMqq) = MOVDQx<VV256W, MV256>;
DEF_ISEL(VMOVDQU_YMMqq_YMMqq_6F) = MOVDQx<VV256W, VV256>;
DEF_ISEL(VMOVDQU_MEMqq_YMMqq) = MOVDQx<MV256W, VV256>;
DEF_ISEL(VMOVDQU_YMMqq_YMMqq_7F) = MOVDQx<VV256W, VV256>;
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVDQA_MEMdq_XMMdq) = MOVDQx<MV128W, V128>;
DEF_ISEL(MOVDQA_XMMdq_XMMdq_0F7F) = MOVDQx<V128W, V128>;
DEF_ISEL(MOVDQA_XMMdq_MEMdq) = MOVDQx<V128W, MV128>;
DEF_ISEL(MOVDQA_XMMdq_XMMdq_0F6F) = MOVDQx<V128W, V128>;

#if HAS_FEATURE_AVX
DEF_ISEL(VMOVDQA_XMMdq_MEMdq) = MOVDQx<VV128W, MV128>;
DEF_ISEL(VMOVDQA_XMMdq_XMMdq_6F) = MOVDQx<VV128W, VV128>;
DEF_ISEL(VMOVDQA_MEMdq_XMMdq) = MOVDQx<MV128W, VV128>;
DEF_ISEL(VMOVDQA_XMMdq_XMMdq_7F) = MOVDQx<VV128W, VV128>;
DEF_ISEL(VMOVDQA_YMMqq_MEMqq) = MOVDQx<VV256W, MV256>;
DEF_ISEL(VMOVDQA_YMMqq_YMMqq_6F) = MOVDQx<VV256W, VV256>;
DEF_ISEL(VMOVDQA_MEMqq_YMMqq) = MOVDQx<MV256W, VV256>;
DEF_ISEL(VMOVDQA_YMMqq_YMMqq_7F) = MOVDQx<VV256W, VV256>;
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVLPS_MEMq_XMMps) = MOVLPS<MV64W, V128>;
DEF_ISEL(MOVLPS_XMMq_MEMq) = MOVLPS<V128W, MV64>;
IF_AVX(DEF_ISEL(VMOVLPS_MEMq_XMMq) = MOVLPS<MV64W, VV128>;)
IF_AVX(DEF_ISEL(VMOVLPS_XMMdq_XMMdq_MEMq) = VMOVLPS;)

DEF_ISEL(MOVHLPS_XMMq_XMMq) = MOVHLPS;
IF_AVX(DEF_ISEL(VMOVHLPS_XMMdq_XMMq_XMMq) = VMOVHLPS;)
IF_AVX(DEF_ISEL(VMOVHLPS_XMMdq_XMMdq_XMMdq) = VMOVHLPS;)

DEF_ISEL(MOVLHPS_XMMq_XMMq) = MOVLHPS;
IF_AVX(DEF_ISEL(VMOVLHPS_XMMdq_XMMq_XMMq) = VMOVLHPS;)
IF_AVX(DEF_ISEL(VMOVLHPS_XMMdq_XMMdq_XMMdq) = VMOVLHPS;)

#if HAS_FEATURE_AVX
#  if HAS_FEATURE_AVX512

//4606 VMOVLPS  DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_TUPLE2
//4607 VMOVLPS VMOVLPS_MEMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_TUPLE2
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVLPD_XMMsd_MEMq) = MOVLPD<V128W, MV64>;
DEF_ISEL(MOVLPD_MEMq_XMMsd) = MOVLPD<MV64W, V128>;
IF_AVX(DEF_ISEL(VMOVLPD_MEMq_XMMq) = MOVLPD<MV64W, VV128>;)
IF_AVX(DEF_ISEL(VMOVLPD_XMMdq_XMMdq_MEMq) = VMOVLPD;)

#if HAS_FEATURE_AVX
#  if HAS_FEATURE_AVX512

//4599 VMOVLPD VMOVLPD_XMMf64_XMMf64_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_SCALAR
//4600 VMOVLPD VMOVLPD_MEMf64_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_SCALAR
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

namespace {

template <typename D, typename S>
DEF_SEM(MOVSD_MEM, D dst, S src) {
  FWriteV64(dst, FExtractV64(FReadV64(src), 0));
  return memory;
}

DEF_SEM(MOVSD, V128W dst, V128 src) {
  FWriteV64(dst, FInsertV64(FReadV64(dst), 0, FExtractV64(FReadV64(src), 0)));
  return memory;
}
#if HAS_FEATURE_AVX

// Basically the same as `VMOVLPD`.
DEF_SEM(VMOVSD, VV128W dst, V128 src1, V128 src2) {
  FWriteV64(dst, FInsertV64(FReadV64(src2), 1, FExtractV64(FReadV64(src1), 1)));
  return memory;
}
#endif  // HAS_FEATURE_AVX
}  // namespace

DEF_ISEL(MOVSD_XMM_XMMsd_XMMsd_0F10) = MOVSD;
DEF_ISEL(MOVSD_XMM_XMMdq_MEMsd) = MOVSD_MEM<V128W, MV64>;
DEF_ISEL(MOVSD_XMM_MEMsd_XMMsd) = MOVSD_MEM<MV64W, V128>;
DEF_ISEL(MOVSD_XMM_XMMsd_XMMsd_0F11) = MOVSD;
#if HAS_FEATURE_AVX
DEF_ISEL(VMOVSD_XMMdq_MEMq) = MOVSD_MEM<VV128W, MV64>;
DEF_ISEL(VMOVSD_MEMq_XMMq) = MOVSD_MEM<MV64W, VV128>;
DEF_ISEL(VMOVSD_XMMdq_XMMdq_XMMq_10) = VMOVSD;
DEF_ISEL(VMOVSD_XMMdq_XMMdq_XMMq_11) = VMOVSD;
#  if HAS_FEATURE_AVX512

//3632 VMOVSD VMOVSD_XMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: DISP8_SCALAR MASKOP_EVEX MEMORY_FAULT_SUPPRESSION SIMD_SCALAR
//3633 VMOVSD VMOVSD_MEMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: DISP8_SCALAR MASKOP_EVEX MEMORY_FAULT_SUPPRESSION SIMD_SCALAR
//3634 VMOVSD VMOVSD_XMMf64_MASKmskw_XMMf64_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: MASKOP_EVEX SIMD_SCALAR
//3635 VMOVSD VMOVSD_XMMf64_MASKmskw_XMMf64_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: MASKOP_EVEX SIMD_SCALAR
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVNTSD_MEMq_XMMq) = MOVSD_MEM<MV64W, V128>;

namespace {

template <typename D, typename S>
DEF_SEM(MOVSS_MEM, D dst, S src) {
  FWriteV32(dst, FExtractV32(FReadV32(src), 0));
  return memory;
}

DEF_SEM(MOVSS, V128W dst, V128 src) {
  FWriteV32(dst, FInsertV32(FReadV32(dst), 0, FExtractV32(FReadV32(src), 0)));
  return memory;
}

#if HAS_FEATURE_AVX
DEF_SEM(VMOVSS, VV128W dst, V128 src1, V128 src2) {
  FWriteV32(dst, FInsertV32(FReadV32(src1), 0, FExtractV32(FReadV32(src2), 0)));
  return memory;
}
#endif  // HAS_FEATURE_AVX
}  // namespace

DEF_ISEL(MOVSS_XMMdq_MEMss) = MOVSS_MEM<V128W, MV32>;
DEF_ISEL(MOVSS_MEMss_XMMss) = MOVSS_MEM<MV32W, V128>;
DEF_ISEL(MOVSS_XMMss_XMMss_0F10) = MOVSS;
DEF_ISEL(MOVSS_XMMss_XMMss_0F11) = MOVSS;
#if HAS_FEATURE_AVX
DEF_ISEL(VMOVSS_XMMdq_MEMd) = MOVSS_MEM<VV128W, MV32>;
DEF_ISEL(VMOVSS_MEMd_XMMd) = MOVSS_MEM<MV32W, V128>;
DEF_ISEL(VMOVSS_XMMdq_XMMdq_XMMd_10) = VMOVSS;
DEF_ISEL(VMOVSS_XMMdq_XMMdq_XMMd_11) = VMOVSS;
#  if HAS_FEATURE_AVX512

//3650 VMOVSS VMOVSS_XMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: DISP8_SCALAR MASKOP_EVEX MEMORY_FAULT_SUPPRESSION SIMD_SCALAR
//3651 VMOVSS VMOVSS_MEMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: DISP8_SCALAR MASKOP_EVEX MEMORY_FAULT_SUPPRESSION SIMD_SCALAR
//3652 VMOVSS VMOVSS_XMMf32_MASKmskw_XMMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: MASKOP_EVEX SIMD_SCALAR
//3653 VMOVSS VMOVSS_XMMf32_MASKmskw_XMMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_SCALAR ATTRIBUTES: MASKOP_EVEX SIMD_SCALAR
#  endif  // HAS_FEATURE_AVX512
#endif  // HAS_FEATURE_AVX

DEF_ISEL(MOVNTSS_MEMd_XMMd) = MOVSS_MEM<MV32W, V128>;

namespace {

DEF_SEM(MOVHPD, V128W dst, MV64 src) {
  FWriteV64(dst, FInsertV64(FReadV64(dst), 1, FExtractV64(FReadV64(src), 0)));
  return memory;
}

DEF_SEM(MOVHPD_STORE, MV64W dst, V128 src) {
  FWriteV64(dst, FExtractV64(FReadV64(src), 1));
  return memory;
}

#if HAS_FEATURE_AVX

DEF_SEM(VMOVHPD, VV256W dst, V128 src1, MV64 src2) {
  FWriteV64(dst, FInsertV64(FReadV64(src1), 1, FExtractV64(FReadV64(src2), 0)));
  return memory;
}

#endif  // HAS_FEATURE_AVX

}  // namespace

DEF_ISEL(MOVHPD_XMMsd_MEMq) = MOVHPD;
DEF_ISEL(MOVHPD_MEMq_XMMsd) = MOVHPD_STORE;
IF_AVX(DEF_ISEL(VMOVHPD_XMMdq_XMMq_MEMq) = VMOVHPD;)
IF_AVX(DEF_ISEL(VMOVHPD_MEMq_XMMdq) = MOVHPD_STORE;)

//5181 VMOVHPD VMOVHPD_XMMf64_XMMf64_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_SCALAR
//5182 VMOVHPD VMOVHPD_MEMf64_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_SCALAR

namespace {

DEF_SEM(MOVHPS, V128W dst, MV64 src) {
  auto dst_vec = FReadV32(dst);
  auto src_vec = FReadV32(src);
  auto low_entry = FExtractV32(src_vec, 0);
  auto high_entry = FExtractV32(src_vec, 1);
  FWriteV32(dst, FInsertV32(FInsertV32(dst_vec, 2, low_entry), 3, high_entry));
  return memory;
}

DEF_SEM(MOVHPS_STORE, MV64W dst, V128 src) {
  auto dst_vec = FClearV32(FReadV32(dst));
  auto src_vec = FReadV32(src);
  auto low_entry = FExtractV32(src_vec, 2);
  auto high_entry = FExtractV32(src_vec, 3);
  FWriteV32(dst, FInsertV32(FInsertV32(dst_vec, 0, low_entry), 1, high_entry));
  return memory;
}

#if HAS_FEATURE_AVX

DEF_SEM(VMOVHPS, VV256W dst, V128 src1, MV64 src2) {
  auto dst_vec = FReadV32(src1);
  auto src_vec = FReadV32(src2);
  auto low_entry = FExtractV32(src_vec, 0);
  auto high_entry = FExtractV32(src_vec, 1);
  FWriteV32(dst, FInsertV32(FInsertV32(dst_vec, 2, low_entry), 3, high_entry));
  return memory;
}

#endif  // HAS_FEATURE_AVX

}  // namespace

DEF_ISEL(MOVHPS_XMMq_MEMq) = MOVHPS;
DEF_ISEL(MOVHPS_MEMq_XMMps) = MOVHPS_STORE;
IF_AVX(DEF_ISEL(VMOVHPS_XMMdq_XMMq_MEMq) = VMOVHPS;)
IF_AVX(DEF_ISEL(VMOVHPS_MEMq_XMMdq) = MOVHPS_STORE;)

//5197 VMOVHPS VMOVHPS_XMMf32_XMMf32_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_TUPLE2
//5198 VMOVHPS VMOVHPS_MEMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES: DISP8_TUPLE2

namespace {

template <typename T>
DEF_SEM(MOV_ES, R16W dst, T src) {
  Write(dst, Read(src));
  return __remill_sync_hyper_call(state, memory,
                                  SyncHyperCall::kX86SetSegmentES);
}

template <typename T>
DEF_SEM(MOV_SS, R16W dst, T src) {
  Write(dst, Read(src));
  return __remill_sync_hyper_call(state, memory,
                                  SyncHyperCall::kX86SetSegmentSS);
}

template <typename T>
DEF_SEM(MOV_DS, R16W dst, T src) {
  Write(dst, Read(src));
  return __remill_sync_hyper_call(state, memory,
                                  SyncHyperCall::kX86SetSegmentDS);
}

template <typename T>
DEF_SEM(MOV_FS, R16W dst, T src) {
  Write(dst, Read(src));
  return __remill_sync_hyper_call(state, memory,
                                  SyncHyperCall::kX86SetSegmentFS);
}

template <typename T>
DEF_SEM(MOV_GS, R16W dst, T src) {
  Write(dst, Read(src));
  return __remill_sync_hyper_call(state, memory,
                                  SyncHyperCall::kX86SetSegmentGS);
}

}  // namespace

DEF_ISEL(MOV_MEMw_SEG) = MOV<M16W, R16>;

DEF_ISEL(MOV_GPRv_SEG_16) = MOV<R16W, R16>;
DEF_ISEL(MOV_GPRv_SEG_32) = MOV<R32W, R16>;
IF_64BIT(DEF_ISEL(MOV_GPRv_SEG_64) = MOV<R64W, R16>;)

DEF_ISEL(MOV_SEG_MEMw_ES) = MOV_ES<M16>;
DEF_ISEL(MOV_SEG_MEMw_SS) = MOV_SS<M16>;
DEF_ISEL(MOV_SEG_MEMw_DS) = MOV_DS<M16>;
DEF_ISEL(MOV_SEG_MEMw_FS) = MOV_FS<M16>;
DEF_ISEL(MOV_SEG_MEMw_GS) = MOV_GS<M16>;

DEF_ISEL(MOV_SEG_GPR16_ES) = MOV_ES<R16>;
DEF_ISEL(MOV_SEG_GPR16_SS) = MOV_SS<R16>;
DEF_ISEL(MOV_SEG_GPR16_DS) = MOV_DS<R16>;
DEF_ISEL(MOV_SEG_GPR16_FS) = MOV_FS<R16>;
DEF_ISEL(MOV_SEG_GPR16_GS) = MOV_GS<R16>;

/*

25 MOV_DR MOV_DR_DR_GPR32 DATAXFER BASE I86 ATTRIBUTES: NOTSX RING0
26 MOV_DR MOV_DR_DR_GPR64 DATAXFER BASE I86 ATTRIBUTES: NOTSX RING0
27 MOV_DR MOV_DR_GPR32_DR DATAXFER BASE I86 ATTRIBUTES: RING0
28 MOV_DR MOV_DR_GPR64_DR DATAXFER BASE I86 ATTRIBUTES: RING0

1312 MASKMOVDQU MASKMOVDQU_XMMdq_XMMdq DATAXFER SSE2 SSE2 ATTRIBUTES: FIXED_BASE0 MASKOP NOTSX
545 MOVMSKPS MOVMSKPS_GPR32_XMMps DATAXFER SSE SSE ATTRIBUTES:
585 MOVSHDUP MOVSHDUP_XMMps_MEMps DATAXFER SSE3 SSE3 ATTRIBUTES: REQUIRES_ALIGNMENT
586 MOVSHDUP MOVSHDUP_XMMps_XMMps DATAXFER SSE3 SSE3 ATTRIBUTES: REQUIRES_ALIGNMENT
647 MOVLHPS MOVLHPS_XMMq_XMMq DATAXFER SSE SSE ATTRIBUTES:
648 MOVQ2DQ MOVQ2DQ_XMMdq_MMXq DATAXFER SSE2 SSE2 ATTRIBUTES: MMX_EXCEPT NOTSX

689 MOV_CR MOV_CR_CR_GPR32 DATAXFER BASE I86 ATTRIBUTES: NOTSX RING0
690 MOV_CR MOV_CR_CR_GPR64 DATAXFER BASE I86 ATTRIBUTES: NOTSX RING0
691 MOV_CR MOV_CR_GPR32_CR DATAXFER BASE I86 ATTRIBUTES: RING0
692 MOV_CR MOV_CR_GPR64_CR DATAXFER BASE I86 ATTRIBUTES: RING0

957 MOVSLDUP MOVSLDUP_XMMps_MEMps DATAXFER SSE3 SSE3 ATTRIBUTES: REQUIRES_ALIGNMENT
958 MOVSLDUP MOVSLDUP_XMMps_XMMps DATAXFER SSE3 SSE3 ATTRIBUTES: REQUIRES_ALIGNMENT
1071 MOVBE MOVBE_GPRv_MEMv DATAXFER MOVBE MOVBE ATTRIBUTES: SCALABLE
1072 MOVBE MOVBE_MEMv_GPRv DATAXFER MOVBE MOVBE ATTRIBUTES: SCALABLE

1484 MOVDQ2Q MOVDQ2Q_MMXq_XMMq DATAXFER SSE2 SSE2 ATTRIBUTES: MMX_EXCEPT NOTSX
1495 MOVMSKPD MOVMSKPD_GPR32_XMMpd DATAXFER SSE2 SSE2 ATTRIBUTES:

1829 MASKMOVQ MASKMOVQ_MMXq_MMXq DATAXFER MMX PENTIUMMMX ATTRIBUTES: FIXED_BASE0 MASKOP NOTSX
1839 MOVHLPS MOVHLPS_XMMq_XMMq DATAXFER SSE SSE ATTRIBUTES:
1880 MOVDDUP MOVDDUP_XMMdq_MEMq DATAXFER SSE3 SSE3 ATTRIBUTES: UNALIGNED
1881 MOVDDUP MOVDDUP_XMMdq_XMMq DATAXFER SSE3 SSE3 ATTRIBUTES: UNALIGNED
1882 BSWAP BSWAP_GPRv DATAXFER BASE I486REAL ATTRIBUTES: SCALABLE
2101 VMOVMSKPD VMOVMSKPD_GPR32d_XMMdq DATAXFER AVX AVX ATTRIBUTES:
2102 VMOVMSKPD VMOVMSKPD_GPR32d_YMMqq DATAXFER AVX AVX ATTRIBUTES:
2107 VMOVMSKPS VMOVMSKPS_GPR32d_XMMdq DATAXFER AVX AVX ATTRIBUTES:
2108 VMOVMSKPS VMOVMSKPS_GPR32d_YMMqq DATAXFER AVX AVX ATTRIBUTES:

2202 VMOVSHDUP VMOVSHDUP_XMMdq_MEMdq DATAXFER AVX AVX ATTRIBUTES:
2203 VMOVSHDUP VMOVSHDUP_XMMdq_XMMdq DATAXFER AVX AVX ATTRIBUTES:
2204 VMOVSHDUP VMOVSHDUP_YMMqq_MEMqq DATAXFER AVX AVX ATTRIBUTES:
2205 VMOVSHDUP VMOVSHDUP_YMMqq_YMMqq DATAXFER AVX AVX ATTRIBUTES:
2281 VMOVDDUP VMOVDDUP_XMMdq_MEMq DATAXFER AVX AVX ATTRIBUTES:
2282 VMOVDDUP VMOVDDUP_XMMdq_XMMdq DATAXFER AVX AVX ATTRIBUTES:
2283 VMOVDDUP VMOVDDUP_YMMqq_MEMqq DATAXFER AVX AVX ATTRIBUTES:
2284 VMOVDDUP VMOVDDUP_YMMqq_YMMqq DATAXFER AVX AVX ATTRIBUTES:

2464 VMOVSLDUP VMOVSLDUP_XMMdq_MEMdq DATAXFER AVX AVX ATTRIBUTES:
2465 VMOVSLDUP VMOVSLDUP_XMMdq_XMMdq DATAXFER AVX AVX ATTRIBUTES:
2466 VMOVSLDUP VMOVSLDUP_YMMqq_MEMqq DATAXFER AVX AVX ATTRIBUTES:
2467 VMOVSLDUP VMOVSLDUP_YMMqq_YMMqq DATAXFER AVX AVX ATTRIBUTES:

2619 VMOVLHPS VMOVLHPS_XMMdq_XMMq_XMMq DATAXFER AVX AVX ATTRIBUTES:


3395 VMOVHLPS VMOVHLPS_XMMdq_XMMdq_XMMdq DATAXFER AVX AVX ATTRIBUTES:

3804 VPMOVDB VPMOVDB_XMMu8_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3805 VPMOVDB VPMOVDB_MEMu8_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3806 VPMOVDB VPMOVDB_XMMu8_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3807 VPMOVDB VPMOVDB_MEMu8_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3808 VPMOVDB VPMOVDB_XMMu8_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3809 VPMOVDB VPMOVDB_MEMu8_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3814 VPMOVSDB VPMOVSDB_XMMi8_MASKmskw_ZMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3815 VPMOVSDB VPMOVSDB_MEMi8_MASKmskw_ZMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3816 VPMOVSDB VPMOVSDB_XMMi8_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3817 VPMOVSDB VPMOVSDB_MEMi8_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3818 VPMOVSDB VPMOVSDB_XMMi8_MASKmskw_YMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3819 VPMOVSDB VPMOVSDB_MEMi8_MASKmskw_YMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3826 VPMOVDW VPMOVDW_YMMu16_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3827 VPMOVDW VPMOVDW_MEMu16_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3828 VPMOVDW VPMOVDW_XMMu16_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3829 VPMOVDW VPMOVDW_MEMu16_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3830 VPMOVDW VPMOVDW_XMMu16_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3831 VPMOVDW VPMOVDW_MEMu16_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3853 VMOVSHDUP VMOVSHDUP_ZMMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3854 VMOVSHDUP VMOVSHDUP_ZMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX
3855 VMOVSHDUP VMOVSHDUP_XMMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3856 VMOVSHDUP VMOVSHDUP_XMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX
3857 VMOVSHDUP VMOVSHDUP_YMMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3858 VMOVSHDUP VMOVSHDUP_YMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX
3861 VPMOVSDW VPMOVSDW_YMMi16_MASKmskw_ZMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3862 VPMOVSDW VPMOVSDW_MEMi16_MASKmskw_ZMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3863 VPMOVSDW VPMOVSDW_XMMi16_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3864 VPMOVSDW VPMOVSDW_MEMi16_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3865 VPMOVSDW VPMOVSDW_XMMi16_MASKmskw_YMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3866 VPMOVSDW VPMOVSDW_MEMi16_MASKmskw_YMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3897 VPMOVZXWQ VPMOVZXWQ_ZMMi64_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3898 VPMOVZXWQ VPMOVZXWQ_ZMMi64_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3899 VPMOVZXWQ VPMOVZXWQ_XMMi64_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3900 VPMOVZXWQ VPMOVZXWQ_XMMi64_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3901 VPMOVZXWQ VPMOVZXWQ_YMMi64_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3902 VPMOVZXWQ VPMOVZXWQ_YMMi64_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3937 VPMOVUSQW VPMOVUSQW_XMMu16_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3938 VPMOVUSQW VPMOVUSQW_MEMu16_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3939 VPMOVUSQW VPMOVUSQW_XMMu16_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3940 VPMOVUSQW VPMOVUSQW_MEMu16_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3941 VPMOVUSQW VPMOVUSQW_XMMu16_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3942 VPMOVUSQW VPMOVUSQW_MEMu16_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3962 VPMOVUSQB VPMOVUSQB_XMMu8_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3963 VPMOVUSQB VPMOVUSQB_MEMu8_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3964 VPMOVUSQB VPMOVUSQB_XMMu8_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3965 VPMOVUSQB VPMOVUSQB_MEMu8_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3966 VPMOVUSQB VPMOVUSQB_XMMu8_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3967 VPMOVUSQB VPMOVUSQB_MEMu8_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3968 VPMOVUSQD VPMOVUSQD_YMMu32_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3969 VPMOVUSQD VPMOVUSQD_MEMu32_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3970 VPMOVUSQD VPMOVUSQD_XMMu32_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3971 VPMOVUSQD VPMOVUSQD_MEMu32_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3972 VPMOVUSQD VPMOVUSQD_XMMu32_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3973 VPMOVUSQD VPMOVUSQD_MEMu32_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3980 VPMOVSXDQ VPMOVSXDQ_ZMMi64_MASKmskw_YMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
3981 VPMOVSXDQ VPMOVSXDQ_ZMMi64_MASKmskw_MEMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3982 VPMOVSXDQ VPMOVSXDQ_XMMi64_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
3983 VPMOVSXDQ VPMOVSXDQ_XMMi64_MASKmskw_MEMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
3984 VPMOVSXDQ VPMOVSXDQ_YMMi64_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
3985 VPMOVSXDQ VPMOVSXDQ_YMMi64_MASKmskw_MEMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4027 VMOVDDUP VMOVDDUP_ZMMf64_MASKmskw_ZMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4028 VMOVDDUP VMOVDDUP_ZMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_MOVDDUP MASKOP_EVEX
4029 VMOVDDUP VMOVDDUP_XMMf64_MASKmskw_XMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4030 VMOVDDUP VMOVDDUP_XMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_MOVDDUP MASKOP_EVEX
4031 VMOVDDUP VMOVDDUP_YMMf64_MASKmskw_YMMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4032 VMOVDDUP VMOVDDUP_YMMf64_MASKmskw_MEMf64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_MOVDDUP MASKOP_EVEX
4045 VMOVDQU32 VMOVDQU32_ZMMu32_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4046 VMOVDQU32 VMOVDQU32_ZMMu32_MASKmskw_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4047 VMOVDQU32 VMOVDQU32_ZMMu32_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4048 VMOVDQU32 VMOVDQU32_MEMu32_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4049 VMOVDQU32 VMOVDQU32_XMMu32_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4050 VMOVDQU32 VMOVDQU32_XMMu32_MASKmskw_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4051 VMOVDQU32 VMOVDQU32_XMMu32_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4052 VMOVDQU32 VMOVDQU32_MEMu32_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4053 VMOVDQU32 VMOVDQU32_YMMu32_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4054 VMOVDQU32 VMOVDQU32_YMMu32_MASKmskw_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4055 VMOVDQU32 VMOVDQU32_YMMu32_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4056 VMOVDQU32 VMOVDQU32_MEMu32_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION

4242 VPMOVD2M VPMOVD2M_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512DQ_128 ATTRIBUTES:
4243 VPMOVD2M VPMOVD2M_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512DQ_256 ATTRIBUTES:
4244 VPMOVD2M VPMOVD2M_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512DQ_512 ATTRIBUTES:
4260 VPMOVSXBQ VPMOVSXBQ_ZMMi64_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4261 VPMOVSXBQ VPMOVSXBQ_ZMMi64_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4262 VPMOVSXBQ VPMOVSXBQ_XMMi64_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4263 VPMOVSXBQ VPMOVSXBQ_XMMi64_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4264 VPMOVSXBQ VPMOVSXBQ_YMMi64_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4265 VPMOVSXBQ VPMOVSXBQ_YMMi64_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4284 VPMOVZXBD VPMOVZXBD_ZMMi32_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4285 VPMOVZXBD VPMOVZXBD_ZMMi32_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4286 VPMOVZXBD VPMOVZXBD_XMMi32_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4287 VPMOVZXBD VPMOVZXBD_XMMi32_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4288 VPMOVZXBD VPMOVZXBD_YMMi32_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4289 VPMOVZXBD VPMOVZXBD_YMMi32_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4314 VPMOVB2M VPMOVB2M_MASKmskw_XMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES:
4315 VPMOVB2M VPMOVB2M_MASKmskw_YMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES:
4316 VPMOVB2M VPMOVB2M_MASKmskw_ZMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES:
4356 VMOVSLDUP VMOVSLDUP_ZMMf32_MASKmskw_ZMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4357 VMOVSLDUP VMOVSLDUP_ZMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX
4358 VMOVSLDUP VMOVSLDUP_XMMf32_MASKmskw_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4359 VMOVSLDUP VMOVSLDUP_XMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX
4360 VMOVSLDUP VMOVSLDUP_YMMf32_MASKmskw_YMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4361 VMOVSLDUP VMOVSLDUP_YMMf32_MASKmskw_MEMf32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX
4375 VPMOVSXBW VPMOVSXBW_XMMi16_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
4376 VPMOVSXBW VPMOVSXBW_XMMi16_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4377 VPMOVSXBW VPMOVSXBW_YMMi16_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
4378 VPMOVSXBW VPMOVSXBW_YMMi16_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4379 VPMOVSXBW VPMOVSXBW_ZMMi16_MASKmskw_YMMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
4380 VPMOVSXBW VPMOVSXBW_ZMMi16_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4422 VPMOVZXBQ VPMOVZXBQ_ZMMi64_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4423 VPMOVZXBQ VPMOVZXBQ_ZMMi64_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4424 VPMOVZXBQ VPMOVZXBQ_XMMi64_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4425 VPMOVZXBQ VPMOVZXBQ_XMMi64_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4426 VPMOVZXBQ VPMOVZXBQ_YMMi64_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4427 VPMOVZXBQ VPMOVZXBQ_YMMi64_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4494 VPMOVW2M VPMOVW2M_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES:
4495 VPMOVW2M VPMOVW2M_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES:
4496 VPMOVW2M VPMOVW2M_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES:
4539 VPMOVM2W VPMOVM2W_XMMu16_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES:
4540 VPMOVM2W VPMOVM2W_YMMu16_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES:
4541 VPMOVM2W VPMOVM2W_ZMMu16_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES:
4560 VPMOVM2B VPMOVM2B_XMMu8_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES:
4561 VPMOVM2B VPMOVM2B_YMMu8_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES:
4562 VPMOVM2B VPMOVM2B_ZMMu8_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES:
4577 VPMOVM2D VPMOVM2D_XMMu32_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512DQ_128 ATTRIBUTES:
4578 VPMOVM2D VPMOVM2D_YMMu32_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512DQ_256 ATTRIBUTES:
4579 VPMOVM2D VPMOVM2D_ZMMu32_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512DQ_512 ATTRIBUTES:
4605 VMOVLHPS VMOVLHPS_XMMf32_XMMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES:

4671 VPMOVZXBW VPMOVZXBW_XMMi16_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
4672 VPMOVZXBW VPMOVZXBW_XMMi16_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4673 VPMOVZXBW VPMOVZXBW_YMMi16_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
4674 VPMOVZXBW VPMOVZXBW_YMMi16_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4675 VPMOVZXBW VPMOVZXBW_ZMMi16_MASKmskw_YMMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
4676 VPMOVZXBW VPMOVZXBW_ZMMi16_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4696 VPMOVSQW VPMOVSQW_XMMi16_MASKmskw_ZMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4697 VPMOVSQW VPMOVSQW_MEMi16_MASKmskw_ZMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4698 VPMOVSQW VPMOVSQW_XMMi16_MASKmskw_XMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4699 VPMOVSQW VPMOVSQW_MEMi16_MASKmskw_XMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4700 VPMOVSQW VPMOVSQW_XMMi16_MASKmskw_YMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4701 VPMOVSQW VPMOVSQW_MEMi16_MASKmskw_YMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4717 VPMOVSQD VPMOVSQD_YMMi32_MASKmskw_ZMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4718 VPMOVSQD VPMOVSQD_MEMi32_MASKmskw_ZMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4719 VPMOVSQD VPMOVSQD_XMMi32_MASKmskw_XMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4720 VPMOVSQD VPMOVSQD_MEMi32_MASKmskw_XMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4721 VPMOVSQD VPMOVSQD_XMMi32_MASKmskw_YMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4722 VPMOVSQD VPMOVSQD_MEMi32_MASKmskw_YMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4723 VPMOVSQB VPMOVSQB_XMMi8_MASKmskw_ZMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4724 VPMOVSQB VPMOVSQB_MEMi8_MASKmskw_ZMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4725 VPMOVSQB VPMOVSQB_XMMi8_MASKmskw_XMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4726 VPMOVSQB VPMOVSQB_MEMi8_MASKmskw_XMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4727 VPMOVSQB VPMOVSQB_XMMi8_MASKmskw_YMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4728 VPMOVSQB VPMOVSQB_MEMi8_MASKmskw_YMMi64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4735 VPMOVWB VPMOVWB_XMMu8_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
4736 VPMOVWB VPMOVWB_MEMu8_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4737 VPMOVWB VPMOVWB_XMMu8_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
4738 VPMOVWB VPMOVWB_MEMu8_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4739 VPMOVWB VPMOVWB_YMMu8_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
4740 VPMOVWB VPMOVWB_MEMu8_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4862 VMOVDQU8 VMOVDQU8_XMMu8_MASKmskw_XMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
4863 VMOVDQU8 VMOVDQU8_XMMu8_MASKmskw_MEMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4864 VMOVDQU8 VMOVDQU8_XMMu8_MASKmskw_XMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
4865 VMOVDQU8 VMOVDQU8_MEMu8_MASKmskw_XMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4866 VMOVDQU8 VMOVDQU8_YMMu8_MASKmskw_YMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
4867 VMOVDQU8 VMOVDQU8_YMMu8_MASKmskw_MEMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4868 VMOVDQU8 VMOVDQU8_YMMu8_MASKmskw_YMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
4869 VMOVDQU8 VMOVDQU8_MEMu8_MASKmskw_YMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4870 VMOVDQU8 VMOVDQU8_ZMMu8_MASKmskw_ZMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
4871 VMOVDQU8 VMOVDQU8_ZMMu8_MASKmskw_MEMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4872 VMOVDQU8 VMOVDQU8_ZMMu8_MASKmskw_ZMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
4873 VMOVDQU8 VMOVDQU8_MEMu8_MASKmskw_ZMMu8_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4878 VPMOVUSDB VPMOVUSDB_XMMu8_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4879 VPMOVUSDB VPMOVUSDB_MEMu8_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4880 VPMOVUSDB VPMOVUSDB_XMMu8_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4881 VPMOVUSDB VPMOVUSDB_MEMu8_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4882 VPMOVUSDB VPMOVUSDB_XMMu8_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4883 VPMOVUSDB VPMOVUSDB_MEMu8_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4908 VPMOVUSDW VPMOVUSDW_YMMu16_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
4909 VPMOVUSDW VPMOVUSDW_MEMu16_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4910 VPMOVUSDW VPMOVUSDW_XMMu16_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
4911 VPMOVUSDW VPMOVUSDW_MEMu16_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
4912 VPMOVUSDW VPMOVUSDW_XMMu16_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
4913 VPMOVUSDW VPMOVUSDW_MEMu16_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION

5292 VPMOVQ2M VPMOVQ2M_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512DQ_128 ATTRIBUTES:
5293 VPMOVQ2M VPMOVQ2M_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512DQ_256 ATTRIBUTES:
5294 VPMOVQ2M VPMOVQ2M_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512DQ_512 ATTRIBUTES:
5515 VMOVDQU16 VMOVDQU16_XMMu16_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
5516 VMOVDQU16 VMOVDQU16_XMMu16_MASKmskw_MEMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5517 VMOVDQU16 VMOVDQU16_XMMu16_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
5518 VMOVDQU16 VMOVDQU16_MEMu16_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5519 VMOVDQU16 VMOVDQU16_YMMu16_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
5520 VMOVDQU16 VMOVDQU16_YMMu16_MASKmskw_MEMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5521 VMOVDQU16 VMOVDQU16_YMMu16_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
5522 VMOVDQU16 VMOVDQU16_MEMu16_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5523 VMOVDQU16 VMOVDQU16_ZMMu16_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
5524 VMOVDQU16 VMOVDQU16_ZMMu16_MASKmskw_MEMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5525 VMOVDQU16 VMOVDQU16_ZMMu16_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
5526 VMOVDQU16 VMOVDQU16_MEMu16_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5535 VPMOVSXBD VPMOVSXBD_ZMMi32_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5536 VPMOVSXBD VPMOVSXBD_ZMMi32_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5537 VPMOVSXBD VPMOVSXBD_XMMi32_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5538 VPMOVSXBD VPMOVSXBD_XMMi32_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5539 VPMOVSXBD VPMOVSXBD_YMMi32_MASKmskw_XMMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5540 VPMOVSXBD VPMOVSXBD_YMMi32_MASKmskw_MEMi8_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION

5627 VPMOVZXWD VPMOVZXWD_ZMMi32_MASKmskw_YMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5628 VPMOVZXWD VPMOVZXWD_ZMMi32_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5629 VPMOVZXWD VPMOVZXWD_XMMi32_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5630 VPMOVZXWD VPMOVZXWD_XMMi32_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5631 VPMOVZXWD VPMOVZXWD_YMMi32_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5632 VPMOVZXWD VPMOVZXWD_YMMi32_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5636 VMOVDQU64 VMOVDQU64_ZMMu64_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5637 VMOVDQU64 VMOVDQU64_ZMMu64_MASKmskw_MEMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5638 VMOVDQU64 VMOVDQU64_ZMMu64_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5639 VMOVDQU64 VMOVDQU64_MEMu64_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5640 VMOVDQU64 VMOVDQU64_XMMu64_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5641 VMOVDQU64 VMOVDQU64_XMMu64_MASKmskw_MEMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5642 VMOVDQU64 VMOVDQU64_XMMu64_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5643 VMOVDQU64 VMOVDQU64_MEMu64_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5644 VMOVDQU64 VMOVDQU64_YMMu64_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5645 VMOVDQU64 VMOVDQU64_YMMu64_MASKmskw_MEMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5646 VMOVDQU64 VMOVDQU64_YMMu64_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5647 VMOVDQU64 VMOVDQU64_MEMu64_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5665 VMOVDQA64 VMOVDQA64_ZMMu64_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5666 VMOVDQA64 VMOVDQA64_ZMMu64_MASKmskw_MEMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
5667 VMOVDQA64 VMOVDQA64_ZMMu64_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5668 VMOVDQA64 VMOVDQA64_MEMu64_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
5669 VMOVDQA64 VMOVDQA64_XMMu64_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5670 VMOVDQA64 VMOVDQA64_XMMu64_MASKmskw_MEMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
5671 VMOVDQA64 VMOVDQA64_XMMu64_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5672 VMOVDQA64 VMOVDQA64_MEMu64_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
5673 VMOVDQA64 VMOVDQA64_YMMu64_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5674 VMOVDQA64 VMOVDQA64_YMMu64_MASKmskw_MEMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
5675 VMOVDQA64 VMOVDQA64_YMMu64_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5676 VMOVDQA64 VMOVDQA64_MEMu64_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
5902 VPMOVZXDQ VPMOVZXDQ_ZMMi64_MASKmskw_YMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5903 VPMOVZXDQ VPMOVZXDQ_ZMMi64_MASKmskw_MEMi32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5904 VPMOVZXDQ VPMOVZXDQ_XMMi64_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5905 VPMOVZXDQ VPMOVZXDQ_XMMi64_MASKmskw_MEMi32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5906 VPMOVZXDQ VPMOVZXDQ_YMMi64_MASKmskw_XMMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5907 VPMOVZXDQ VPMOVZXDQ_YMMi64_MASKmskw_MEMi32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5931 VPMOVUSWB VPMOVUSWB_XMMu8_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
5932 VPMOVUSWB VPMOVUSWB_MEMu8_MASKmskw_XMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5933 VPMOVUSWB VPMOVUSWB_XMMu8_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
5934 VPMOVUSWB VPMOVUSWB_MEMu8_MASKmskw_YMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5935 VPMOVUSWB VPMOVUSWB_YMMu8_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
5936 VPMOVUSWB VPMOVUSWB_MEMu8_MASKmskw_ZMMu16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5961 VPMOVSWB VPMOVSWB_XMMi8_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: MASKOP_EVEX
5962 VPMOVSWB VPMOVSWB_MEMi8_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512BW_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5963 VPMOVSWB VPMOVSWB_XMMi8_MASKmskw_YMMi16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: MASKOP_EVEX
5964 VPMOVSWB VPMOVSWB_MEMi8_MASKmskw_YMMi16_AVX512 DATAXFER AVX512EVEX AVX512BW_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5965 VPMOVSWB VPMOVSWB_YMMi8_MASKmskw_ZMMi16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: MASKOP_EVEX
5966 VPMOVSWB VPMOVSWB_MEMi8_MASKmskw_ZMMi16_AVX512 DATAXFER AVX512EVEX AVX512BW_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5990 VPMOVSXWD VPMOVSXWD_ZMMi32_MASKmskw_YMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
5991 VPMOVSXWD VPMOVSXWD_ZMMi32_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5992 VPMOVSXWD VPMOVSXWD_XMMi32_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
5993 VPMOVSXWD VPMOVSXWD_XMMi32_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5994 VPMOVSXWD VPMOVSXWD_YMMi32_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
5995 VPMOVSXWD VPMOVSXWD_YMMi32_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
5996 VMOVHLPS VMOVHLPS_XMMf32_XMMf32_XMMf32_AVX512 DATAXFER AVX512EVEX AVX512F_128N ATTRIBUTES:
6007 VPMOVSXWQ VPMOVSXWQ_ZMMi64_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
6008 VPMOVSXWQ VPMOVSXWQ_ZMMi64_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6009 VPMOVSXWQ VPMOVSXWQ_XMMi64_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
6010 VPMOVSXWQ VPMOVSXWQ_XMMi64_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6011 VPMOVSXWQ VPMOVSXWQ_YMMi64_MASKmskw_XMMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
6012 VPMOVSXWQ VPMOVSXWQ_YMMi64_MASKmskw_MEMi16_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION

6171 VMOVDQA32 VMOVDQA32_ZMMu32_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
6172 VMOVDQA32 VMOVDQA32_ZMMu32_MASKmskw_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
6173 VMOVDQA32 VMOVDQA32_ZMMu32_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
6174 VMOVDQA32 VMOVDQA32_MEMu32_MASKmskw_ZMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
6175 VMOVDQA32 VMOVDQA32_XMMu32_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
6176 VMOVDQA32 VMOVDQA32_XMMu32_MASKmskw_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
6177 VMOVDQA32 VMOVDQA32_XMMu32_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
6178 VMOVDQA32 VMOVDQA32_MEMu32_MASKmskw_XMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
6179 VMOVDQA32 VMOVDQA32_YMMu32_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
6180 VMOVDQA32 VMOVDQA32_YMMu32_MASKmskw_MEMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
6181 VMOVDQA32 VMOVDQA32_YMMu32_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
6182 VMOVDQA32 VMOVDQA32_MEMu32_MASKmskw_YMMu32_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: AVX_REQUIRES_ALIGNMENT DISP8_FULLMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION REQUIRES_ALIGNMENT
6309 VPMOVQW VPMOVQW_XMMu16_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
6310 VPMOVQW VPMOVQW_MEMu16_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6311 VPMOVQW VPMOVQW_XMMu16_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
6312 VPMOVQW VPMOVQW_MEMu16_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6313 VPMOVQW VPMOVQW_XMMu16_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
6314 VPMOVQW VPMOVQW_MEMu16_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_QUARTERMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6325 VPMOVQB VPMOVQB_XMMu8_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
6326 VPMOVQB VPMOVQB_MEMu8_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6327 VPMOVQB VPMOVQB_XMMu8_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
6328 VPMOVQB VPMOVQB_MEMu8_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6329 VPMOVQB VPMOVQB_XMMu8_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
6330 VPMOVQB VPMOVQB_MEMu8_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_EIGHTHMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6331 VPMOVQD VPMOVQD_YMMu32_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: MASKOP_EVEX
6332 VPMOVQD VPMOVQD_MEMu32_MASKmskw_ZMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_512 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6333 VPMOVQD VPMOVQD_XMMu32_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: MASKOP_EVEX
6334 VPMOVQD VPMOVQD_MEMu32_MASKmskw_XMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_128 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6335 VPMOVQD VPMOVQD_XMMu32_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: MASKOP_EVEX
6336 VPMOVQD VPMOVQD_MEMu32_MASKmskw_YMMu64_AVX512 DATAXFER AVX512EVEX AVX512F_256 ATTRIBUTES: DISP8_HALFMEM MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
6349 VPMOVM2Q VPMOVM2Q_XMMu64_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512DQ_128 ATTRIBUTES:
6350 VPMOVM2Q VPMOVM2Q_YMMu64_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512DQ_256 ATTRIBUTES:
6351 VPMOVM2Q VPMOVM2Q_ZMMu64_MASKmskw_AVX512 DATAXFER AVX512EVEX AVX512DQ_512 ATTRIBUTES:
*/

namespace {

template <typename D, typename S>
DEF_SEM(MOVZX, D dst, S src) {
  WriteZExt(dst, Read(src));
  return memory;
}

template <typename D, typename S, typename SextT>
DEF_SEM(MOVSX, D dst, S src) {
  WriteZExt(dst, SExtTo<SextT>(Read(src)));
  return memory;
}

}  // namespace

DEF_ISEL(MOVZX_GPRv_MEMb_16) = MOVZX<R16W, M8>;
DEF_ISEL(MOVZX_GPRv_MEMb_32) = MOVZX<R32W, M8>;
IF_64BIT(DEF_ISEL(MOVZX_GPRv_MEMb_64) = MOVZX<R64W, M8>;)
DEF_ISEL(MOVZX_GPRv_GPR8_16) = MOVZX<R16W, R8>;
DEF_ISEL(MOVZX_GPRv_GPR8_32) = MOVZX<R32W, R8>;
IF_64BIT(DEF_ISEL(MOVZX_GPRv_GPR8_64) = MOVZX<R64W, R8>;)
DEF_ISEL(MOVZX_GPRv_MEMw_32) = MOVZX<R32W, M16>;
IF_64BIT(DEF_ISEL(MOVZX_GPRv_MEMw_64) = MOVZX<R64W, M16>;)
DEF_ISEL(MOVZX_GPRv_GPR16_32) = MOVZX<R32W, R16>;
IF_64BIT(DEF_ISEL(MOVZX_GPRv_GPR16_64) = MOVZX<R64W, R16>;)

DEF_ISEL(MOVSX_GPRv_MEMb_16) = MOVSX<R16W, M8, int16_t>;
DEF_ISEL(MOVSX_GPRv_MEMb_32) = MOVSX<R32W, M8, int32_t>;
IF_64BIT(DEF_ISEL(MOVSX_GPRv_MEMb_64) = MOVSX<R64W, M8, int64_t>;)
DEF_ISEL(MOVSX_GPRv_GPR8_16) = MOVSX<R16W, R8, int16_t>;
DEF_ISEL(MOVSX_GPRv_GPR8_32) = MOVSX<R32W, R8, int32_t>;
IF_64BIT(DEF_ISEL(MOVSX_GPRv_GPR8_64) = MOVSX<R64W, R8, int64_t>;)
DEF_ISEL(MOVSX_GPRv_MEMw_32) = MOVSX<R32W, M16, int32_t>;
IF_64BIT(DEF_ISEL(MOVSX_GPRv_MEMw_64) = MOVSX<R64W, M16, int64_t>;)
DEF_ISEL(MOVSX_GPRv_GPR16_32) = MOVSX<R32W, R16, int32_t>;
IF_64BIT(DEF_ISEL(MOVSX_GPRv_GPR16_64) = MOVSX<R64W, R16, int64_t>;)

DEF_ISEL(MOVSXD_GPRv_GPRz_16) = MOVSX<R32W, R16, int32_t>;
DEF_ISEL(MOVSXD_GPRv_GPRz_32) = MOVSX<R32W, R32, int32_t>;

IF_64BIT(DEF_ISEL(MOVSXD_GPRv_MEMd_32) = MOVSX<R64W, M32, int64_t>;)
IF_64BIT(DEF_ISEL(MOVSXD_GPRv_GPR32_32) = MOVSX<R64W, R32, int64_t>;)

IF_64BIT(DEF_ISEL(MOVSXD_GPRv_MEMd_64) = MOVSX<R64W, M32, int64_t>;)
IF_64BIT(DEF_ISEL(MOVSXD_GPRv_MEMz_64) = MOVSX<R64W, M32, int64_t>;)
IF_64BIT(DEF_ISEL(MOVSXD_GPRv_GPR32_64) = MOVSX<R64W, R32, int64_t>;)
IF_64BIT(DEF_ISEL(MOVSXD_GPRv_GPRz_64) = MOVSX<R64W, R32, int64_t>;)

#if HAS_FEATURE_AVX512

namespace {

template <typename D, typename K, typename S>
DEF_SEM(VPMOVSXBQ_MASKmskw_SIMD128, D dst, K k1, S src) {
  auto src_vec = SReadV8(src);
  auto dst_vec = SClearV64(SReadV64(dst));
  auto k_vec = Read(k1);
  for (auto i = 0u; i < 2u; i++) {
    if (READBIT(k_vec, i) == 0) {
      dst_vec = SInsertV64(dst_vec, i, 0);
    } else {
      auto v = SExtTo<int64_t>(SExtractV8(src_vec, i));
      dst_vec = SInsertV64(dst_vec, i, v);
    }
  }
  SWriteV64(dst, dst_vec);
  return memory;
}

template <typename D, typename K, typename S>
DEF_SEM(VPMOVSXWD_MASKmskw_SIMD128, D dst, K k1, S src) {
  auto src_vec = SReadV16(src);
  auto dst_vec = SClearV32(SReadV32(dst));
  auto k_vec = Read(k1);
  for (auto i = 0u; i < 4u; i++) {
    if (READBIT(k_vec, i) == 0) {
      dst_vec = SInsertV32(dst_vec, i, 0);
    } else {
      auto v = SExtTo<int32_t>(SExtractV16(src_vec, i));
      dst_vec = SInsertV32(dst_vec, i, v);
    }
  }
  SWriteV32(dst, dst_vec);
  return memory;
}

template <typename S1, typename S2>
DEF_SEM(KMOVW, S1 dst, S2 src) {
  WriteZExt(dst, UInt16(Read(src)));
  return memory;
}

}  // namespace

DEF_ISEL(VPMOVSXBQ_XMMi64_MASKmskw_MEMi8_AVX512) = VPMOVSXBQ_MASKmskw_SIMD128<VV128W, R8, MV16>;
DEF_ISEL(VPMOVSXBQ_XMMi64_MASKmskw_XMMi8_AVX512) = VPMOVSXBQ_MASKmskw_SIMD128<VV128W, R8, V128>;
DEF_ISEL(VPMOVSXWD_XMMi32_MASKmskw_MEMi16_AVX512) = VPMOVSXWD_MASKmskw_SIMD128<VV128W, R8, MV64>;
DEF_ISEL(VPMOVSXWD_XMMi32_MASKmskw_XMMi16_AVX512) = VPMOVSXWD_MASKmskw_SIMD128<VV128W, R8, V128>;

DEF_ISEL(KMOVW_MASKmskw_MASKu16_AVX512) = KMOVW<R64W, R64>;
DEF_ISEL(KMOVW_GPR32u32_MASKmskw_AVX512) = KMOVW<R32W, R64>;
DEF_ISEL(KMOVW_MASKmskw_GPR32u32_AVX512) = KMOVW<R64W, R32>;
DEF_ISEL(KMOVW_MASKmskw_MEMu16_AVX512) = KMOVW<R64W, M16>;
DEF_ISEL(KMOVW_MEMu16_MASKmskw_AVX512) = KMOVW<M16W, R64>;

#endif  // HAS_FEATURE_AVX512
