text: /*******************************************************************************
   * Copyright 2020 FUJITSU LIMITED
   *
   * 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.
   *******************************************************************************/
  /* 2020/04/17 09:31 */
  #define CG64 CodeGeneratorAArch64
  void translateXCHG(xed_decoded_inst_t *p) {
    namespace xa = Xbyak_aarch64;
    struct xt_a64fx_operands_structV3_t a64;
    xt_construct_a64fx_operandsV3(p, &a64);
    bool isValid = false;
    xt_reg_idx_t dstIdx = XT_REG_INVALID;
    xt_reg_idx_t srcIdx = XT_REG_INVALID;
  
    /* Col=T119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 64 && true)) {
      XT_UNIMPLEMENTED;
    }
    /* Col=Y119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 64 && true)) {
      dstIdx = a64.operands[1].regIdx;
    }
    /* Col=Z119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      srcIdx = a64.operands[0].regIdx;
    }
    /* Col=AE119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 64 && true)) {
      CG64::ldr(X_TMP_0, xa::ptr(X_TMP_ADDR));
    }
    /* Col=AG119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 64 && true)) {
      CG64::cas(X_TMP_0, xa::XReg(dstIdx), xa::ptr(X_TMP_ADDR));
    }
    /* Col=AI119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 64 && true)) {
      CG64::mov(xa::XReg(dstIdx), X_TMP_0);
    }
    /* Col=AP119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      CG64::and_(X_TMP_0, xa::XReg(dstIdx), uint64_t(0xFFFFFFFFFFFF0000));
    }
    /* Col=AR119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      CG64::and_(X_TMP_1, xa::XReg(dstIdx), uint64_t(0xFFFF));
    }
    /* Col=AS119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      CG64::and_(X_TMP_2, xa::XReg(srcIdx), uint64_t(0xFFFFFFFFFFFF0000));
    }
    /* Col=AT119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      CG64::and_(X_TMP_3, xa::XReg(srcIdx), uint64_t(0xFFFF));
    }
    /* Col=AX119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      CG64::add(xa::XReg(dstIdx), X_TMP_0, X_TMP_3);
    }
    /* Col=AY119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true)) {
      CG64::add(xa::XReg(srcIdx), X_TMP_2, X_TMP_1);
    }
    /* Col=BK119*/
    if (false ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 8 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 16 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_MEM0 &&
         a64.operands[1].opName == XED_OPERAND_REG0 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 32 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_REG1 &&
         a64.operands[0].opWidth == 64 && true) ||
        (a64.operands[0].opName == XED_OPERAND_REG0 &&
         a64.operands[1].opName == XED_OPERAND_MEM0 &&
         a64.operands[0].opWidth == 64 && true)) {
      XT_VALID_CHECK;
    }
    XT_VALID_CHECK_IF;
  }
  #undef CG64
  