blob: c323e6e76f41ef04f37ea3810b24d446e8b0822c [file] [log] [blame]
/* Simulator instruction semantics for crisv10f.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright 1996-2021 Free Software Foundation, Inc.
This file is part of the GNU simulators.
This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
It is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef DEFINE_LABELS
/* The labels have the case they have because the enum of insn types
is all uppercase and in the non-stdc case the insn symbol is built
into the enum name. */
static struct {
int index;
void *label;
} labels[] = {
{ CRISV10F_INSN_X_INVALID, && case_sem_INSN_X_INVALID },
{ CRISV10F_INSN_X_AFTER, && case_sem_INSN_X_AFTER },
{ CRISV10F_INSN_X_BEFORE, && case_sem_INSN_X_BEFORE },
{ CRISV10F_INSN_X_CTI_CHAIN, && case_sem_INSN_X_CTI_CHAIN },
{ CRISV10F_INSN_X_CHAIN, && case_sem_INSN_X_CHAIN },
{ CRISV10F_INSN_X_BEGIN, && case_sem_INSN_X_BEGIN },
{ CRISV10F_INSN_NOP, && case_sem_INSN_NOP },
{ CRISV10F_INSN_MOVE_B_R, && case_sem_INSN_MOVE_B_R },
{ CRISV10F_INSN_MOVE_W_R, && case_sem_INSN_MOVE_W_R },
{ CRISV10F_INSN_MOVE_D_R, && case_sem_INSN_MOVE_D_R },
{ CRISV10F_INSN_MOVEPCR, && case_sem_INSN_MOVEPCR },
{ CRISV10F_INSN_MOVEQ, && case_sem_INSN_MOVEQ },
{ CRISV10F_INSN_MOVS_B_R, && case_sem_INSN_MOVS_B_R },
{ CRISV10F_INSN_MOVS_W_R, && case_sem_INSN_MOVS_W_R },
{ CRISV10F_INSN_MOVU_B_R, && case_sem_INSN_MOVU_B_R },
{ CRISV10F_INSN_MOVU_W_R, && case_sem_INSN_MOVU_W_R },
{ CRISV10F_INSN_MOVECBR, && case_sem_INSN_MOVECBR },
{ CRISV10F_INSN_MOVECWR, && case_sem_INSN_MOVECWR },
{ CRISV10F_INSN_MOVECDR, && case_sem_INSN_MOVECDR },
{ CRISV10F_INSN_MOVSCBR, && case_sem_INSN_MOVSCBR },
{ CRISV10F_INSN_MOVSCWR, && case_sem_INSN_MOVSCWR },
{ CRISV10F_INSN_MOVUCBR, && case_sem_INSN_MOVUCBR },
{ CRISV10F_INSN_MOVUCWR, && case_sem_INSN_MOVUCWR },
{ CRISV10F_INSN_ADDQ, && case_sem_INSN_ADDQ },
{ CRISV10F_INSN_SUBQ, && case_sem_INSN_SUBQ },
{ CRISV10F_INSN_CMP_R_B_R, && case_sem_INSN_CMP_R_B_R },
{ CRISV10F_INSN_CMP_R_W_R, && case_sem_INSN_CMP_R_W_R },
{ CRISV10F_INSN_CMP_R_D_R, && case_sem_INSN_CMP_R_D_R },
{ CRISV10F_INSN_CMP_M_B_M, && case_sem_INSN_CMP_M_B_M },
{ CRISV10F_INSN_CMP_M_W_M, && case_sem_INSN_CMP_M_W_M },
{ CRISV10F_INSN_CMP_M_D_M, && case_sem_INSN_CMP_M_D_M },
{ CRISV10F_INSN_CMPCBR, && case_sem_INSN_CMPCBR },
{ CRISV10F_INSN_CMPCWR, && case_sem_INSN_CMPCWR },
{ CRISV10F_INSN_CMPCDR, && case_sem_INSN_CMPCDR },
{ CRISV10F_INSN_CMPQ, && case_sem_INSN_CMPQ },
{ CRISV10F_INSN_CMPS_M_B_M, && case_sem_INSN_CMPS_M_B_M },
{ CRISV10F_INSN_CMPS_M_W_M, && case_sem_INSN_CMPS_M_W_M },
{ CRISV10F_INSN_CMPSCBR, && case_sem_INSN_CMPSCBR },
{ CRISV10F_INSN_CMPSCWR, && case_sem_INSN_CMPSCWR },
{ CRISV10F_INSN_CMPU_M_B_M, && case_sem_INSN_CMPU_M_B_M },
{ CRISV10F_INSN_CMPU_M_W_M, && case_sem_INSN_CMPU_M_W_M },
{ CRISV10F_INSN_CMPUCBR, && case_sem_INSN_CMPUCBR },
{ CRISV10F_INSN_CMPUCWR, && case_sem_INSN_CMPUCWR },
{ CRISV10F_INSN_MOVE_M_B_M, && case_sem_INSN_MOVE_M_B_M },
{ CRISV10F_INSN_MOVE_M_W_M, && case_sem_INSN_MOVE_M_W_M },
{ CRISV10F_INSN_MOVE_M_D_M, && case_sem_INSN_MOVE_M_D_M },
{ CRISV10F_INSN_MOVS_M_B_M, && case_sem_INSN_MOVS_M_B_M },
{ CRISV10F_INSN_MOVS_M_W_M, && case_sem_INSN_MOVS_M_W_M },
{ CRISV10F_INSN_MOVU_M_B_M, && case_sem_INSN_MOVU_M_B_M },
{ CRISV10F_INSN_MOVU_M_W_M, && case_sem_INSN_MOVU_M_W_M },
{ CRISV10F_INSN_MOVE_R_SPRV10, && case_sem_INSN_MOVE_R_SPRV10 },
{ CRISV10F_INSN_MOVE_SPR_RV10, && case_sem_INSN_MOVE_SPR_RV10 },
{ CRISV10F_INSN_RET_TYPE, && case_sem_INSN_RET_TYPE },
{ CRISV10F_INSN_MOVE_M_SPRV10, && case_sem_INSN_MOVE_M_SPRV10 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P5, && case_sem_INSN_MOVE_C_SPRV10_P5 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P9, && case_sem_INSN_MOVE_C_SPRV10_P9 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P10, && case_sem_INSN_MOVE_C_SPRV10_P10 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P11, && case_sem_INSN_MOVE_C_SPRV10_P11 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P12, && case_sem_INSN_MOVE_C_SPRV10_P12 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P13, && case_sem_INSN_MOVE_C_SPRV10_P13 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P7, && case_sem_INSN_MOVE_C_SPRV10_P7 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P14, && case_sem_INSN_MOVE_C_SPRV10_P14 },
{ CRISV10F_INSN_MOVE_C_SPRV10_P15, && case_sem_INSN_MOVE_C_SPRV10_P15 },
{ CRISV10F_INSN_MOVE_SPR_MV10, && case_sem_INSN_MOVE_SPR_MV10 },
{ CRISV10F_INSN_SBFS, && case_sem_INSN_SBFS },
{ CRISV10F_INSN_MOVEM_R_M, && case_sem_INSN_MOVEM_R_M },
{ CRISV10F_INSN_MOVEM_M_R, && case_sem_INSN_MOVEM_M_R },
{ CRISV10F_INSN_MOVEM_M_PC, && case_sem_INSN_MOVEM_M_PC },
{ CRISV10F_INSN_ADD_B_R, && case_sem_INSN_ADD_B_R },
{ CRISV10F_INSN_ADD_W_R, && case_sem_INSN_ADD_W_R },
{ CRISV10F_INSN_ADD_D_R, && case_sem_INSN_ADD_D_R },
{ CRISV10F_INSN_ADD_M_B_M, && case_sem_INSN_ADD_M_B_M },
{ CRISV10F_INSN_ADD_M_W_M, && case_sem_INSN_ADD_M_W_M },
{ CRISV10F_INSN_ADD_M_D_M, && case_sem_INSN_ADD_M_D_M },
{ CRISV10F_INSN_ADDCBR, && case_sem_INSN_ADDCBR },
{ CRISV10F_INSN_ADDCWR, && case_sem_INSN_ADDCWR },
{ CRISV10F_INSN_ADDCDR, && case_sem_INSN_ADDCDR },
{ CRISV10F_INSN_ADDCPC, && case_sem_INSN_ADDCPC },
{ CRISV10F_INSN_ADDS_B_R, && case_sem_INSN_ADDS_B_R },
{ CRISV10F_INSN_ADDS_W_R, && case_sem_INSN_ADDS_W_R },
{ CRISV10F_INSN_ADDS_M_B_M, && case_sem_INSN_ADDS_M_B_M },
{ CRISV10F_INSN_ADDS_M_W_M, && case_sem_INSN_ADDS_M_W_M },
{ CRISV10F_INSN_ADDSCBR, && case_sem_INSN_ADDSCBR },
{ CRISV10F_INSN_ADDSCWR, && case_sem_INSN_ADDSCWR },
{ CRISV10F_INSN_ADDSPCPC, && case_sem_INSN_ADDSPCPC },
{ CRISV10F_INSN_ADDU_B_R, && case_sem_INSN_ADDU_B_R },
{ CRISV10F_INSN_ADDU_W_R, && case_sem_INSN_ADDU_W_R },
{ CRISV10F_INSN_ADDU_M_B_M, && case_sem_INSN_ADDU_M_B_M },
{ CRISV10F_INSN_ADDU_M_W_M, && case_sem_INSN_ADDU_M_W_M },
{ CRISV10F_INSN_ADDUCBR, && case_sem_INSN_ADDUCBR },
{ CRISV10F_INSN_ADDUCWR, && case_sem_INSN_ADDUCWR },
{ CRISV10F_INSN_SUB_B_R, && case_sem_INSN_SUB_B_R },
{ CRISV10F_INSN_SUB_W_R, && case_sem_INSN_SUB_W_R },
{ CRISV10F_INSN_SUB_D_R, && case_sem_INSN_SUB_D_R },
{ CRISV10F_INSN_SUB_M_B_M, && case_sem_INSN_SUB_M_B_M },
{ CRISV10F_INSN_SUB_M_W_M, && case_sem_INSN_SUB_M_W_M },
{ CRISV10F_INSN_SUB_M_D_M, && case_sem_INSN_SUB_M_D_M },
{ CRISV10F_INSN_SUBCBR, && case_sem_INSN_SUBCBR },
{ CRISV10F_INSN_SUBCWR, && case_sem_INSN_SUBCWR },
{ CRISV10F_INSN_SUBCDR, && case_sem_INSN_SUBCDR },
{ CRISV10F_INSN_SUBS_B_R, && case_sem_INSN_SUBS_B_R },
{ CRISV10F_INSN_SUBS_W_R, && case_sem_INSN_SUBS_W_R },
{ CRISV10F_INSN_SUBS_M_B_M, && case_sem_INSN_SUBS_M_B_M },
{ CRISV10F_INSN_SUBS_M_W_M, && case_sem_INSN_SUBS_M_W_M },
{ CRISV10F_INSN_SUBSCBR, && case_sem_INSN_SUBSCBR },
{ CRISV10F_INSN_SUBSCWR, && case_sem_INSN_SUBSCWR },
{ CRISV10F_INSN_SUBU_B_R, && case_sem_INSN_SUBU_B_R },
{ CRISV10F_INSN_SUBU_W_R, && case_sem_INSN_SUBU_W_R },
{ CRISV10F_INSN_SUBU_M_B_M, && case_sem_INSN_SUBU_M_B_M },
{ CRISV10F_INSN_SUBU_M_W_M, && case_sem_INSN_SUBU_M_W_M },
{ CRISV10F_INSN_SUBUCBR, && case_sem_INSN_SUBUCBR },
{ CRISV10F_INSN_SUBUCWR, && case_sem_INSN_SUBUCWR },
{ CRISV10F_INSN_ADDI_B_R, && case_sem_INSN_ADDI_B_R },
{ CRISV10F_INSN_ADDI_W_R, && case_sem_INSN_ADDI_W_R },
{ CRISV10F_INSN_ADDI_D_R, && case_sem_INSN_ADDI_D_R },
{ CRISV10F_INSN_NEG_B_R, && case_sem_INSN_NEG_B_R },
{ CRISV10F_INSN_NEG_W_R, && case_sem_INSN_NEG_W_R },
{ CRISV10F_INSN_NEG_D_R, && case_sem_INSN_NEG_D_R },
{ CRISV10F_INSN_TEST_M_B_M, && case_sem_INSN_TEST_M_B_M },
{ CRISV10F_INSN_TEST_M_W_M, && case_sem_INSN_TEST_M_W_M },
{ CRISV10F_INSN_TEST_M_D_M, && case_sem_INSN_TEST_M_D_M },
{ CRISV10F_INSN_MOVE_R_M_B_M, && case_sem_INSN_MOVE_R_M_B_M },
{ CRISV10F_INSN_MOVE_R_M_W_M, && case_sem_INSN_MOVE_R_M_W_M },
{ CRISV10F_INSN_MOVE_R_M_D_M, && case_sem_INSN_MOVE_R_M_D_M },
{ CRISV10F_INSN_MULS_B, && case_sem_INSN_MULS_B },
{ CRISV10F_INSN_MULS_W, && case_sem_INSN_MULS_W },
{ CRISV10F_INSN_MULS_D, && case_sem_INSN_MULS_D },
{ CRISV10F_INSN_MULU_B, && case_sem_INSN_MULU_B },
{ CRISV10F_INSN_MULU_W, && case_sem_INSN_MULU_W },
{ CRISV10F_INSN_MULU_D, && case_sem_INSN_MULU_D },
{ CRISV10F_INSN_MSTEP, && case_sem_INSN_MSTEP },
{ CRISV10F_INSN_DSTEP, && case_sem_INSN_DSTEP },
{ CRISV10F_INSN_ABS, && case_sem_INSN_ABS },
{ CRISV10F_INSN_AND_B_R, && case_sem_INSN_AND_B_R },
{ CRISV10F_INSN_AND_W_R, && case_sem_INSN_AND_W_R },
{ CRISV10F_INSN_AND_D_R, && case_sem_INSN_AND_D_R },
{ CRISV10F_INSN_AND_M_B_M, && case_sem_INSN_AND_M_B_M },
{ CRISV10F_INSN_AND_M_W_M, && case_sem_INSN_AND_M_W_M },
{ CRISV10F_INSN_AND_M_D_M, && case_sem_INSN_AND_M_D_M },
{ CRISV10F_INSN_ANDCBR, && case_sem_INSN_ANDCBR },
{ CRISV10F_INSN_ANDCWR, && case_sem_INSN_ANDCWR },
{ CRISV10F_INSN_ANDCDR, && case_sem_INSN_ANDCDR },
{ CRISV10F_INSN_ANDQ, && case_sem_INSN_ANDQ },
{ CRISV10F_INSN_ORR_B_R, && case_sem_INSN_ORR_B_R },
{ CRISV10F_INSN_ORR_W_R, && case_sem_INSN_ORR_W_R },
{ CRISV10F_INSN_ORR_D_R, && case_sem_INSN_ORR_D_R },
{ CRISV10F_INSN_OR_M_B_M, && case_sem_INSN_OR_M_B_M },
{ CRISV10F_INSN_OR_M_W_M, && case_sem_INSN_OR_M_W_M },
{ CRISV10F_INSN_OR_M_D_M, && case_sem_INSN_OR_M_D_M },
{ CRISV10F_INSN_ORCBR, && case_sem_INSN_ORCBR },
{ CRISV10F_INSN_ORCWR, && case_sem_INSN_ORCWR },
{ CRISV10F_INSN_ORCDR, && case_sem_INSN_ORCDR },
{ CRISV10F_INSN_ORQ, && case_sem_INSN_ORQ },
{ CRISV10F_INSN_XOR, && case_sem_INSN_XOR },
{ CRISV10F_INSN_SWAP, && case_sem_INSN_SWAP },
{ CRISV10F_INSN_ASRR_B_R, && case_sem_INSN_ASRR_B_R },
{ CRISV10F_INSN_ASRR_W_R, && case_sem_INSN_ASRR_W_R },
{ CRISV10F_INSN_ASRR_D_R, && case_sem_INSN_ASRR_D_R },
{ CRISV10F_INSN_ASRQ, && case_sem_INSN_ASRQ },
{ CRISV10F_INSN_LSRR_B_R, && case_sem_INSN_LSRR_B_R },
{ CRISV10F_INSN_LSRR_W_R, && case_sem_INSN_LSRR_W_R },
{ CRISV10F_INSN_LSRR_D_R, && case_sem_INSN_LSRR_D_R },
{ CRISV10F_INSN_LSRQ, && case_sem_INSN_LSRQ },
{ CRISV10F_INSN_LSLR_B_R, && case_sem_INSN_LSLR_B_R },
{ CRISV10F_INSN_LSLR_W_R, && case_sem_INSN_LSLR_W_R },
{ CRISV10F_INSN_LSLR_D_R, && case_sem_INSN_LSLR_D_R },
{ CRISV10F_INSN_LSLQ, && case_sem_INSN_LSLQ },
{ CRISV10F_INSN_BTST, && case_sem_INSN_BTST },
{ CRISV10F_INSN_BTSTQ, && case_sem_INSN_BTSTQ },
{ CRISV10F_INSN_SETF, && case_sem_INSN_SETF },
{ CRISV10F_INSN_CLEARF, && case_sem_INSN_CLEARF },
{ CRISV10F_INSN_BCC_B, && case_sem_INSN_BCC_B },
{ CRISV10F_INSN_BA_B, && case_sem_INSN_BA_B },
{ CRISV10F_INSN_BCC_W, && case_sem_INSN_BCC_W },
{ CRISV10F_INSN_BA_W, && case_sem_INSN_BA_W },
{ CRISV10F_INSN_JUMP_R, && case_sem_INSN_JUMP_R },
{ CRISV10F_INSN_JUMP_M, && case_sem_INSN_JUMP_M },
{ CRISV10F_INSN_JUMP_C, && case_sem_INSN_JUMP_C },
{ CRISV10F_INSN_BREAK, && case_sem_INSN_BREAK },
{ CRISV10F_INSN_BOUND_R_B_R, && case_sem_INSN_BOUND_R_B_R },
{ CRISV10F_INSN_BOUND_R_W_R, && case_sem_INSN_BOUND_R_W_R },
{ CRISV10F_INSN_BOUND_R_D_R, && case_sem_INSN_BOUND_R_D_R },
{ CRISV10F_INSN_BOUND_M_B_M, && case_sem_INSN_BOUND_M_B_M },
{ CRISV10F_INSN_BOUND_M_W_M, && case_sem_INSN_BOUND_M_W_M },
{ CRISV10F_INSN_BOUND_M_D_M, && case_sem_INSN_BOUND_M_D_M },
{ CRISV10F_INSN_BOUND_CB, && case_sem_INSN_BOUND_CB },
{ CRISV10F_INSN_BOUND_CW, && case_sem_INSN_BOUND_CW },
{ CRISV10F_INSN_BOUND_CD, && case_sem_INSN_BOUND_CD },
{ CRISV10F_INSN_SCC, && case_sem_INSN_SCC },
{ CRISV10F_INSN_LZ, && case_sem_INSN_LZ },
{ CRISV10F_INSN_ADDOQ, && case_sem_INSN_ADDOQ },
{ CRISV10F_INSN_BDAPQPC, && case_sem_INSN_BDAPQPC },
{ CRISV10F_INSN_BDAP_32_PC, && case_sem_INSN_BDAP_32_PC },
{ CRISV10F_INSN_MOVE_M_PCPLUS_P0, && case_sem_INSN_MOVE_M_PCPLUS_P0 },
{ CRISV10F_INSN_MOVE_M_SPPLUS_P8, && case_sem_INSN_MOVE_M_SPPLUS_P8 },
{ CRISV10F_INSN_ADDO_M_B_M, && case_sem_INSN_ADDO_M_B_M },
{ CRISV10F_INSN_ADDO_M_W_M, && case_sem_INSN_ADDO_M_W_M },
{ CRISV10F_INSN_ADDO_M_D_M, && case_sem_INSN_ADDO_M_D_M },
{ CRISV10F_INSN_ADDO_CB, && case_sem_INSN_ADDO_CB },
{ CRISV10F_INSN_ADDO_CW, && case_sem_INSN_ADDO_CW },
{ CRISV10F_INSN_ADDO_CD, && case_sem_INSN_ADDO_CD },
{ CRISV10F_INSN_DIP_M, && case_sem_INSN_DIP_M },
{ CRISV10F_INSN_DIP_C, && case_sem_INSN_DIP_C },
{ CRISV10F_INSN_ADDI_ACR_B_R, && case_sem_INSN_ADDI_ACR_B_R },
{ CRISV10F_INSN_ADDI_ACR_W_R, && case_sem_INSN_ADDI_ACR_W_R },
{ CRISV10F_INSN_ADDI_ACR_D_R, && case_sem_INSN_ADDI_ACR_D_R },
{ CRISV10F_INSN_BIAP_PC_B_R, && case_sem_INSN_BIAP_PC_B_R },
{ CRISV10F_INSN_BIAP_PC_W_R, && case_sem_INSN_BIAP_PC_W_R },
{ CRISV10F_INSN_BIAP_PC_D_R, && case_sem_INSN_BIAP_PC_D_R },
{ 0, 0 }
};
int i;
for (i = 0; labels[i].label != 0; ++i)
{
#if FAST_P
CPU_IDESC (current_cpu) [labels[i].index].sem_fast_lab = labels[i].label;
#else
CPU_IDESC (current_cpu) [labels[i].index].sem_full_lab = labels[i].label;
#endif
}
#undef DEFINE_LABELS
#endif /* DEFINE_LABELS */
#ifdef DEFINE_SWITCH
/* If hyper-fast [well not unnecessarily slow] execution is selected, turn
off frills like tracing and profiling. */
/* FIXME: A better way would be to have CGEN_TRACE_RESULT check for something
that can cause it to be optimized out. Another way would be to emit
special handlers into the instruction "stream". */
#if FAST_P
#undef CGEN_TRACE_RESULT
#define CGEN_TRACE_RESULT(cpu, abuf, name, type, val)
#endif
#undef GET_ATTR
#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
{
#if WITH_SCACHE_PBB
/* Branch to next handler without going around main loop. */
#define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
#else /* ! WITH_SCACHE_PBB */
#define NEXT(vpc) BREAK (sem)
#ifdef __GNUC__
#if FAST_P
SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_fast_lab)
#else
SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_full_lab)
#endif
#else
SWITCH (sem, SEM_ARGBUF (sc) -> idesc->num)
#endif
#endif /* ! WITH_SCACHE_PBB */
{
CASE (sem, INSN_X_INVALID) : /* --invalid-- */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
/* Update the recorded pc in the cpu state struct.
Only necessary for WITH_SCACHE case, but to avoid the
conditional compilation .... */
SET_H_PC (pc);
/* Virtual insns have zero size. Overwrite vpc with address of next insn
using the default-insn-bitsize spec. When executing insns in parallel
we may want to queue the fault and continue execution. */
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_X_AFTER) : /* --after-- */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_CRISV10F
crisv10f_pbb_after (current_cpu, sem_arg);
#endif
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_X_BEFORE) : /* --before-- */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_CRISV10F
crisv10f_pbb_before (current_cpu, sem_arg);
#endif
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_X_CTI_CHAIN) : /* --cti-chain-- */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_CRISV10F
#ifdef DEFINE_SWITCH
vpc = crisv10f_pbb_cti_chain (current_cpu, sem_arg,
pbb_br_type, pbb_br_npc);
BREAK (sem);
#else
/* FIXME: Allow provision of explicit ifmt spec in insn spec. */
vpc = crisv10f_pbb_cti_chain (current_cpu, sem_arg,
CPU_PBB_BR_TYPE (current_cpu),
CPU_PBB_BR_NPC (current_cpu));
#endif
#endif
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_X_CHAIN) : /* --chain-- */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_CRISV10F
vpc = crisv10f_pbb_chain (current_cpu, sem_arg);
#ifdef DEFINE_SWITCH
BREAK (sem);
#endif
#endif
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_X_BEGIN) : /* --begin-- */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_CRISV10F
#if defined DEFINE_SWITCH || defined FAST_P
/* In the switch case FAST_P is a constant, allowing several optimizations
in any called inline functions. */
vpc = crisv10f_pbb_begin (current_cpu, FAST_P);
#else
#if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
vpc = crisv10f_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
#else
vpc = crisv10f_pbb_begin (current_cpu, 0);
#endif
#endif
#endif
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_NOP) : /* nop */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_empty.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVE_B_R) : /* move.b move.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_b_r.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_newval;
tmp_newval = GET_H_GR (FLD (f_operand1));
{
SI tmp_oldregval;
tmp_oldregval = GET_H_RAW_GR_PC (FLD (f_operand2));
{
SI opval = ORSI (ANDSI (tmp_newval, 255), ANDSI (tmp_oldregval, 0xffffff00));
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
{
{
BI opval = LTQI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQQI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVE_W_R) : /* move.w move.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_b_r.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI tmp_newval;
tmp_newval = GET_H_GR (FLD (f_operand1));
{
SI tmp_oldregval;
tmp_oldregval = GET_H_RAW_GR_PC (FLD (f_operand2));
{
SI opval = ORSI (ANDSI (tmp_newval, 65535), ANDSI (tmp_oldregval, 0xffff0000));
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
{
{
BI opval = LTHI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQHI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVE_D_R) : /* move.d move.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_b_r.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_newval;
tmp_newval = GET_H_GR (FLD (f_operand1));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVEPCR) : /* move.d PC,${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_moveq.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_pcval;
tmp_pcval = ADDSI (pc, 2);
{
SI opval = tmp_pcval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_pcval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_pcval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
SEM_BRANCH_FINI (vpc);
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVEQ) : /* moveq $i,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_moveq.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_newval;
tmp_newval = FLD (f_s6);
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
SET_H_NBIT_MOVE (LTSI (tmp_newval, 0));
SET_H_ZBIT_MOVE (ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1))));
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVS_B_R) : /* movs.b movs.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_muls_b.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_tmpops;
SI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_newval = EXTQISI (tmp_tmpops);
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVS_W_R) : /* movs.w movs.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_muls_b.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI tmp_tmpops;
SI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_newval = EXTHISI (tmp_tmpops);
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVU_B_R) : /* movu.b movu.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_muls_b.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_tmpops;
SI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_newval = ZEXTQISI (tmp_tmpops);
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVU_W_R) : /* movu.w movu.m ${Rs},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_muls_b.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI tmp_tmpops;
SI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_newval = ZEXTHISI (tmp_tmpops);
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVECBR) : /* move.b ${sconst8},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_addcbr.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
QI tmp_newval;
tmp_newval = FLD (f_indir_pc__byte);
{
SI tmp_oldregval;
tmp_oldregval = GET_H_RAW_GR_PC (FLD (f_operand2));
{
SI opval = ORSI (ANDSI (tmp_newval, 255), ANDSI (tmp_oldregval, 0xffffff00));
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
{
{
BI opval = LTQI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQQI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVECWR) : /* move.w ${sconst16},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_addcwr.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
HI tmp_newval;
tmp_newval = FLD (f_indir_pc__word);
{
SI tmp_oldregval;
tmp_oldregval = GET_H_RAW_GR_PC (FLD (f_operand2));
{
SI opval = ORSI (ANDSI (tmp_newval, 65535), ANDSI (tmp_oldregval, 0xffff0000));
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
{
{
BI opval = LTHI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQHI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVECDR) : /* move.d ${const32},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cd.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 6);
{
SI tmp_newval;
tmp_newval = FLD (f_indir_pc__dword);
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVSCBR) : /* movs.b ${sconst8},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cb.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_newval;
tmp_newval = EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte)));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVSCWR) : /* movs.w ${sconst16},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cw.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_newval;
tmp_newval = EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word)));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVUCBR) : /* movu.b ${uconst8},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cb.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_newval;
tmp_newval = ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte)));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVUCWR) : /* movu.w ${uconst16},${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cw.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_newval;
tmp_newval = ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word)));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_ADDQ) : /* addq $j,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_addq.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = FLD (f_u6);
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = ADDCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd, 0), GESI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (GESI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_SUBQ) : /* subq $j,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_addq.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = FLD (f_u6);
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
{
SI opval = tmp_newval;
SET_H_GR (FLD (f_operand2), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMP_R_B_R) : /* cmp-r.b $Rs,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_b_r.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_tmpopd;
QI tmp_tmpops;
BI tmp_carry;
QI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCQI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTQI (tmp_tmpops, 0), GEQI (tmp_tmpopd, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd, 0), LTQI (tmp_newval, 0)), ANDIF (LTQI (tmp_tmpops, 0), LTQI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTQI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQQI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops, 0), LTQI (tmp_tmpopd, 0)), GEQI (tmp_newval, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops, 0), GEQI (tmp_tmpopd, 0)), LTQI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMP_R_W_R) : /* cmp-r.w $Rs,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_b_r.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI tmp_tmpopd;
HI tmp_tmpops;
BI tmp_carry;
HI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCHI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTHI (tmp_tmpops, 0), GEHI (tmp_tmpopd, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd, 0), LTHI (tmp_newval, 0)), ANDIF (LTHI (tmp_tmpops, 0), LTHI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTHI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQHI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops, 0), LTHI (tmp_tmpopd, 0)), GEHI (tmp_newval, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops, 0), GEHI (tmp_tmpopd, 0)), LTHI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMP_R_D_R) : /* cmp-r.d $Rs,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_b_r.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = GET_H_GR (FLD (f_operand1));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMP_M_B_M) : /* cmp-m.b [${Rs}${inc}],${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_tmpopd;
QI tmp_tmpops;
BI tmp_carry;
QI tmp_newval;
tmp_tmpops = ({ SI tmp_addr;
QI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMQI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 1);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; });
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCQI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTQI (tmp_tmpops, 0), GEQI (tmp_tmpopd, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd, 0), LTQI (tmp_newval, 0)), ANDIF (LTQI (tmp_tmpops, 0), LTQI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTQI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQQI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops, 0), LTQI (tmp_tmpopd, 0)), GEQI (tmp_newval, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops, 0), GEQI (tmp_tmpopd, 0)), LTQI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMP_M_W_M) : /* cmp-m.w [${Rs}${inc}],${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI tmp_tmpopd;
HI tmp_tmpops;
BI tmp_carry;
HI tmp_newval;
tmp_tmpops = ({ SI tmp_addr;
HI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMHI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 2);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; });
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCHI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTHI (tmp_tmpops, 0), GEHI (tmp_tmpopd, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd, 0), LTHI (tmp_newval, 0)), ANDIF (LTHI (tmp_tmpops, 0), LTHI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTHI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQHI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops, 0), LTHI (tmp_tmpopd, 0)), GEHI (tmp_newval, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops, 0), GEHI (tmp_tmpopd, 0)), LTHI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMP_M_D_M) : /* cmp-m.d [${Rs}${inc}],${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = ({ SI tmp_addr;
SI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMSI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 4);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; });
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPCBR) : /* cmp.b $sconst8,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cb.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
QI tmp_tmpopd;
QI tmp_tmpops;
BI tmp_carry;
QI tmp_newval;
tmp_tmpops = TRUNCSIQI (FLD (f_indir_pc__byte));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCQI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTQI (tmp_tmpops, 0), GEQI (tmp_tmpopd, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd, 0), LTQI (tmp_newval, 0)), ANDIF (LTQI (tmp_tmpops, 0), LTQI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTQI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQQI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops, 0), LTQI (tmp_tmpopd, 0)), GEQI (tmp_newval, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops, 0), GEQI (tmp_tmpopd, 0)), LTQI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPCWR) : /* cmp.w $sconst16,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cw.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
HI tmp_tmpopd;
HI tmp_tmpops;
BI tmp_carry;
HI tmp_newval;
tmp_tmpops = TRUNCSIHI (FLD (f_indir_pc__word));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCHI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTHI (tmp_tmpops, 0), GEHI (tmp_tmpopd, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd, 0), LTHI (tmp_newval, 0)), ANDIF (LTHI (tmp_tmpops, 0), LTHI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTHI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQHI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops, 0), LTHI (tmp_tmpopd, 0)), GEHI (tmp_newval, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops, 0), GEHI (tmp_tmpopd, 0)), LTHI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPCDR) : /* cmp.d $const32,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cd.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 6);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = FLD (f_indir_pc__dword);
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPQ) : /* cmpq $i,$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_andq.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = FLD (f_s6);
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPS_M_B_M) : /* cmps-m.b [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = EXTQISI (({ SI tmp_addr;
QI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMQI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 1);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; }));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPS_M_W_M) : /* cmps-m.w [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = EXTHISI (({ SI tmp_addr;
HI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMHI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 2);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; }));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPSCBR) : /* [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cb.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte)));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPSCWR) : /* [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cw.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word)));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPU_M_B_M) : /* cmpu-m.b [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = ZEXTQISI (({ SI tmp_addr;
QI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMQI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 1);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; }));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPU_M_W_M) : /* cmpu-m.w [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = ZEXTHISI (({ SI tmp_addr;
HI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMHI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 2);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 9);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; }));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPUCBR) : /* [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cb.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte)));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_CMPUCWR) : /* [${Rs}${inc}],$Rd */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_bound_cw.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
{
SI tmp_tmpopd;
SI tmp_tmpops;
BI tmp_carry;
SI tmp_newval;
tmp_tmpops = ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word)));
tmp_tmpopd = GET_H_GR (FLD (f_operand2));
tmp_carry = CPU (h_cbit);
tmp_newval = SUBCSI (tmp_tmpopd, tmp_tmpops, ((EQBI (CPU (h_xbit), 0)) ? (0) : (tmp_carry)));
((void) 0); /*nop*/
{
{
BI opval = ORIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), ORIF (ANDIF (GESI (tmp_tmpopd, 0), LTSI (tmp_newval, 0)), ANDIF (LTSI (tmp_tmpops, 0), LTSI (tmp_newval, 0))));
CPU (h_cbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
}
{
BI opval = LTSI (tmp_newval, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQSI (tmp_newval, 0), ORIF (CPU (h_zbit), NOTBI (CPU (h_xbit))));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
{
BI opval = ORIF (ANDIF (ANDIF (GESI (tmp_tmpops, 0), LTSI (tmp_tmpopd, 0)), GESI (tmp_newval, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops, 0), GESI (tmp_tmpopd, 0)), LTSI (tmp_newval, 0)));
CPU (h_vbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
}
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVE_M_B_M) : /* move-m.b [${Rs}${inc}],${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmp;
tmp_tmp = ({ SI tmp_addr;
QI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMQI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 1);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 10);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; });
{
SI tmp_oldregval;
tmp_oldregval = GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode)))) ? (FLD (f_operand1)) : (FLD (f_operand2))));
{
SI opval = ORSI (ANDSI (tmp_tmp, 255), ANDSI (tmp_oldregval, 0xffffff00));
SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode)))) ? (FLD (f_operand1)) : (FLD (f_operand2))), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
{
{
BI opval = LTQI (tmp_tmp, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQQI (tmp_tmp, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{
{
BI opval = 0;
CPU (h_xbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "xbit", 'x', opval);
}
{
BI opval = 0;
SET_H_INSN_PREFIXED_P (opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "insn-prefixed-p", 'x', opval);
}
}
}
}
abuf->written = written;
#undef FLD
}
NEXT (vpc);
CASE (sem, INSN_MOVE_M_W_M) : /* move-m.w [${Rs}${inc}],${Rd} */
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
#define FLD(f) abuf->fields.sfmt_add_m_b_m.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmp;
tmp_tmp = ({ SI tmp_addr;
HI tmp_tmp_mem;
BI tmp_postinc;
tmp_postinc = FLD (f_memmode);
; tmp_addr = ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1))) : (CPU (h_prefixreg_pre_v32)));
; tmp_tmp_mem = GETMEMHI (current_cpu, pc, tmp_addr);
; if (NEBI (tmp_postinc, 0)) {
{
if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
tmp_addr = ADDSI (tmp_addr, 2);
}
{
SI opval = tmp_addr;
SET_H_GR (FLD (f_operand1), opval);
written |= (1 << 10);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
}
; tmp_tmp_mem; });
{
SI tmp_oldregval;
tmp_oldregval = GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode)))) ? (FLD (f_operand1)) : (FLD (f_operand2))));
{
SI opval = ORSI (ANDSI (tmp_tmp, 65535), ANDSI (tmp_oldregval, 0xffff0000));
SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode)))) ? (FLD (f_operand1)) : (FLD (f_operand2))), opval);
CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
}
}
{
{
BI opval = LTHI (tmp_tmp, 0);
CPU (h_nbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
}
{
BI opval = ANDIF (EQHI (tmp_tmp, 0), ((CPU (h_xbit)) ? (CPU (h_zbit)) : (1)));
CPU (h_zbit) = opval;
CGEN_TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
}
SET_H_CBIT_MOVE (0);
SET_H_VBIT_MOVE (0);
{