1 1.1 christos /* Simulator instruction decoder for crisv10f. 2 1.1 christos 3 1.1 christos THIS FILE IS MACHINE GENERATED WITH CGEN. 4 1.1 christos 5 1.11 christos Copyright (C) 1996-2024 Free Software Foundation, Inc. 6 1.1 christos 7 1.1 christos This file is part of the GNU simulators. 8 1.1 christos 9 1.1 christos This file is free software; you can redistribute it and/or modify 10 1.1 christos it under the terms of the GNU General Public License as published by 11 1.1 christos the Free Software Foundation; either version 3, or (at your option) 12 1.1 christos any later version. 13 1.1 christos 14 1.1 christos It is distributed in the hope that it will be useful, but WITHOUT 15 1.1 christos ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 1.1 christos or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 17 1.1 christos License for more details. 18 1.1 christos 19 1.1 christos You should have received a copy of the GNU General Public License along 20 1.11 christos with this program; if not, write to the Free Software Foundation, Inc., 21 1.11 christos 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 22 1.1 christos 23 1.1 christos */ 24 1.1 christos 25 1.1 christos #define WANT_CPU crisv10f 26 1.1 christos #define WANT_CPU_CRISV10F 27 1.1 christos 28 1.1 christos #include "sim-main.h" 29 1.1 christos #include "sim-assert.h" 30 1.10 christos #include "cgen-mem.h" 31 1.1 christos #include "cgen-ops.h" 32 1.1 christos 33 1.1 christos /* The instruction descriptor array. 34 1.1 christos This is computed at runtime. Space for it is not malloc'd to save a 35 1.1 christos teensy bit of cpu in the decoder. Moving it to malloc space is trivial 36 1.1 christos but won't be done until necessary (we don't currently support the runtime 37 1.1 christos addition of instructions nor an SMP machine with different cpus). */ 38 1.1 christos static IDESC crisv10f_insn_data[CRISV10F_INSN__MAX]; 39 1.1 christos 40 1.1 christos /* Commas between elements are contained in the macros. 41 1.1 christos Some of these are conditionally compiled out. */ 42 1.1 christos 43 1.1 christos static const struct insn_sem crisv10f_insn_sem[] = 44 1.1 christos { 45 1.1 christos { VIRTUAL_INSN_X_INVALID, CRISV10F_INSN_X_INVALID, CRISV10F_SFMT_EMPTY }, 46 1.1 christos { VIRTUAL_INSN_X_AFTER, CRISV10F_INSN_X_AFTER, CRISV10F_SFMT_EMPTY }, 47 1.1 christos { VIRTUAL_INSN_X_BEFORE, CRISV10F_INSN_X_BEFORE, CRISV10F_SFMT_EMPTY }, 48 1.1 christos { VIRTUAL_INSN_X_CTI_CHAIN, CRISV10F_INSN_X_CTI_CHAIN, CRISV10F_SFMT_EMPTY }, 49 1.1 christos { VIRTUAL_INSN_X_CHAIN, CRISV10F_INSN_X_CHAIN, CRISV10F_SFMT_EMPTY }, 50 1.1 christos { VIRTUAL_INSN_X_BEGIN, CRISV10F_INSN_X_BEGIN, CRISV10F_SFMT_EMPTY }, 51 1.1 christos { CRIS_INSN_NOP, CRISV10F_INSN_NOP, CRISV10F_SFMT_NOP }, 52 1.1 christos { CRIS_INSN_MOVE_B_R, CRISV10F_INSN_MOVE_B_R, CRISV10F_SFMT_MOVE_B_R }, 53 1.1 christos { CRIS_INSN_MOVE_W_R, CRISV10F_INSN_MOVE_W_R, CRISV10F_SFMT_MOVE_B_R }, 54 1.1 christos { CRIS_INSN_MOVE_D_R, CRISV10F_INSN_MOVE_D_R, CRISV10F_SFMT_MOVE_D_R }, 55 1.1 christos { CRIS_INSN_MOVEPCR, CRISV10F_INSN_MOVEPCR, CRISV10F_SFMT_MOVEPCR }, 56 1.1 christos { CRIS_INSN_MOVEQ, CRISV10F_INSN_MOVEQ, CRISV10F_SFMT_MOVEQ }, 57 1.1 christos { CRIS_INSN_MOVS_B_R, CRISV10F_INSN_MOVS_B_R, CRISV10F_SFMT_MOVS_B_R }, 58 1.1 christos { CRIS_INSN_MOVS_W_R, CRISV10F_INSN_MOVS_W_R, CRISV10F_SFMT_MOVS_B_R }, 59 1.1 christos { CRIS_INSN_MOVU_B_R, CRISV10F_INSN_MOVU_B_R, CRISV10F_SFMT_MOVS_B_R }, 60 1.1 christos { CRIS_INSN_MOVU_W_R, CRISV10F_INSN_MOVU_W_R, CRISV10F_SFMT_MOVS_B_R }, 61 1.1 christos { CRIS_INSN_MOVECBR, CRISV10F_INSN_MOVECBR, CRISV10F_SFMT_MOVECBR }, 62 1.1 christos { CRIS_INSN_MOVECWR, CRISV10F_INSN_MOVECWR, CRISV10F_SFMT_MOVECWR }, 63 1.1 christos { CRIS_INSN_MOVECDR, CRISV10F_INSN_MOVECDR, CRISV10F_SFMT_MOVECDR }, 64 1.1 christos { CRIS_INSN_MOVSCBR, CRISV10F_INSN_MOVSCBR, CRISV10F_SFMT_MOVSCBR }, 65 1.1 christos { CRIS_INSN_MOVSCWR, CRISV10F_INSN_MOVSCWR, CRISV10F_SFMT_MOVSCWR }, 66 1.1 christos { CRIS_INSN_MOVUCBR, CRISV10F_INSN_MOVUCBR, CRISV10F_SFMT_MOVUCBR }, 67 1.1 christos { CRIS_INSN_MOVUCWR, CRISV10F_INSN_MOVUCWR, CRISV10F_SFMT_MOVUCWR }, 68 1.1 christos { CRIS_INSN_ADDQ, CRISV10F_INSN_ADDQ, CRISV10F_SFMT_ADDQ }, 69 1.1 christos { CRIS_INSN_SUBQ, CRISV10F_INSN_SUBQ, CRISV10F_SFMT_ADDQ }, 70 1.1 christos { CRIS_INSN_CMP_R_B_R, CRISV10F_INSN_CMP_R_B_R, CRISV10F_SFMT_CMP_R_B_R }, 71 1.1 christos { CRIS_INSN_CMP_R_W_R, CRISV10F_INSN_CMP_R_W_R, CRISV10F_SFMT_CMP_R_B_R }, 72 1.1 christos { CRIS_INSN_CMP_R_D_R, CRISV10F_INSN_CMP_R_D_R, CRISV10F_SFMT_CMP_R_B_R }, 73 1.1 christos { CRIS_INSN_CMP_M_B_M, CRISV10F_INSN_CMP_M_B_M, CRISV10F_SFMT_CMP_M_B_M }, 74 1.1 christos { CRIS_INSN_CMP_M_W_M, CRISV10F_INSN_CMP_M_W_M, CRISV10F_SFMT_CMP_M_W_M }, 75 1.1 christos { CRIS_INSN_CMP_M_D_M, CRISV10F_INSN_CMP_M_D_M, CRISV10F_SFMT_CMP_M_D_M }, 76 1.1 christos { CRIS_INSN_CMPCBR, CRISV10F_INSN_CMPCBR, CRISV10F_SFMT_CMPCBR }, 77 1.1 christos { CRIS_INSN_CMPCWR, CRISV10F_INSN_CMPCWR, CRISV10F_SFMT_CMPCWR }, 78 1.1 christos { CRIS_INSN_CMPCDR, CRISV10F_INSN_CMPCDR, CRISV10F_SFMT_CMPCDR }, 79 1.1 christos { CRIS_INSN_CMPQ, CRISV10F_INSN_CMPQ, CRISV10F_SFMT_CMPQ }, 80 1.1 christos { CRIS_INSN_CMPS_M_B_M, CRISV10F_INSN_CMPS_M_B_M, CRISV10F_SFMT_CMP_M_B_M }, 81 1.1 christos { CRIS_INSN_CMPS_M_W_M, CRISV10F_INSN_CMPS_M_W_M, CRISV10F_SFMT_CMP_M_W_M }, 82 1.1 christos { CRIS_INSN_CMPSCBR, CRISV10F_INSN_CMPSCBR, CRISV10F_SFMT_CMPCBR }, 83 1.1 christos { CRIS_INSN_CMPSCWR, CRISV10F_INSN_CMPSCWR, CRISV10F_SFMT_CMPCWR }, 84 1.1 christos { CRIS_INSN_CMPU_M_B_M, CRISV10F_INSN_CMPU_M_B_M, CRISV10F_SFMT_CMP_M_B_M }, 85 1.1 christos { CRIS_INSN_CMPU_M_W_M, CRISV10F_INSN_CMPU_M_W_M, CRISV10F_SFMT_CMP_M_W_M }, 86 1.1 christos { CRIS_INSN_CMPUCBR, CRISV10F_INSN_CMPUCBR, CRISV10F_SFMT_CMPUCBR }, 87 1.1 christos { CRIS_INSN_CMPUCWR, CRISV10F_INSN_CMPUCWR, CRISV10F_SFMT_CMPUCWR }, 88 1.1 christos { CRIS_INSN_MOVE_M_B_M, CRISV10F_INSN_MOVE_M_B_M, CRISV10F_SFMT_MOVE_M_B_M }, 89 1.1 christos { CRIS_INSN_MOVE_M_W_M, CRISV10F_INSN_MOVE_M_W_M, CRISV10F_SFMT_MOVE_M_W_M }, 90 1.1 christos { CRIS_INSN_MOVE_M_D_M, CRISV10F_INSN_MOVE_M_D_M, CRISV10F_SFMT_MOVE_M_D_M }, 91 1.1 christos { CRIS_INSN_MOVS_M_B_M, CRISV10F_INSN_MOVS_M_B_M, CRISV10F_SFMT_MOVS_M_B_M }, 92 1.1 christos { CRIS_INSN_MOVS_M_W_M, CRISV10F_INSN_MOVS_M_W_M, CRISV10F_SFMT_MOVS_M_W_M }, 93 1.1 christos { CRIS_INSN_MOVU_M_B_M, CRISV10F_INSN_MOVU_M_B_M, CRISV10F_SFMT_MOVS_M_B_M }, 94 1.1 christos { CRIS_INSN_MOVU_M_W_M, CRISV10F_INSN_MOVU_M_W_M, CRISV10F_SFMT_MOVS_M_W_M }, 95 1.1 christos { CRIS_INSN_MOVE_R_SPRV10, CRISV10F_INSN_MOVE_R_SPRV10, CRISV10F_SFMT_MOVE_R_SPRV10 }, 96 1.1 christos { CRIS_INSN_MOVE_SPR_RV10, CRISV10F_INSN_MOVE_SPR_RV10, CRISV10F_SFMT_MOVE_SPR_RV10 }, 97 1.1 christos { CRIS_INSN_RET_TYPE, CRISV10F_INSN_RET_TYPE, CRISV10F_SFMT_RET_TYPE }, 98 1.1 christos { CRIS_INSN_MOVE_M_SPRV10, CRISV10F_INSN_MOVE_M_SPRV10, CRISV10F_SFMT_MOVE_M_SPRV10 }, 99 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P5, CRISV10F_INSN_MOVE_C_SPRV10_P5, CRISV10F_SFMT_MOVE_C_SPRV10_P5 }, 100 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P9, CRISV10F_INSN_MOVE_C_SPRV10_P9, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 101 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P10, CRISV10F_INSN_MOVE_C_SPRV10_P10, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 102 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P11, CRISV10F_INSN_MOVE_C_SPRV10_P11, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 103 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P12, CRISV10F_INSN_MOVE_C_SPRV10_P12, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 104 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P13, CRISV10F_INSN_MOVE_C_SPRV10_P13, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 105 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P7, CRISV10F_INSN_MOVE_C_SPRV10_P7, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 106 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P14, CRISV10F_INSN_MOVE_C_SPRV10_P14, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 107 1.1 christos { CRIS_INSN_MOVE_C_SPRV10_P15, CRISV10F_INSN_MOVE_C_SPRV10_P15, CRISV10F_SFMT_MOVE_C_SPRV10_P9 }, 108 1.1 christos { CRIS_INSN_MOVE_SPR_MV10, CRISV10F_INSN_MOVE_SPR_MV10, CRISV10F_SFMT_MOVE_SPR_MV10 }, 109 1.1 christos { CRIS_INSN_SBFS, CRISV10F_INSN_SBFS, CRISV10F_SFMT_SBFS }, 110 1.1 christos { CRIS_INSN_MOVEM_R_M, CRISV10F_INSN_MOVEM_R_M, CRISV10F_SFMT_MOVEM_R_M }, 111 1.1 christos { CRIS_INSN_MOVEM_M_R, CRISV10F_INSN_MOVEM_M_R, CRISV10F_SFMT_MOVEM_M_R }, 112 1.1 christos { CRIS_INSN_MOVEM_M_PC, CRISV10F_INSN_MOVEM_M_PC, CRISV10F_SFMT_MOVEM_M_PC }, 113 1.1 christos { CRIS_INSN_ADD_B_R, CRISV10F_INSN_ADD_B_R, CRISV10F_SFMT_ADD_B_R }, 114 1.1 christos { CRIS_INSN_ADD_W_R, CRISV10F_INSN_ADD_W_R, CRISV10F_SFMT_ADD_B_R }, 115 1.1 christos { CRIS_INSN_ADD_D_R, CRISV10F_INSN_ADD_D_R, CRISV10F_SFMT_ADD_D_R }, 116 1.1 christos { CRIS_INSN_ADD_M_B_M, CRISV10F_INSN_ADD_M_B_M, CRISV10F_SFMT_ADD_M_B_M }, 117 1.1 christos { CRIS_INSN_ADD_M_W_M, CRISV10F_INSN_ADD_M_W_M, CRISV10F_SFMT_ADD_M_W_M }, 118 1.1 christos { CRIS_INSN_ADD_M_D_M, CRISV10F_INSN_ADD_M_D_M, CRISV10F_SFMT_ADD_M_D_M }, 119 1.1 christos { CRIS_INSN_ADDCBR, CRISV10F_INSN_ADDCBR, CRISV10F_SFMT_ADDCBR }, 120 1.1 christos { CRIS_INSN_ADDCWR, CRISV10F_INSN_ADDCWR, CRISV10F_SFMT_ADDCWR }, 121 1.1 christos { CRIS_INSN_ADDCDR, CRISV10F_INSN_ADDCDR, CRISV10F_SFMT_ADDCDR }, 122 1.1 christos { CRIS_INSN_ADDCPC, CRISV10F_INSN_ADDCPC, CRISV10F_SFMT_ADDCPC }, 123 1.1 christos { CRIS_INSN_ADDS_B_R, CRISV10F_INSN_ADDS_B_R, CRISV10F_SFMT_ADD_D_R }, 124 1.1 christos { CRIS_INSN_ADDS_W_R, CRISV10F_INSN_ADDS_W_R, CRISV10F_SFMT_ADD_D_R }, 125 1.1 christos { CRIS_INSN_ADDS_M_B_M, CRISV10F_INSN_ADDS_M_B_M, CRISV10F_SFMT_ADDS_M_B_M }, 126 1.1 christos { CRIS_INSN_ADDS_M_W_M, CRISV10F_INSN_ADDS_M_W_M, CRISV10F_SFMT_ADDS_M_W_M }, 127 1.1 christos { CRIS_INSN_ADDSCBR, CRISV10F_INSN_ADDSCBR, CRISV10F_SFMT_ADDSCBR }, 128 1.1 christos { CRIS_INSN_ADDSCWR, CRISV10F_INSN_ADDSCWR, CRISV10F_SFMT_ADDSCWR }, 129 1.1 christos { CRIS_INSN_ADDSPCPC, CRISV10F_INSN_ADDSPCPC, CRISV10F_SFMT_ADDSPCPC }, 130 1.1 christos { CRIS_INSN_ADDU_B_R, CRISV10F_INSN_ADDU_B_R, CRISV10F_SFMT_ADD_D_R }, 131 1.1 christos { CRIS_INSN_ADDU_W_R, CRISV10F_INSN_ADDU_W_R, CRISV10F_SFMT_ADD_D_R }, 132 1.1 christos { CRIS_INSN_ADDU_M_B_M, CRISV10F_INSN_ADDU_M_B_M, CRISV10F_SFMT_ADDS_M_B_M }, 133 1.1 christos { CRIS_INSN_ADDU_M_W_M, CRISV10F_INSN_ADDU_M_W_M, CRISV10F_SFMT_ADDS_M_W_M }, 134 1.1 christos { CRIS_INSN_ADDUCBR, CRISV10F_INSN_ADDUCBR, CRISV10F_SFMT_ADDSCBR }, 135 1.1 christos { CRIS_INSN_ADDUCWR, CRISV10F_INSN_ADDUCWR, CRISV10F_SFMT_ADDSCWR }, 136 1.1 christos { CRIS_INSN_SUB_B_R, CRISV10F_INSN_SUB_B_R, CRISV10F_SFMT_ADD_B_R }, 137 1.1 christos { CRIS_INSN_SUB_W_R, CRISV10F_INSN_SUB_W_R, CRISV10F_SFMT_ADD_B_R }, 138 1.1 christos { CRIS_INSN_SUB_D_R, CRISV10F_INSN_SUB_D_R, CRISV10F_SFMT_ADD_D_R }, 139 1.1 christos { CRIS_INSN_SUB_M_B_M, CRISV10F_INSN_SUB_M_B_M, CRISV10F_SFMT_ADD_M_B_M }, 140 1.1 christos { CRIS_INSN_SUB_M_W_M, CRISV10F_INSN_SUB_M_W_M, CRISV10F_SFMT_ADD_M_W_M }, 141 1.1 christos { CRIS_INSN_SUB_M_D_M, CRISV10F_INSN_SUB_M_D_M, CRISV10F_SFMT_ADD_M_D_M }, 142 1.1 christos { CRIS_INSN_SUBCBR, CRISV10F_INSN_SUBCBR, CRISV10F_SFMT_ADDCBR }, 143 1.1 christos { CRIS_INSN_SUBCWR, CRISV10F_INSN_SUBCWR, CRISV10F_SFMT_ADDCWR }, 144 1.1 christos { CRIS_INSN_SUBCDR, CRISV10F_INSN_SUBCDR, CRISV10F_SFMT_ADDCDR }, 145 1.1 christos { CRIS_INSN_SUBS_B_R, CRISV10F_INSN_SUBS_B_R, CRISV10F_SFMT_ADD_D_R }, 146 1.1 christos { CRIS_INSN_SUBS_W_R, CRISV10F_INSN_SUBS_W_R, CRISV10F_SFMT_ADD_D_R }, 147 1.1 christos { CRIS_INSN_SUBS_M_B_M, CRISV10F_INSN_SUBS_M_B_M, CRISV10F_SFMT_ADDS_M_B_M }, 148 1.1 christos { CRIS_INSN_SUBS_M_W_M, CRISV10F_INSN_SUBS_M_W_M, CRISV10F_SFMT_ADDS_M_W_M }, 149 1.1 christos { CRIS_INSN_SUBSCBR, CRISV10F_INSN_SUBSCBR, CRISV10F_SFMT_ADDSCBR }, 150 1.1 christos { CRIS_INSN_SUBSCWR, CRISV10F_INSN_SUBSCWR, CRISV10F_SFMT_ADDSCWR }, 151 1.1 christos { CRIS_INSN_SUBU_B_R, CRISV10F_INSN_SUBU_B_R, CRISV10F_SFMT_ADD_D_R }, 152 1.1 christos { CRIS_INSN_SUBU_W_R, CRISV10F_INSN_SUBU_W_R, CRISV10F_SFMT_ADD_D_R }, 153 1.1 christos { CRIS_INSN_SUBU_M_B_M, CRISV10F_INSN_SUBU_M_B_M, CRISV10F_SFMT_ADDS_M_B_M }, 154 1.1 christos { CRIS_INSN_SUBU_M_W_M, CRISV10F_INSN_SUBU_M_W_M, CRISV10F_SFMT_ADDS_M_W_M }, 155 1.1 christos { CRIS_INSN_SUBUCBR, CRISV10F_INSN_SUBUCBR, CRISV10F_SFMT_ADDSCBR }, 156 1.1 christos { CRIS_INSN_SUBUCWR, CRISV10F_INSN_SUBUCWR, CRISV10F_SFMT_ADDSCWR }, 157 1.1 christos { CRIS_INSN_ADDI_B_R, CRISV10F_INSN_ADDI_B_R, CRISV10F_SFMT_ADDI_B_R }, 158 1.1 christos { CRIS_INSN_ADDI_W_R, CRISV10F_INSN_ADDI_W_R, CRISV10F_SFMT_ADDI_B_R }, 159 1.1 christos { CRIS_INSN_ADDI_D_R, CRISV10F_INSN_ADDI_D_R, CRISV10F_SFMT_ADDI_B_R }, 160 1.1 christos { CRIS_INSN_NEG_B_R, CRISV10F_INSN_NEG_B_R, CRISV10F_SFMT_NEG_B_R }, 161 1.1 christos { CRIS_INSN_NEG_W_R, CRISV10F_INSN_NEG_W_R, CRISV10F_SFMT_NEG_B_R }, 162 1.1 christos { CRIS_INSN_NEG_D_R, CRISV10F_INSN_NEG_D_R, CRISV10F_SFMT_NEG_D_R }, 163 1.1 christos { CRIS_INSN_TEST_M_B_M, CRISV10F_INSN_TEST_M_B_M, CRISV10F_SFMT_TEST_M_B_M }, 164 1.1 christos { CRIS_INSN_TEST_M_W_M, CRISV10F_INSN_TEST_M_W_M, CRISV10F_SFMT_TEST_M_W_M }, 165 1.1 christos { CRIS_INSN_TEST_M_D_M, CRISV10F_INSN_TEST_M_D_M, CRISV10F_SFMT_TEST_M_D_M }, 166 1.1 christos { CRIS_INSN_MOVE_R_M_B_M, CRISV10F_INSN_MOVE_R_M_B_M, CRISV10F_SFMT_MOVE_R_M_B_M }, 167 1.1 christos { CRIS_INSN_MOVE_R_M_W_M, CRISV10F_INSN_MOVE_R_M_W_M, CRISV10F_SFMT_MOVE_R_M_W_M }, 168 1.1 christos { CRIS_INSN_MOVE_R_M_D_M, CRISV10F_INSN_MOVE_R_M_D_M, CRISV10F_SFMT_MOVE_R_M_D_M }, 169 1.1 christos { CRIS_INSN_MULS_B, CRISV10F_INSN_MULS_B, CRISV10F_SFMT_MULS_B }, 170 1.1 christos { CRIS_INSN_MULS_W, CRISV10F_INSN_MULS_W, CRISV10F_SFMT_MULS_B }, 171 1.1 christos { CRIS_INSN_MULS_D, CRISV10F_INSN_MULS_D, CRISV10F_SFMT_MULS_B }, 172 1.1 christos { CRIS_INSN_MULU_B, CRISV10F_INSN_MULU_B, CRISV10F_SFMT_MULS_B }, 173 1.1 christos { CRIS_INSN_MULU_W, CRISV10F_INSN_MULU_W, CRISV10F_SFMT_MULS_B }, 174 1.1 christos { CRIS_INSN_MULU_D, CRISV10F_INSN_MULU_D, CRISV10F_SFMT_MULS_B }, 175 1.1 christos { CRIS_INSN_MSTEP, CRISV10F_INSN_MSTEP, CRISV10F_SFMT_MSTEP }, 176 1.1 christos { CRIS_INSN_DSTEP, CRISV10F_INSN_DSTEP, CRISV10F_SFMT_DSTEP }, 177 1.1 christos { CRIS_INSN_ABS, CRISV10F_INSN_ABS, CRISV10F_SFMT_MOVS_B_R }, 178 1.1 christos { CRIS_INSN_AND_B_R, CRISV10F_INSN_AND_B_R, CRISV10F_SFMT_AND_B_R }, 179 1.1 christos { CRIS_INSN_AND_W_R, CRISV10F_INSN_AND_W_R, CRISV10F_SFMT_AND_B_R }, 180 1.1 christos { CRIS_INSN_AND_D_R, CRISV10F_INSN_AND_D_R, CRISV10F_SFMT_AND_D_R }, 181 1.1 christos { CRIS_INSN_AND_M_B_M, CRISV10F_INSN_AND_M_B_M, CRISV10F_SFMT_AND_M_B_M }, 182 1.1 christos { CRIS_INSN_AND_M_W_M, CRISV10F_INSN_AND_M_W_M, CRISV10F_SFMT_AND_M_W_M }, 183 1.1 christos { CRIS_INSN_AND_M_D_M, CRISV10F_INSN_AND_M_D_M, CRISV10F_SFMT_AND_M_D_M }, 184 1.1 christos { CRIS_INSN_ANDCBR, CRISV10F_INSN_ANDCBR, CRISV10F_SFMT_ANDCBR }, 185 1.1 christos { CRIS_INSN_ANDCWR, CRISV10F_INSN_ANDCWR, CRISV10F_SFMT_ANDCWR }, 186 1.1 christos { CRIS_INSN_ANDCDR, CRISV10F_INSN_ANDCDR, CRISV10F_SFMT_ANDCDR }, 187 1.1 christos { CRIS_INSN_ANDQ, CRISV10F_INSN_ANDQ, CRISV10F_SFMT_ANDQ }, 188 1.1 christos { CRIS_INSN_ORR_B_R, CRISV10F_INSN_ORR_B_R, CRISV10F_SFMT_AND_B_R }, 189 1.1 christos { CRIS_INSN_ORR_W_R, CRISV10F_INSN_ORR_W_R, CRISV10F_SFMT_AND_B_R }, 190 1.1 christos { CRIS_INSN_ORR_D_R, CRISV10F_INSN_ORR_D_R, CRISV10F_SFMT_AND_D_R }, 191 1.1 christos { CRIS_INSN_OR_M_B_M, CRISV10F_INSN_OR_M_B_M, CRISV10F_SFMT_AND_M_B_M }, 192 1.1 christos { CRIS_INSN_OR_M_W_M, CRISV10F_INSN_OR_M_W_M, CRISV10F_SFMT_AND_M_W_M }, 193 1.1 christos { CRIS_INSN_OR_M_D_M, CRISV10F_INSN_OR_M_D_M, CRISV10F_SFMT_AND_M_D_M }, 194 1.1 christos { CRIS_INSN_ORCBR, CRISV10F_INSN_ORCBR, CRISV10F_SFMT_ANDCBR }, 195 1.1 christos { CRIS_INSN_ORCWR, CRISV10F_INSN_ORCWR, CRISV10F_SFMT_ANDCWR }, 196 1.1 christos { CRIS_INSN_ORCDR, CRISV10F_INSN_ORCDR, CRISV10F_SFMT_ANDCDR }, 197 1.1 christos { CRIS_INSN_ORQ, CRISV10F_INSN_ORQ, CRISV10F_SFMT_ANDQ }, 198 1.1 christos { CRIS_INSN_XOR, CRISV10F_INSN_XOR, CRISV10F_SFMT_DSTEP }, 199 1.1 christos { CRIS_INSN_SWAP, CRISV10F_INSN_SWAP, CRISV10F_SFMT_SWAP }, 200 1.1 christos { CRIS_INSN_ASRR_B_R, CRISV10F_INSN_ASRR_B_R, CRISV10F_SFMT_AND_B_R }, 201 1.1 christos { CRIS_INSN_ASRR_W_R, CRISV10F_INSN_ASRR_W_R, CRISV10F_SFMT_AND_B_R }, 202 1.1 christos { CRIS_INSN_ASRR_D_R, CRISV10F_INSN_ASRR_D_R, CRISV10F_SFMT_AND_D_R }, 203 1.1 christos { CRIS_INSN_ASRQ, CRISV10F_INSN_ASRQ, CRISV10F_SFMT_ASRQ }, 204 1.1 christos { CRIS_INSN_LSRR_B_R, CRISV10F_INSN_LSRR_B_R, CRISV10F_SFMT_LSRR_B_R }, 205 1.1 christos { CRIS_INSN_LSRR_W_R, CRISV10F_INSN_LSRR_W_R, CRISV10F_SFMT_LSRR_B_R }, 206 1.1 christos { CRIS_INSN_LSRR_D_R, CRISV10F_INSN_LSRR_D_R, CRISV10F_SFMT_LSRR_D_R }, 207 1.1 christos { CRIS_INSN_LSRQ, CRISV10F_INSN_LSRQ, CRISV10F_SFMT_ASRQ }, 208 1.1 christos { CRIS_INSN_LSLR_B_R, CRISV10F_INSN_LSLR_B_R, CRISV10F_SFMT_LSRR_B_R }, 209 1.1 christos { CRIS_INSN_LSLR_W_R, CRISV10F_INSN_LSLR_W_R, CRISV10F_SFMT_LSRR_B_R }, 210 1.1 christos { CRIS_INSN_LSLR_D_R, CRISV10F_INSN_LSLR_D_R, CRISV10F_SFMT_LSRR_D_R }, 211 1.1 christos { CRIS_INSN_LSLQ, CRISV10F_INSN_LSLQ, CRISV10F_SFMT_ASRQ }, 212 1.1 christos { CRIS_INSN_BTST, CRISV10F_INSN_BTST, CRISV10F_SFMT_BTST }, 213 1.1 christos { CRIS_INSN_BTSTQ, CRISV10F_INSN_BTSTQ, CRISV10F_SFMT_BTSTQ }, 214 1.1 christos { CRIS_INSN_SETF, CRISV10F_INSN_SETF, CRISV10F_SFMT_SETF }, 215 1.1 christos { CRIS_INSN_CLEARF, CRISV10F_INSN_CLEARF, CRISV10F_SFMT_SETF }, 216 1.1 christos { CRIS_INSN_BCC_B, CRISV10F_INSN_BCC_B, CRISV10F_SFMT_BCC_B }, 217 1.1 christos { CRIS_INSN_BA_B, CRISV10F_INSN_BA_B, CRISV10F_SFMT_BA_B }, 218 1.1 christos { CRIS_INSN_BCC_W, CRISV10F_INSN_BCC_W, CRISV10F_SFMT_BCC_W }, 219 1.1 christos { CRIS_INSN_BA_W, CRISV10F_INSN_BA_W, CRISV10F_SFMT_BA_W }, 220 1.1 christos { CRIS_INSN_JUMP_R, CRISV10F_INSN_JUMP_R, CRISV10F_SFMT_JUMP_R }, 221 1.1 christos { CRIS_INSN_JUMP_M, CRISV10F_INSN_JUMP_M, CRISV10F_SFMT_JUMP_M }, 222 1.1 christos { CRIS_INSN_JUMP_C, CRISV10F_INSN_JUMP_C, CRISV10F_SFMT_JUMP_C }, 223 1.1 christos { CRIS_INSN_BREAK, CRISV10F_INSN_BREAK, CRISV10F_SFMT_BREAK }, 224 1.1 christos { CRIS_INSN_BOUND_R_B_R, CRISV10F_INSN_BOUND_R_B_R, CRISV10F_SFMT_DSTEP }, 225 1.1 christos { CRIS_INSN_BOUND_R_W_R, CRISV10F_INSN_BOUND_R_W_R, CRISV10F_SFMT_DSTEP }, 226 1.1 christos { CRIS_INSN_BOUND_R_D_R, CRISV10F_INSN_BOUND_R_D_R, CRISV10F_SFMT_DSTEP }, 227 1.1 christos { CRIS_INSN_BOUND_M_B_M, CRISV10F_INSN_BOUND_M_B_M, CRISV10F_SFMT_BOUND_M_B_M }, 228 1.1 christos { CRIS_INSN_BOUND_M_W_M, CRISV10F_INSN_BOUND_M_W_M, CRISV10F_SFMT_BOUND_M_W_M }, 229 1.1 christos { CRIS_INSN_BOUND_M_D_M, CRISV10F_INSN_BOUND_M_D_M, CRISV10F_SFMT_BOUND_M_D_M }, 230 1.1 christos { CRIS_INSN_BOUND_CB, CRISV10F_INSN_BOUND_CB, CRISV10F_SFMT_BOUND_CB }, 231 1.1 christos { CRIS_INSN_BOUND_CW, CRISV10F_INSN_BOUND_CW, CRISV10F_SFMT_BOUND_CW }, 232 1.1 christos { CRIS_INSN_BOUND_CD, CRISV10F_INSN_BOUND_CD, CRISV10F_SFMT_BOUND_CD }, 233 1.1 christos { CRIS_INSN_SCC, CRISV10F_INSN_SCC, CRISV10F_SFMT_SCC }, 234 1.1 christos { CRIS_INSN_LZ, CRISV10F_INSN_LZ, CRISV10F_SFMT_MOVS_B_R }, 235 1.1 christos { CRIS_INSN_ADDOQ, CRISV10F_INSN_ADDOQ, CRISV10F_SFMT_ADDOQ }, 236 1.1 christos { CRIS_INSN_BDAPQPC, CRISV10F_INSN_BDAPQPC, CRISV10F_SFMT_BDAPQPC }, 237 1.1 christos { CRIS_INSN_BDAP_32_PC, CRISV10F_INSN_BDAP_32_PC, CRISV10F_SFMT_BDAP_32_PC }, 238 1.1 christos { CRIS_INSN_MOVE_M_PCPLUS_P0, CRISV10F_INSN_MOVE_M_PCPLUS_P0, CRISV10F_SFMT_MOVE_M_PCPLUS_P0 }, 239 1.1 christos { CRIS_INSN_MOVE_M_SPPLUS_P8, CRISV10F_INSN_MOVE_M_SPPLUS_P8, CRISV10F_SFMT_MOVE_M_SPPLUS_P8 }, 240 1.1 christos { CRIS_INSN_ADDO_M_B_M, CRISV10F_INSN_ADDO_M_B_M, CRISV10F_SFMT_ADDO_M_B_M }, 241 1.1 christos { CRIS_INSN_ADDO_M_W_M, CRISV10F_INSN_ADDO_M_W_M, CRISV10F_SFMT_ADDO_M_W_M }, 242 1.1 christos { CRIS_INSN_ADDO_M_D_M, CRISV10F_INSN_ADDO_M_D_M, CRISV10F_SFMT_ADDO_M_D_M }, 243 1.1 christos { CRIS_INSN_ADDO_CB, CRISV10F_INSN_ADDO_CB, CRISV10F_SFMT_ADDO_CB }, 244 1.1 christos { CRIS_INSN_ADDO_CW, CRISV10F_INSN_ADDO_CW, CRISV10F_SFMT_ADDO_CW }, 245 1.1 christos { CRIS_INSN_ADDO_CD, CRISV10F_INSN_ADDO_CD, CRISV10F_SFMT_ADDO_CD }, 246 1.1 christos { CRIS_INSN_DIP_M, CRISV10F_INSN_DIP_M, CRISV10F_SFMT_DIP_M }, 247 1.1 christos { CRIS_INSN_DIP_C, CRISV10F_INSN_DIP_C, CRISV10F_SFMT_DIP_C }, 248 1.1 christos { CRIS_INSN_ADDI_ACR_B_R, CRISV10F_INSN_ADDI_ACR_B_R, CRISV10F_SFMT_ADDI_ACR_B_R }, 249 1.1 christos { CRIS_INSN_ADDI_ACR_W_R, CRISV10F_INSN_ADDI_ACR_W_R, CRISV10F_SFMT_ADDI_ACR_B_R }, 250 1.1 christos { CRIS_INSN_ADDI_ACR_D_R, CRISV10F_INSN_ADDI_ACR_D_R, CRISV10F_SFMT_ADDI_ACR_B_R }, 251 1.1 christos { CRIS_INSN_BIAP_PC_B_R, CRISV10F_INSN_BIAP_PC_B_R, CRISV10F_SFMT_BIAP_PC_B_R }, 252 1.1 christos { CRIS_INSN_BIAP_PC_W_R, CRISV10F_INSN_BIAP_PC_W_R, CRISV10F_SFMT_BIAP_PC_B_R }, 253 1.1 christos { CRIS_INSN_BIAP_PC_D_R, CRISV10F_INSN_BIAP_PC_D_R, CRISV10F_SFMT_BIAP_PC_B_R }, 254 1.1 christos }; 255 1.1 christos 256 1.1 christos static const struct insn_sem crisv10f_insn_sem_invalid = 257 1.1 christos { 258 1.1 christos VIRTUAL_INSN_X_INVALID, CRISV10F_INSN_X_INVALID, CRISV10F_SFMT_EMPTY 259 1.1 christos }; 260 1.1 christos 261 1.1 christos /* Initialize an IDESC from the compile-time computable parts. */ 262 1.1 christos 263 1.1 christos static INLINE void 264 1.1 christos init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t) 265 1.1 christos { 266 1.1 christos const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries; 267 1.1 christos 268 1.1 christos id->num = t->index; 269 1.1 christos id->sfmt = t->sfmt; 270 1.1 christos if ((int) t->type <= 0) 271 1.1 christos id->idata = & cgen_virtual_insn_table[- (int) t->type]; 272 1.1 christos else 273 1.1 christos id->idata = & insn_table[t->type]; 274 1.1 christos id->attrs = CGEN_INSN_ATTRS (id->idata); 275 1.1 christos /* Oh my god, a magic number. */ 276 1.1 christos id->length = CGEN_INSN_BITSIZE (id->idata) / 8; 277 1.1 christos 278 1.1 christos #if WITH_PROFILE_MODEL_P 279 1.1 christos id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index]; 280 1.1 christos { 281 1.1 christos SIM_DESC sd = CPU_STATE (cpu); 282 1.1 christos SIM_ASSERT (t->index == id->timing->num); 283 1.1 christos } 284 1.1 christos #endif 285 1.1 christos 286 1.1 christos /* Semantic pointers are initialized elsewhere. */ 287 1.1 christos } 288 1.1 christos 289 1.1 christos /* Initialize the instruction descriptor table. */ 290 1.1 christos 291 1.1 christos void 292 1.1 christos crisv10f_init_idesc_table (SIM_CPU *cpu) 293 1.1 christos { 294 1.1 christos IDESC *id,*tabend; 295 1.1 christos const struct insn_sem *t,*tend; 296 1.1 christos int tabsize = CRISV10F_INSN__MAX; 297 1.1 christos IDESC *table = crisv10f_insn_data; 298 1.1 christos 299 1.1 christos memset (table, 0, tabsize * sizeof (IDESC)); 300 1.1 christos 301 1.1 christos /* First set all entries to the `invalid insn'. */ 302 1.1 christos t = & crisv10f_insn_sem_invalid; 303 1.1 christos for (id = table, tabend = table + tabsize; id < tabend; ++id) 304 1.1 christos init_idesc (cpu, id, t); 305 1.1 christos 306 1.1 christos /* Now fill in the values for the chosen cpu. */ 307 1.7 christos for (t = crisv10f_insn_sem, tend = t + ARRAY_SIZE (crisv10f_insn_sem); 308 1.1 christos t != tend; ++t) 309 1.1 christos { 310 1.1 christos init_idesc (cpu, & table[t->index], t); 311 1.1 christos } 312 1.1 christos 313 1.1 christos /* Link the IDESC table into the cpu. */ 314 1.1 christos CPU_IDESC (cpu) = table; 315 1.1 christos } 316 1.1 christos 317 1.1 christos /* Given an instruction, return a pointer to its IDESC entry. */ 318 1.1 christos 319 1.1 christos const IDESC * 320 1.1 christos crisv10f_decode (SIM_CPU *current_cpu, IADDR pc, 321 1.1 christos CGEN_INSN_WORD base_insn, 322 1.1 christos ARGBUF *abuf) 323 1.1 christos { 324 1.1 christos /* Result of decoder. */ 325 1.1 christos CRISV10F_INSN_TYPE itype; 326 1.1 christos 327 1.1 christos { 328 1.1 christos CGEN_INSN_WORD insn = base_insn; 329 1.1 christos 330 1.1 christos { 331 1.11 christos unsigned int val0 = (((insn >> 4) & (255 << 0))); 332 1.11 christos switch (val0) 333 1.1 christos { 334 1.11 christos case 0: 335 1.11 christos case 1: 336 1.11 christos case 2: 337 1.11 christos case 3: 338 1.11 christos case 4: 339 1.11 christos case 5: 340 1.11 christos case 6: 341 1.11 christos case 7: 342 1.11 christos case 8: 343 1.11 christos case 9: 344 1.11 christos case 10: 345 1.11 christos case 11: 346 1.11 christos case 12: 347 1.11 christos case 13: 348 1.11 christos case 14: 349 1.11 christos case 15: 350 1.11 christos { 351 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 352 1.11 christos switch (val1) 353 1.11 christos { 354 1.11 christos case 0: 355 1.11 christos case 1: 356 1.11 christos case 2: 357 1.11 christos case 3: 358 1.11 christos case 4: 359 1.11 christos case 5: 360 1.11 christos case 6: 361 1.11 christos case 7: 362 1.11 christos case 8: 363 1.11 christos case 9: 364 1.11 christos case 10: 365 1.11 christos case 11: 366 1.11 christos case 12: 367 1.11 christos case 13: 368 1.11 christos case 15: itype = CRISV10F_INSN_BCC_B; goto extract_sfmt_bcc_b; 369 1.11 christos case 14: itype = CRISV10F_INSN_BA_B; goto extract_sfmt_ba_b; 370 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 371 1.11 christos } 372 1.11 christos } 373 1.11 christos case 16: 374 1.11 christos case 17: 375 1.11 christos case 18: 376 1.11 christos case 19: 377 1.11 christos case 20: 378 1.11 christos case 21: 379 1.11 christos case 22: 380 1.11 christos case 23: 381 1.11 christos case 24: 382 1.11 christos case 25: 383 1.11 christos case 26: 384 1.11 christos case 27: 385 1.11 christos case 28: 386 1.11 christos case 29: 387 1.11 christos case 30: 388 1.11 christos case 31: 389 1.11 christos { 390 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 391 1.11 christos switch (val1) 392 1.11 christos { 393 1.11 christos case 0: 394 1.11 christos case 1: 395 1.11 christos case 2: 396 1.11 christos case 3: 397 1.11 christos case 4: 398 1.11 christos case 5: 399 1.11 christos case 6: 400 1.11 christos case 7: 401 1.11 christos case 8: 402 1.11 christos case 9: 403 1.11 christos case 10: 404 1.11 christos case 11: 405 1.11 christos case 12: 406 1.11 christos case 13: 407 1.11 christos case 14: itype = CRISV10F_INSN_ADDOQ; goto extract_sfmt_addoq; 408 1.11 christos case 15: itype = CRISV10F_INSN_BDAPQPC; goto extract_sfmt_bdapqpc; 409 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 410 1.11 christos } 411 1.11 christos } 412 1.11 christos case 32: 413 1.11 christos case 33: 414 1.11 christos case 34: 415 1.11 christos case 35: itype = CRISV10F_INSN_ADDQ; goto extract_sfmt_addq; 416 1.11 christos case 36: 417 1.11 christos case 37: 418 1.11 christos case 38: 419 1.11 christos case 39: itype = CRISV10F_INSN_MOVEQ; goto extract_sfmt_moveq; 420 1.11 christos case 40: 421 1.11 christos case 41: 422 1.11 christos case 42: 423 1.11 christos case 43: itype = CRISV10F_INSN_SUBQ; goto extract_sfmt_addq; 424 1.11 christos case 44: 425 1.11 christos case 45: 426 1.11 christos case 46: 427 1.11 christos case 47: itype = CRISV10F_INSN_CMPQ; goto extract_sfmt_cmpq; 428 1.11 christos case 48: 429 1.11 christos case 49: 430 1.11 christos case 50: 431 1.11 christos case 51: itype = CRISV10F_INSN_ANDQ; goto extract_sfmt_andq; 432 1.11 christos case 52: 433 1.11 christos case 53: 434 1.11 christos case 54: 435 1.11 christos case 55: itype = CRISV10F_INSN_ORQ; goto extract_sfmt_andq; 436 1.11 christos case 56: 437 1.11 christos case 57: itype = CRISV10F_INSN_BTSTQ; goto extract_sfmt_btstq; 438 1.11 christos case 58: 439 1.11 christos case 59: itype = CRISV10F_INSN_ASRQ; goto extract_sfmt_asrq; 440 1.11 christos case 60: 441 1.11 christos case 61: itype = CRISV10F_INSN_LSLQ; goto extract_sfmt_asrq; 442 1.11 christos case 62: 443 1.11 christos case 63: itype = CRISV10F_INSN_LSRQ; goto extract_sfmt_asrq; 444 1.11 christos case 64: itype = CRISV10F_INSN_ADDU_B_R; goto extract_sfmt_add_d_r; 445 1.11 christos case 65: itype = CRISV10F_INSN_ADDU_W_R; goto extract_sfmt_add_d_r; 446 1.11 christos case 66: itype = CRISV10F_INSN_ADDS_B_R; goto extract_sfmt_add_d_r; 447 1.11 christos case 67: itype = CRISV10F_INSN_ADDS_W_R; goto extract_sfmt_add_d_r; 448 1.11 christos case 68: itype = CRISV10F_INSN_MOVU_B_R; goto extract_sfmt_movs_b_r; 449 1.11 christos case 69: itype = CRISV10F_INSN_MOVU_W_R; goto extract_sfmt_movs_b_r; 450 1.11 christos case 70: itype = CRISV10F_INSN_MOVS_B_R; goto extract_sfmt_movs_b_r; 451 1.11 christos case 71: itype = CRISV10F_INSN_MOVS_W_R; goto extract_sfmt_movs_b_r; 452 1.11 christos case 72: itype = CRISV10F_INSN_SUBU_B_R; goto extract_sfmt_add_d_r; 453 1.11 christos case 73: itype = CRISV10F_INSN_SUBU_W_R; goto extract_sfmt_add_d_r; 454 1.11 christos case 74: itype = CRISV10F_INSN_SUBS_B_R; goto extract_sfmt_add_d_r; 455 1.11 christos case 75: itype = CRISV10F_INSN_SUBS_W_R; goto extract_sfmt_add_d_r; 456 1.11 christos case 76: itype = CRISV10F_INSN_LSLR_B_R; goto extract_sfmt_lsrr_b_r; 457 1.11 christos case 77: itype = CRISV10F_INSN_LSLR_W_R; goto extract_sfmt_lsrr_b_r; 458 1.11 christos case 78: itype = CRISV10F_INSN_LSLR_D_R; goto extract_sfmt_lsrr_d_r; 459 1.11 christos case 79: itype = CRISV10F_INSN_BTST; goto extract_sfmt_btst; 460 1.11 christos case 80: 461 1.11 christos { 462 1.11 christos unsigned int val1 = (((insn >> 8) & (7 << 4)) | ((insn >> 0) & (15 << 0))); 463 1.11 christos switch (val1) 464 1.11 christos { 465 1.11 christos case 0: 466 1.11 christos case 1: 467 1.11 christos case 2: 468 1.11 christos case 3: 469 1.11 christos case 4: 470 1.11 christos case 5: 471 1.11 christos case 6: 472 1.11 christos case 7: 473 1.11 christos case 8: 474 1.11 christos case 9: 475 1.11 christos case 10: 476 1.11 christos case 11: 477 1.11 christos case 12: 478 1.11 christos case 13: 479 1.11 christos case 14: 480 1.11 christos case 16: 481 1.11 christos case 17: 482 1.11 christos case 18: 483 1.11 christos case 19: 484 1.11 christos case 20: 485 1.11 christos case 21: 486 1.11 christos case 22: 487 1.11 christos case 23: 488 1.11 christos case 24: 489 1.11 christos case 25: 490 1.11 christos case 26: 491 1.11 christos case 27: 492 1.11 christos case 28: 493 1.11 christos case 29: 494 1.11 christos case 30: 495 1.11 christos case 31: 496 1.11 christos case 32: 497 1.11 christos case 33: 498 1.11 christos case 34: 499 1.11 christos case 35: 500 1.11 christos case 36: 501 1.11 christos case 37: 502 1.11 christos case 38: 503 1.11 christos case 39: 504 1.11 christos case 40: 505 1.11 christos case 41: 506 1.11 christos case 42: 507 1.11 christos case 43: 508 1.11 christos case 44: 509 1.11 christos case 45: 510 1.11 christos case 46: 511 1.11 christos case 47: 512 1.11 christos case 48: 513 1.11 christos case 49: 514 1.11 christos case 50: 515 1.11 christos case 51: 516 1.11 christos case 52: 517 1.11 christos case 53: 518 1.11 christos case 54: 519 1.11 christos case 55: 520 1.11 christos case 56: 521 1.11 christos case 57: 522 1.11 christos case 58: 523 1.11 christos case 59: 524 1.11 christos case 60: 525 1.11 christos case 61: 526 1.11 christos case 62: 527 1.11 christos case 63: 528 1.11 christos case 64: 529 1.11 christos case 65: 530 1.11 christos case 66: 531 1.11 christos case 67: 532 1.11 christos case 68: 533 1.11 christos case 69: 534 1.11 christos case 70: 535 1.11 christos case 71: 536 1.11 christos case 72: 537 1.11 christos case 73: 538 1.11 christos case 74: 539 1.11 christos case 75: 540 1.11 christos case 76: 541 1.11 christos case 77: 542 1.11 christos case 78: 543 1.11 christos case 79: 544 1.11 christos case 80: 545 1.11 christos case 81: 546 1.11 christos case 82: 547 1.11 christos case 83: 548 1.11 christos case 84: 549 1.11 christos case 85: 550 1.11 christos case 86: 551 1.11 christos case 87: 552 1.11 christos case 88: 553 1.11 christos case 89: 554 1.11 christos case 90: 555 1.11 christos case 91: 556 1.11 christos case 92: 557 1.11 christos case 93: 558 1.11 christos case 94: 559 1.11 christos case 95: 560 1.11 christos case 96: 561 1.11 christos case 97: 562 1.11 christos case 98: 563 1.11 christos case 99: 564 1.11 christos case 100: 565 1.11 christos case 101: 566 1.11 christos case 102: 567 1.11 christos case 103: 568 1.11 christos case 104: 569 1.11 christos case 105: 570 1.11 christos case 106: 571 1.11 christos case 107: 572 1.11 christos case 108: 573 1.11 christos case 109: 574 1.11 christos case 110: 575 1.11 christos case 111: 576 1.11 christos case 112: 577 1.11 christos case 113: 578 1.11 christos case 114: 579 1.11 christos case 115: 580 1.11 christos case 116: 581 1.11 christos case 117: 582 1.11 christos case 118: 583 1.11 christos case 119: 584 1.11 christos case 120: 585 1.11 christos case 121: 586 1.11 christos case 122: 587 1.11 christos case 123: 588 1.11 christos case 124: 589 1.11 christos case 125: 590 1.11 christos case 126: 591 1.11 christos case 127: itype = CRISV10F_INSN_ADDI_B_R; goto extract_sfmt_addi_b_r; 592 1.11 christos case 15: 593 1.1 christos { 594 1.11 christos unsigned int val2 = (((insn >> 15) & (1 << 0))); 595 1.11 christos switch (val2) 596 1.1 christos { 597 1.11 christos case 0: itype = CRISV10F_INSN_NOP; goto extract_sfmt_nop; 598 1.11 christos case 1: itype = CRISV10F_INSN_ADDI_B_R; goto extract_sfmt_addi_b_r; 599 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 600 1.1 christos } 601 1.1 christos } 602 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 603 1.1 christos } 604 1.1 christos } 605 1.11 christos case 81: itype = CRISV10F_INSN_ADDI_W_R; goto extract_sfmt_addi_b_r; 606 1.11 christos case 82: itype = CRISV10F_INSN_ADDI_D_R; goto extract_sfmt_addi_b_r; 607 1.11 christos case 83: itype = CRISV10F_INSN_SCC; goto extract_sfmt_scc; 608 1.11 christos case 84: 609 1.11 christos { 610 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 611 1.11 christos switch (val1) 612 1.11 christos { 613 1.11 christos case 0: 614 1.11 christos case 1: 615 1.11 christos case 2: 616 1.11 christos case 3: 617 1.11 christos case 4: 618 1.11 christos case 5: 619 1.11 christos case 6: 620 1.11 christos case 7: 621 1.11 christos case 8: 622 1.11 christos case 9: 623 1.11 christos case 10: 624 1.11 christos case 11: 625 1.11 christos case 12: 626 1.11 christos case 13: 627 1.11 christos case 14: itype = CRISV10F_INSN_ADDI_ACR_B_R; goto extract_sfmt_addi_acr_b_r; 628 1.11 christos case 15: itype = CRISV10F_INSN_BIAP_PC_B_R; goto extract_sfmt_biap_pc_b_r; 629 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 630 1.11 christos } 631 1.11 christos } 632 1.11 christos case 85: 633 1.11 christos { 634 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 635 1.11 christos switch (val1) 636 1.11 christos { 637 1.11 christos case 0: 638 1.11 christos case 1: 639 1.11 christos case 2: 640 1.11 christos case 3: 641 1.11 christos case 4: 642 1.11 christos case 5: 643 1.11 christos case 6: 644 1.11 christos case 7: 645 1.11 christos case 8: 646 1.11 christos case 9: 647 1.11 christos case 10: 648 1.11 christos case 11: 649 1.11 christos case 12: 650 1.11 christos case 13: 651 1.11 christos case 14: itype = CRISV10F_INSN_ADDI_ACR_W_R; goto extract_sfmt_addi_acr_b_r; 652 1.11 christos case 15: itype = CRISV10F_INSN_BIAP_PC_W_R; goto extract_sfmt_biap_pc_b_r; 653 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 654 1.11 christos } 655 1.11 christos } 656 1.11 christos case 86: 657 1.11 christos { 658 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 659 1.11 christos switch (val1) 660 1.11 christos { 661 1.11 christos case 0: 662 1.11 christos case 1: 663 1.11 christos case 2: 664 1.11 christos case 3: 665 1.11 christos case 4: 666 1.11 christos case 5: 667 1.11 christos case 6: 668 1.11 christos case 7: 669 1.11 christos case 8: 670 1.11 christos case 9: 671 1.11 christos case 10: 672 1.11 christos case 11: 673 1.11 christos case 12: 674 1.11 christos case 13: 675 1.11 christos case 14: itype = CRISV10F_INSN_ADDI_ACR_D_R; goto extract_sfmt_addi_acr_b_r; 676 1.11 christos case 15: itype = CRISV10F_INSN_BIAP_PC_D_R; goto extract_sfmt_biap_pc_b_r; 677 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 678 1.11 christos } 679 1.11 christos } 680 1.11 christos case 88: itype = CRISV10F_INSN_NEG_B_R; goto extract_sfmt_neg_b_r; 681 1.11 christos case 89: itype = CRISV10F_INSN_NEG_W_R; goto extract_sfmt_neg_b_r; 682 1.11 christos case 90: itype = CRISV10F_INSN_NEG_D_R; goto extract_sfmt_neg_d_r; 683 1.11 christos case 91: itype = CRISV10F_INSN_SETF; goto extract_sfmt_setf; 684 1.11 christos case 92: itype = CRISV10F_INSN_BOUND_R_B_R; goto extract_sfmt_dstep; 685 1.11 christos case 93: itype = CRISV10F_INSN_BOUND_R_W_R; goto extract_sfmt_dstep; 686 1.11 christos case 94: itype = CRISV10F_INSN_BOUND_R_D_R; goto extract_sfmt_dstep; 687 1.11 christos case 95: itype = CRISV10F_INSN_CLEARF; goto extract_sfmt_setf; 688 1.11 christos case 96: itype = CRISV10F_INSN_ADD_B_R; goto extract_sfmt_add_b_r; 689 1.11 christos case 97: itype = CRISV10F_INSN_ADD_W_R; goto extract_sfmt_add_b_r; 690 1.11 christos case 98: itype = CRISV10F_INSN_ADD_D_R; goto extract_sfmt_add_d_r; 691 1.11 christos case 99: itype = CRISV10F_INSN_MOVE_R_SPRV10; goto extract_sfmt_move_r_sprv10; 692 1.11 christos case 100: itype = CRISV10F_INSN_MOVE_B_R; goto extract_sfmt_move_b_r; 693 1.11 christos case 101: itype = CRISV10F_INSN_MOVE_W_R; goto extract_sfmt_move_b_r; 694 1.11 christos case 102: 695 1.11 christos { 696 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 697 1.11 christos switch (val1) 698 1.11 christos { 699 1.11 christos case 0: 700 1.11 christos case 1: 701 1.11 christos case 2: 702 1.11 christos case 3: 703 1.11 christos case 4: 704 1.11 christos case 5: 705 1.11 christos case 6: 706 1.11 christos case 7: 707 1.11 christos case 8: 708 1.11 christos case 9: 709 1.11 christos case 10: 710 1.11 christos case 11: 711 1.11 christos case 12: 712 1.11 christos case 13: 713 1.11 christos case 14: itype = CRISV10F_INSN_MOVE_D_R; goto extract_sfmt_move_d_r; 714 1.11 christos case 15: itype = CRISV10F_INSN_MOVEPCR; goto extract_sfmt_movepcr; 715 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 716 1.11 christos } 717 1.11 christos } 718 1.11 christos case 103: 719 1.11 christos { 720 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 721 1.11 christos switch (val1) 722 1.11 christos { 723 1.11 christos case 0: 724 1.11 christos case 1: 725 1.11 christos case 2: 726 1.11 christos case 3: 727 1.11 christos case 4: 728 1.11 christos case 5: 729 1.11 christos case 6: 730 1.11 christos case 7: 731 1.11 christos case 8: 732 1.11 christos case 9: 733 1.11 christos case 10: 734 1.11 christos case 11: 735 1.11 christos case 12: 736 1.11 christos case 13: 737 1.11 christos case 14: itype = CRISV10F_INSN_MOVE_SPR_RV10; goto extract_sfmt_move_spr_rv10; 738 1.11 christos case 15: itype = CRISV10F_INSN_RET_TYPE; goto extract_sfmt_ret_type; 739 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 740 1.11 christos } 741 1.11 christos } 742 1.11 christos case 104: itype = CRISV10F_INSN_SUB_B_R; goto extract_sfmt_add_b_r; 743 1.11 christos case 105: itype = CRISV10F_INSN_SUB_W_R; goto extract_sfmt_add_b_r; 744 1.11 christos case 106: itype = CRISV10F_INSN_SUB_D_R; goto extract_sfmt_add_d_r; 745 1.11 christos case 107: itype = CRISV10F_INSN_ABS; goto extract_sfmt_movs_b_r; 746 1.11 christos case 108: itype = CRISV10F_INSN_CMP_R_B_R; goto extract_sfmt_cmp_r_b_r; 747 1.11 christos case 109: itype = CRISV10F_INSN_CMP_R_W_R; goto extract_sfmt_cmp_r_b_r; 748 1.11 christos case 110: itype = CRISV10F_INSN_CMP_R_D_R; goto extract_sfmt_cmp_r_b_r; 749 1.11 christos case 111: itype = CRISV10F_INSN_DSTEP; goto extract_sfmt_dstep; 750 1.11 christos case 112: itype = CRISV10F_INSN_AND_B_R; goto extract_sfmt_and_b_r; 751 1.11 christos case 113: itype = CRISV10F_INSN_AND_W_R; goto extract_sfmt_and_b_r; 752 1.11 christos case 114: itype = CRISV10F_INSN_AND_D_R; goto extract_sfmt_and_d_r; 753 1.11 christos case 115: itype = CRISV10F_INSN_LZ; goto extract_sfmt_movs_b_r; 754 1.11 christos case 116: itype = CRISV10F_INSN_ORR_B_R; goto extract_sfmt_and_b_r; 755 1.11 christos case 117: itype = CRISV10F_INSN_ORR_W_R; goto extract_sfmt_and_b_r; 756 1.11 christos case 118: itype = CRISV10F_INSN_ORR_D_R; goto extract_sfmt_and_d_r; 757 1.11 christos case 119: itype = CRISV10F_INSN_SWAP; goto extract_sfmt_swap; 758 1.11 christos case 120: itype = CRISV10F_INSN_ASRR_B_R; goto extract_sfmt_and_b_r; 759 1.11 christos case 121: itype = CRISV10F_INSN_ASRR_W_R; goto extract_sfmt_and_b_r; 760 1.11 christos case 122: itype = CRISV10F_INSN_ASRR_D_R; goto extract_sfmt_and_d_r; 761 1.11 christos case 123: itype = CRISV10F_INSN_XOR; goto extract_sfmt_dstep; 762 1.11 christos case 124: itype = CRISV10F_INSN_LSRR_B_R; goto extract_sfmt_lsrr_b_r; 763 1.11 christos case 125: itype = CRISV10F_INSN_LSRR_W_R; goto extract_sfmt_lsrr_b_r; 764 1.11 christos case 126: itype = CRISV10F_INSN_LSRR_D_R; goto extract_sfmt_lsrr_d_r; 765 1.11 christos case 127: itype = CRISV10F_INSN_MSTEP; goto extract_sfmt_mstep; 766 1.11 christos case 128: itype = CRISV10F_INSN_ADDU_M_B_M; goto extract_sfmt_adds_m_b_m; 767 1.11 christos case 129: itype = CRISV10F_INSN_ADDU_M_W_M; goto extract_sfmt_adds_m_w_m; 768 1.11 christos case 130: itype = CRISV10F_INSN_ADDS_M_B_M; goto extract_sfmt_adds_m_b_m; 769 1.11 christos case 131: 770 1.11 christos { 771 1.11 christos unsigned int val1 = (((insn >> 8) & (7 << 4)) | ((insn >> 0) & (15 << 0))); 772 1.11 christos switch (val1) 773 1.11 christos { 774 1.11 christos case 0: 775 1.11 christos case 1: 776 1.11 christos case 2: 777 1.11 christos case 3: 778 1.11 christos case 4: 779 1.11 christos case 5: 780 1.11 christos case 6: 781 1.11 christos case 7: 782 1.11 christos case 8: 783 1.11 christos case 9: 784 1.11 christos case 10: 785 1.11 christos case 11: 786 1.11 christos case 12: 787 1.11 christos case 13: 788 1.11 christos case 14: 789 1.11 christos case 15: 790 1.11 christos case 16: 791 1.11 christos case 17: 792 1.11 christos case 18: 793 1.11 christos case 19: 794 1.11 christos case 20: 795 1.11 christos case 21: 796 1.11 christos case 22: 797 1.11 christos case 23: 798 1.11 christos case 24: 799 1.11 christos case 25: 800 1.11 christos case 26: 801 1.11 christos case 27: 802 1.11 christos case 28: 803 1.11 christos case 29: 804 1.11 christos case 30: 805 1.11 christos case 31: 806 1.11 christos case 32: 807 1.11 christos case 33: 808 1.11 christos case 34: 809 1.11 christos case 35: 810 1.11 christos case 36: 811 1.11 christos case 37: 812 1.11 christos case 38: 813 1.11 christos case 39: 814 1.11 christos case 40: 815 1.11 christos case 41: 816 1.11 christos case 42: 817 1.11 christos case 43: 818 1.11 christos case 44: 819 1.11 christos case 45: 820 1.11 christos case 46: 821 1.11 christos case 47: 822 1.11 christos case 48: 823 1.11 christos case 49: 824 1.11 christos case 50: 825 1.11 christos case 51: 826 1.11 christos case 52: 827 1.11 christos case 53: 828 1.11 christos case 54: 829 1.11 christos case 55: 830 1.11 christos case 56: 831 1.11 christos case 57: 832 1.11 christos case 58: 833 1.11 christos case 59: 834 1.11 christos case 60: 835 1.11 christos case 61: 836 1.11 christos case 62: 837 1.11 christos case 63: 838 1.11 christos case 64: 839 1.11 christos case 65: 840 1.11 christos case 66: 841 1.11 christos case 67: 842 1.11 christos case 68: 843 1.11 christos case 69: 844 1.11 christos case 70: 845 1.11 christos case 71: 846 1.11 christos case 72: 847 1.11 christos case 73: 848 1.11 christos case 74: 849 1.11 christos case 75: 850 1.11 christos case 76: 851 1.11 christos case 77: 852 1.11 christos case 78: 853 1.11 christos case 79: 854 1.11 christos case 80: 855 1.11 christos case 81: 856 1.11 christos case 82: 857 1.11 christos case 83: 858 1.11 christos case 84: 859 1.11 christos case 85: 860 1.11 christos case 86: 861 1.11 christos case 87: 862 1.11 christos case 88: 863 1.11 christos case 89: 864 1.11 christos case 90: 865 1.11 christos case 91: 866 1.11 christos case 92: 867 1.11 christos case 93: 868 1.11 christos case 94: 869 1.11 christos case 95: 870 1.11 christos case 96: 871 1.11 christos case 97: 872 1.11 christos case 98: 873 1.11 christos case 99: 874 1.11 christos case 100: 875 1.11 christos case 101: 876 1.11 christos case 102: 877 1.11 christos case 103: 878 1.11 christos case 104: 879 1.11 christos case 105: 880 1.11 christos case 106: 881 1.11 christos case 107: 882 1.11 christos case 108: 883 1.11 christos case 109: 884 1.11 christos case 110: 885 1.11 christos case 111: 886 1.11 christos case 112: 887 1.11 christos case 113: 888 1.11 christos case 114: 889 1.11 christos case 115: 890 1.11 christos case 116: 891 1.11 christos case 117: 892 1.11 christos case 118: 893 1.11 christos case 119: 894 1.11 christos case 120: 895 1.11 christos case 121: 896 1.11 christos case 122: 897 1.11 christos case 123: 898 1.11 christos case 124: 899 1.11 christos case 125: 900 1.11 christos case 126: itype = CRISV10F_INSN_ADDS_M_W_M; goto extract_sfmt_adds_m_w_m; 901 1.11 christos case 127: 902 1.1 christos { 903 1.11 christos unsigned int val2 = (((insn >> 15) & (1 << 0))); 904 1.11 christos switch (val2) 905 1.1 christos { 906 1.11 christos case 0: itype = CRISV10F_INSN_ADDS_M_W_M; goto extract_sfmt_adds_m_w_m; 907 1.11 christos case 1: itype = CRISV10F_INSN_ADDSPCPC; goto extract_sfmt_addspcpc; 908 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 909 1.1 christos } 910 1.1 christos } 911 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 912 1.1 christos } 913 1.1 christos } 914 1.11 christos case 132: itype = CRISV10F_INSN_MOVU_M_B_M; goto extract_sfmt_movs_m_b_m; 915 1.11 christos case 133: itype = CRISV10F_INSN_MOVU_M_W_M; goto extract_sfmt_movs_m_w_m; 916 1.11 christos case 134: itype = CRISV10F_INSN_MOVS_M_B_M; goto extract_sfmt_movs_m_b_m; 917 1.11 christos case 135: itype = CRISV10F_INSN_MOVS_M_W_M; goto extract_sfmt_movs_m_w_m; 918 1.11 christos case 136: itype = CRISV10F_INSN_SUBU_M_B_M; goto extract_sfmt_adds_m_b_m; 919 1.11 christos case 137: itype = CRISV10F_INSN_SUBU_M_W_M; goto extract_sfmt_adds_m_w_m; 920 1.11 christos case 138: itype = CRISV10F_INSN_SUBS_M_B_M; goto extract_sfmt_adds_m_b_m; 921 1.11 christos case 139: itype = CRISV10F_INSN_SUBS_M_W_M; goto extract_sfmt_adds_m_w_m; 922 1.11 christos case 140: itype = CRISV10F_INSN_CMPU_M_B_M; goto extract_sfmt_cmp_m_b_m; 923 1.11 christos case 141: itype = CRISV10F_INSN_CMPU_M_W_M; goto extract_sfmt_cmp_m_w_m; 924 1.11 christos case 142: itype = CRISV10F_INSN_CMPS_M_B_M; goto extract_sfmt_cmp_m_b_m; 925 1.11 christos case 143: itype = CRISV10F_INSN_CMPS_M_W_M; goto extract_sfmt_cmp_m_w_m; 926 1.11 christos case 144: itype = CRISV10F_INSN_MULU_B; goto extract_sfmt_muls_b; 927 1.11 christos case 145: itype = CRISV10F_INSN_MULU_W; goto extract_sfmt_muls_b; 928 1.11 christos case 146: itype = CRISV10F_INSN_MULU_D; goto extract_sfmt_muls_b; 929 1.11 christos case 147: 930 1.11 christos { 931 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 932 1.11 christos switch (val1) 933 1.11 christos { 934 1.11 christos case 0: 935 1.11 christos case 1: 936 1.11 christos case 2: 937 1.11 christos case 3: 938 1.11 christos case 4: 939 1.11 christos case 5: 940 1.11 christos case 6: 941 1.11 christos case 7: 942 1.11 christos case 8: 943 1.11 christos case 9: 944 1.11 christos case 10: 945 1.11 christos case 11: 946 1.11 christos case 12: 947 1.11 christos case 13: 948 1.11 christos case 15: itype = CRISV10F_INSN_JUMP_M; goto extract_sfmt_jump_m; 949 1.11 christos case 14: itype = CRISV10F_INSN_BREAK; goto extract_sfmt_break; 950 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 951 1.11 christos } 952 1.11 christos } 953 1.11 christos case 148: itype = CRISV10F_INSN_ADDO_M_B_M; goto extract_sfmt_addo_m_b_m; 954 1.11 christos case 149: itype = CRISV10F_INSN_ADDO_M_W_M; goto extract_sfmt_addo_m_w_m; 955 1.11 christos case 150: itype = CRISV10F_INSN_ADDO_M_D_M; goto extract_sfmt_addo_m_d_m; 956 1.11 christos case 151: 957 1.1 christos if ((base_insn & 0xfbf0) == 0x970) 958 1.1 christos { itype = CRISV10F_INSN_DIP_M; goto extract_sfmt_dip_m; } 959 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 960 1.11 christos case 155: itype = CRISV10F_INSN_JUMP_R; goto extract_sfmt_jump_r; 961 1.11 christos case 156: itype = CRISV10F_INSN_BOUND_M_B_M; goto extract_sfmt_bound_m_b_m; 962 1.11 christos case 157: itype = CRISV10F_INSN_BOUND_M_W_M; goto extract_sfmt_bound_m_w_m; 963 1.11 christos case 158: itype = CRISV10F_INSN_BOUND_M_D_M; goto extract_sfmt_bound_m_d_m; 964 1.11 christos case 160: itype = CRISV10F_INSN_ADD_M_B_M; goto extract_sfmt_add_m_b_m; 965 1.11 christos case 161: itype = CRISV10F_INSN_ADD_M_W_M; goto extract_sfmt_add_m_w_m; 966 1.11 christos case 162: itype = CRISV10F_INSN_ADD_M_D_M; goto extract_sfmt_add_m_d_m; 967 1.11 christos case 163: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 968 1.11 christos case 164: itype = CRISV10F_INSN_MOVE_M_B_M; goto extract_sfmt_move_m_b_m; 969 1.11 christos case 165: itype = CRISV10F_INSN_MOVE_M_W_M; goto extract_sfmt_move_m_w_m; 970 1.11 christos case 166: itype = CRISV10F_INSN_MOVE_M_D_M; goto extract_sfmt_move_m_d_m; 971 1.11 christos case 167: 972 1.11 christos case 231: itype = CRISV10F_INSN_MOVE_SPR_MV10; goto extract_sfmt_move_spr_mv10; 973 1.11 christos case 168: itype = CRISV10F_INSN_SUB_M_B_M; goto extract_sfmt_add_m_b_m; 974 1.11 christos case 169: itype = CRISV10F_INSN_SUB_M_W_M; goto extract_sfmt_add_m_w_m; 975 1.11 christos case 170: itype = CRISV10F_INSN_SUB_M_D_M; goto extract_sfmt_add_m_d_m; 976 1.11 christos case 172: itype = CRISV10F_INSN_CMP_M_B_M; goto extract_sfmt_cmp_m_b_m; 977 1.11 christos case 173: itype = CRISV10F_INSN_CMP_M_W_M; goto extract_sfmt_cmp_m_w_m; 978 1.11 christos case 174: itype = CRISV10F_INSN_CMP_M_D_M; goto extract_sfmt_cmp_m_d_m; 979 1.11 christos case 176: itype = CRISV10F_INSN_AND_M_B_M; goto extract_sfmt_and_m_b_m; 980 1.11 christos case 177: itype = CRISV10F_INSN_AND_M_W_M; goto extract_sfmt_and_m_w_m; 981 1.11 christos case 178: itype = CRISV10F_INSN_AND_M_D_M; goto extract_sfmt_and_m_d_m; 982 1.11 christos case 180: itype = CRISV10F_INSN_OR_M_B_M; goto extract_sfmt_and_m_b_m; 983 1.11 christos case 181: itype = CRISV10F_INSN_OR_M_W_M; goto extract_sfmt_and_m_w_m; 984 1.11 christos case 182: itype = CRISV10F_INSN_OR_M_D_M; goto extract_sfmt_and_m_d_m; 985 1.11 christos case 183: 986 1.11 christos case 247: 987 1.1 christos if ((base_insn & 0xfbf0) == 0x3b70) 988 1.1 christos { itype = CRISV10F_INSN_SBFS; goto extract_sfmt_sbfs; } 989 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 990 1.11 christos case 184: 991 1.11 christos case 248: 992 1.1 christos if ((base_insn & 0xfbf0) == 0xb80) 993 1.1 christos { itype = CRISV10F_INSN_TEST_M_B_M; goto extract_sfmt_test_m_b_m; } 994 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 995 1.11 christos case 185: 996 1.11 christos case 249: 997 1.1 christos if ((base_insn & 0xfbf0) == 0xb90) 998 1.1 christos { itype = CRISV10F_INSN_TEST_M_W_M; goto extract_sfmt_test_m_w_m; } 999 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1000 1.11 christos case 186: 1001 1.11 christos case 250: 1002 1.1 christos if ((base_insn & 0xfbf0) == 0xba0) 1003 1.1 christos { itype = CRISV10F_INSN_TEST_M_D_M; goto extract_sfmt_test_m_d_m; } 1004 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1005 1.11 christos case 187: 1006 1.11 christos case 251: 1007 1.1 christos { 1008 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 1009 1.11 christos switch (val1) 1010 1.1 christos { 1011 1.11 christos case 0: 1012 1.11 christos case 1: 1013 1.11 christos case 2: 1014 1.11 christos case 3: 1015 1.11 christos case 4: 1016 1.11 christos case 5: 1017 1.11 christos case 6: 1018 1.11 christos case 7: 1019 1.11 christos case 8: 1020 1.11 christos case 9: 1021 1.11 christos case 10: 1022 1.11 christos case 11: 1023 1.11 christos case 12: 1024 1.11 christos case 13: 1025 1.11 christos case 14: itype = CRISV10F_INSN_MOVEM_M_R; goto extract_sfmt_movem_m_r; 1026 1.11 christos case 15: itype = CRISV10F_INSN_MOVEM_M_PC; goto extract_sfmt_movem_m_pc; 1027 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1028 1.11 christos } 1029 1.11 christos } 1030 1.11 christos case 188: 1031 1.11 christos case 252: itype = CRISV10F_INSN_MOVE_R_M_B_M; goto extract_sfmt_move_r_m_b_m; 1032 1.11 christos case 189: 1033 1.11 christos case 253: itype = CRISV10F_INSN_MOVE_R_M_W_M; goto extract_sfmt_move_r_m_w_m; 1034 1.11 christos case 190: 1035 1.11 christos case 254: itype = CRISV10F_INSN_MOVE_R_M_D_M; goto extract_sfmt_move_r_m_d_m; 1036 1.11 christos case 191: 1037 1.11 christos case 255: itype = CRISV10F_INSN_MOVEM_R_M; goto extract_sfmt_movem_r_m; 1038 1.11 christos case 192: 1039 1.11 christos { 1040 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1041 1.11 christos switch (val1) 1042 1.11 christos { 1043 1.11 christos case 0: 1044 1.11 christos case 1: 1045 1.11 christos case 2: 1046 1.11 christos case 3: 1047 1.11 christos case 4: 1048 1.11 christos case 5: 1049 1.11 christos case 6: 1050 1.11 christos case 7: 1051 1.11 christos case 8: 1052 1.11 christos case 9: 1053 1.11 christos case 10: 1054 1.11 christos case 11: 1055 1.11 christos case 12: 1056 1.11 christos case 13: 1057 1.11 christos case 14: itype = CRISV10F_INSN_ADDU_M_B_M; goto extract_sfmt_adds_m_b_m; 1058 1.11 christos case 15: itype = CRISV10F_INSN_ADDUCBR; goto extract_sfmt_addscbr; 1059 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1060 1.11 christos } 1061 1.11 christos } 1062 1.11 christos case 193: 1063 1.11 christos { 1064 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1065 1.11 christos switch (val1) 1066 1.11 christos { 1067 1.11 christos case 0: 1068 1.11 christos case 1: 1069 1.11 christos case 2: 1070 1.11 christos case 3: 1071 1.11 christos case 4: 1072 1.11 christos case 5: 1073 1.11 christos case 6: 1074 1.11 christos case 7: 1075 1.11 christos case 8: 1076 1.11 christos case 9: 1077 1.11 christos case 10: 1078 1.11 christos case 11: 1079 1.11 christos case 12: 1080 1.11 christos case 13: 1081 1.11 christos case 14: itype = CRISV10F_INSN_ADDU_M_W_M; goto extract_sfmt_adds_m_w_m; 1082 1.11 christos case 15: itype = CRISV10F_INSN_ADDUCWR; goto extract_sfmt_addscwr; 1083 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1084 1.11 christos } 1085 1.11 christos } 1086 1.11 christos case 194: 1087 1.11 christos { 1088 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1089 1.11 christos switch (val1) 1090 1.11 christos { 1091 1.11 christos case 0: 1092 1.11 christos case 1: 1093 1.11 christos case 2: 1094 1.11 christos case 3: 1095 1.11 christos case 4: 1096 1.11 christos case 5: 1097 1.11 christos case 6: 1098 1.11 christos case 7: 1099 1.11 christos case 8: 1100 1.11 christos case 9: 1101 1.11 christos case 10: 1102 1.11 christos case 11: 1103 1.11 christos case 12: 1104 1.11 christos case 13: 1105 1.11 christos case 14: itype = CRISV10F_INSN_ADDS_M_B_M; goto extract_sfmt_adds_m_b_m; 1106 1.11 christos case 15: itype = CRISV10F_INSN_ADDSCBR; goto extract_sfmt_addscbr; 1107 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1108 1.11 christos } 1109 1.11 christos } 1110 1.11 christos case 195: 1111 1.11 christos { 1112 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1113 1.11 christos switch (val1) 1114 1.11 christos { 1115 1.11 christos case 0: 1116 1.11 christos case 1: 1117 1.11 christos case 2: 1118 1.11 christos case 3: 1119 1.11 christos case 4: 1120 1.11 christos case 5: 1121 1.11 christos case 6: 1122 1.11 christos case 7: 1123 1.11 christos case 8: 1124 1.11 christos case 9: 1125 1.11 christos case 10: 1126 1.11 christos case 11: 1127 1.11 christos case 12: 1128 1.11 christos case 13: 1129 1.11 christos case 14: itype = CRISV10F_INSN_ADDS_M_W_M; goto extract_sfmt_adds_m_w_m; 1130 1.11 christos case 15: itype = CRISV10F_INSN_ADDSCWR; goto extract_sfmt_addscwr; 1131 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1132 1.11 christos } 1133 1.11 christos } 1134 1.11 christos case 196: 1135 1.11 christos { 1136 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1137 1.11 christos switch (val1) 1138 1.11 christos { 1139 1.11 christos case 0: 1140 1.11 christos case 1: 1141 1.11 christos case 2: 1142 1.11 christos case 3: 1143 1.11 christos case 4: 1144 1.11 christos case 5: 1145 1.11 christos case 6: 1146 1.11 christos case 7: 1147 1.11 christos case 8: 1148 1.11 christos case 9: 1149 1.11 christos case 10: 1150 1.11 christos case 11: 1151 1.11 christos case 12: 1152 1.11 christos case 13: 1153 1.11 christos case 14: itype = CRISV10F_INSN_MOVU_M_B_M; goto extract_sfmt_movs_m_b_m; 1154 1.11 christos case 15: itype = CRISV10F_INSN_MOVUCBR; goto extract_sfmt_movucbr; 1155 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1156 1.11 christos } 1157 1.11 christos } 1158 1.11 christos case 197: 1159 1.11 christos { 1160 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1161 1.11 christos switch (val1) 1162 1.11 christos { 1163 1.11 christos case 0: 1164 1.11 christos case 1: 1165 1.11 christos case 2: 1166 1.11 christos case 3: 1167 1.11 christos case 4: 1168 1.11 christos case 5: 1169 1.11 christos case 6: 1170 1.11 christos case 7: 1171 1.11 christos case 8: 1172 1.11 christos case 9: 1173 1.11 christos case 10: 1174 1.11 christos case 11: 1175 1.11 christos case 12: 1176 1.11 christos case 13: 1177 1.11 christos case 14: itype = CRISV10F_INSN_MOVU_M_W_M; goto extract_sfmt_movs_m_w_m; 1178 1.11 christos case 15: itype = CRISV10F_INSN_MOVUCWR; goto extract_sfmt_movucwr; 1179 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1180 1.11 christos } 1181 1.11 christos } 1182 1.11 christos case 198: 1183 1.11 christos { 1184 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1185 1.11 christos switch (val1) 1186 1.11 christos { 1187 1.11 christos case 0: 1188 1.11 christos case 1: 1189 1.11 christos case 2: 1190 1.11 christos case 3: 1191 1.11 christos case 4: 1192 1.11 christos case 5: 1193 1.11 christos case 6: 1194 1.11 christos case 7: 1195 1.11 christos case 8: 1196 1.11 christos case 9: 1197 1.11 christos case 10: 1198 1.11 christos case 11: 1199 1.11 christos case 12: 1200 1.11 christos case 13: 1201 1.11 christos case 14: itype = CRISV10F_INSN_MOVS_M_B_M; goto extract_sfmt_movs_m_b_m; 1202 1.11 christos case 15: itype = CRISV10F_INSN_MOVSCBR; goto extract_sfmt_movscbr; 1203 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1204 1.11 christos } 1205 1.11 christos } 1206 1.11 christos case 199: 1207 1.11 christos { 1208 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1209 1.11 christos switch (val1) 1210 1.11 christos { 1211 1.11 christos case 0: 1212 1.11 christos case 1: 1213 1.11 christos case 2: 1214 1.11 christos case 3: 1215 1.11 christos case 4: 1216 1.11 christos case 5: 1217 1.11 christos case 6: 1218 1.11 christos case 7: 1219 1.11 christos case 8: 1220 1.11 christos case 9: 1221 1.11 christos case 10: 1222 1.11 christos case 11: 1223 1.11 christos case 12: 1224 1.11 christos case 13: 1225 1.11 christos case 14: itype = CRISV10F_INSN_MOVS_M_W_M; goto extract_sfmt_movs_m_w_m; 1226 1.11 christos case 15: itype = CRISV10F_INSN_MOVSCWR; goto extract_sfmt_movscwr; 1227 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1228 1.11 christos } 1229 1.11 christos } 1230 1.11 christos case 200: 1231 1.11 christos { 1232 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1233 1.11 christos switch (val1) 1234 1.11 christos { 1235 1.11 christos case 0: 1236 1.11 christos case 1: 1237 1.11 christos case 2: 1238 1.11 christos case 3: 1239 1.11 christos case 4: 1240 1.11 christos case 5: 1241 1.11 christos case 6: 1242 1.11 christos case 7: 1243 1.11 christos case 8: 1244 1.11 christos case 9: 1245 1.11 christos case 10: 1246 1.11 christos case 11: 1247 1.11 christos case 12: 1248 1.11 christos case 13: 1249 1.11 christos case 14: itype = CRISV10F_INSN_SUBU_M_B_M; goto extract_sfmt_adds_m_b_m; 1250 1.11 christos case 15: itype = CRISV10F_INSN_SUBUCBR; goto extract_sfmt_addscbr; 1251 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1252 1.11 christos } 1253 1.11 christos } 1254 1.11 christos case 201: 1255 1.11 christos { 1256 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1257 1.11 christos switch (val1) 1258 1.11 christos { 1259 1.11 christos case 0: 1260 1.11 christos case 1: 1261 1.11 christos case 2: 1262 1.11 christos case 3: 1263 1.11 christos case 4: 1264 1.11 christos case 5: 1265 1.11 christos case 6: 1266 1.11 christos case 7: 1267 1.11 christos case 8: 1268 1.11 christos case 9: 1269 1.11 christos case 10: 1270 1.11 christos case 11: 1271 1.11 christos case 12: 1272 1.11 christos case 13: 1273 1.11 christos case 14: itype = CRISV10F_INSN_SUBU_M_W_M; goto extract_sfmt_adds_m_w_m; 1274 1.11 christos case 15: itype = CRISV10F_INSN_SUBUCWR; goto extract_sfmt_addscwr; 1275 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1276 1.11 christos } 1277 1.11 christos } 1278 1.11 christos case 202: 1279 1.11 christos { 1280 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1281 1.11 christos switch (val1) 1282 1.11 christos { 1283 1.11 christos case 0: 1284 1.11 christos case 1: 1285 1.11 christos case 2: 1286 1.11 christos case 3: 1287 1.11 christos case 4: 1288 1.11 christos case 5: 1289 1.11 christos case 6: 1290 1.11 christos case 7: 1291 1.11 christos case 8: 1292 1.11 christos case 9: 1293 1.11 christos case 10: 1294 1.11 christos case 11: 1295 1.11 christos case 12: 1296 1.11 christos case 13: 1297 1.11 christos case 14: itype = CRISV10F_INSN_SUBS_M_B_M; goto extract_sfmt_adds_m_b_m; 1298 1.11 christos case 15: itype = CRISV10F_INSN_SUBSCBR; goto extract_sfmt_addscbr; 1299 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1300 1.11 christos } 1301 1.11 christos } 1302 1.11 christos case 203: 1303 1.11 christos { 1304 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1305 1.11 christos switch (val1) 1306 1.11 christos { 1307 1.11 christos case 0: 1308 1.11 christos case 1: 1309 1.11 christos case 2: 1310 1.11 christos case 3: 1311 1.11 christos case 4: 1312 1.11 christos case 5: 1313 1.11 christos case 6: 1314 1.11 christos case 7: 1315 1.11 christos case 8: 1316 1.11 christos case 9: 1317 1.11 christos case 10: 1318 1.11 christos case 11: 1319 1.11 christos case 12: 1320 1.11 christos case 13: 1321 1.11 christos case 14: itype = CRISV10F_INSN_SUBS_M_W_M; goto extract_sfmt_adds_m_w_m; 1322 1.11 christos case 15: itype = CRISV10F_INSN_SUBSCWR; goto extract_sfmt_addscwr; 1323 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1324 1.11 christos } 1325 1.11 christos } 1326 1.11 christos case 204: 1327 1.11 christos { 1328 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1329 1.11 christos switch (val1) 1330 1.11 christos { 1331 1.11 christos case 0: 1332 1.11 christos case 1: 1333 1.11 christos case 2: 1334 1.11 christos case 3: 1335 1.11 christos case 4: 1336 1.11 christos case 5: 1337 1.11 christos case 6: 1338 1.11 christos case 7: 1339 1.11 christos case 8: 1340 1.11 christos case 9: 1341 1.11 christos case 10: 1342 1.11 christos case 11: 1343 1.11 christos case 12: 1344 1.11 christos case 13: 1345 1.11 christos case 14: itype = CRISV10F_INSN_CMPU_M_B_M; goto extract_sfmt_cmp_m_b_m; 1346 1.11 christos case 15: itype = CRISV10F_INSN_CMPUCBR; goto extract_sfmt_cmpucbr; 1347 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1348 1.11 christos } 1349 1.11 christos } 1350 1.11 christos case 205: 1351 1.11 christos { 1352 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1353 1.11 christos switch (val1) 1354 1.11 christos { 1355 1.11 christos case 0: 1356 1.11 christos case 1: 1357 1.11 christos case 2: 1358 1.11 christos case 3: 1359 1.11 christos case 4: 1360 1.11 christos case 5: 1361 1.11 christos case 6: 1362 1.11 christos case 7: 1363 1.11 christos case 8: 1364 1.11 christos case 9: 1365 1.11 christos case 10: 1366 1.11 christos case 11: 1367 1.11 christos case 12: 1368 1.11 christos case 13: 1369 1.11 christos case 14: itype = CRISV10F_INSN_CMPU_M_W_M; goto extract_sfmt_cmp_m_w_m; 1370 1.11 christos case 15: itype = CRISV10F_INSN_CMPUCWR; goto extract_sfmt_cmpucwr; 1371 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1372 1.11 christos } 1373 1.11 christos } 1374 1.11 christos case 206: 1375 1.11 christos { 1376 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1377 1.11 christos switch (val1) 1378 1.11 christos { 1379 1.11 christos case 0: 1380 1.11 christos case 1: 1381 1.11 christos case 2: 1382 1.11 christos case 3: 1383 1.11 christos case 4: 1384 1.11 christos case 5: 1385 1.11 christos case 6: 1386 1.11 christos case 7: 1387 1.11 christos case 8: 1388 1.11 christos case 9: 1389 1.11 christos case 10: 1390 1.11 christos case 11: 1391 1.11 christos case 12: 1392 1.11 christos case 13: 1393 1.11 christos case 14: itype = CRISV10F_INSN_CMPS_M_B_M; goto extract_sfmt_cmp_m_b_m; 1394 1.11 christos case 15: itype = CRISV10F_INSN_CMPSCBR; goto extract_sfmt_cmpcbr; 1395 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1396 1.11 christos } 1397 1.11 christos } 1398 1.11 christos case 207: 1399 1.11 christos { 1400 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1401 1.11 christos switch (val1) 1402 1.11 christos { 1403 1.11 christos case 0: 1404 1.11 christos case 1: 1405 1.11 christos case 2: 1406 1.11 christos case 3: 1407 1.11 christos case 4: 1408 1.11 christos case 5: 1409 1.11 christos case 6: 1410 1.11 christos case 7: 1411 1.11 christos case 8: 1412 1.11 christos case 9: 1413 1.11 christos case 10: 1414 1.11 christos case 11: 1415 1.11 christos case 12: 1416 1.11 christos case 13: 1417 1.11 christos case 14: itype = CRISV10F_INSN_CMPS_M_W_M; goto extract_sfmt_cmp_m_w_m; 1418 1.11 christos case 15: itype = CRISV10F_INSN_CMPSCWR; goto extract_sfmt_cmpcwr; 1419 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1420 1.11 christos } 1421 1.11 christos } 1422 1.11 christos case 208: itype = CRISV10F_INSN_MULS_B; goto extract_sfmt_muls_b; 1423 1.11 christos case 209: itype = CRISV10F_INSN_MULS_W; goto extract_sfmt_muls_b; 1424 1.11 christos case 210: itype = CRISV10F_INSN_MULS_D; goto extract_sfmt_muls_b; 1425 1.11 christos case 211: 1426 1.11 christos { 1427 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1428 1.11 christos switch (val1) 1429 1.11 christos { 1430 1.11 christos case 0: 1431 1.11 christos case 1: 1432 1.11 christos case 2: 1433 1.11 christos case 3: 1434 1.11 christos case 4: 1435 1.11 christos case 5: 1436 1.11 christos case 6: 1437 1.11 christos case 7: 1438 1.11 christos case 8: 1439 1.11 christos case 9: 1440 1.11 christos case 10: 1441 1.11 christos case 11: 1442 1.11 christos case 12: 1443 1.11 christos case 13: 1444 1.11 christos case 14: itype = CRISV10F_INSN_JUMP_M; goto extract_sfmt_jump_m; 1445 1.11 christos case 15: itype = CRISV10F_INSN_JUMP_C; goto extract_sfmt_jump_c; 1446 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1447 1.11 christos } 1448 1.11 christos } 1449 1.11 christos case 212: 1450 1.11 christos { 1451 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1452 1.11 christos switch (val1) 1453 1.11 christos { 1454 1.11 christos case 0: 1455 1.11 christos case 1: 1456 1.11 christos case 2: 1457 1.11 christos case 3: 1458 1.11 christos case 4: 1459 1.11 christos case 5: 1460 1.11 christos case 6: 1461 1.11 christos case 7: 1462 1.11 christos case 8: 1463 1.11 christos case 9: 1464 1.11 christos case 10: 1465 1.11 christos case 11: 1466 1.11 christos case 12: 1467 1.11 christos case 13: 1468 1.11 christos case 14: itype = CRISV10F_INSN_ADDO_M_B_M; goto extract_sfmt_addo_m_b_m; 1469 1.11 christos case 15: itype = CRISV10F_INSN_ADDO_CB; goto extract_sfmt_addo_cb; 1470 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1471 1.11 christos } 1472 1.11 christos } 1473 1.11 christos case 213: 1474 1.11 christos { 1475 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1476 1.11 christos switch (val1) 1477 1.11 christos { 1478 1.11 christos case 0: 1479 1.11 christos case 1: 1480 1.11 christos case 2: 1481 1.11 christos case 3: 1482 1.11 christos case 4: 1483 1.11 christos case 5: 1484 1.11 christos case 6: 1485 1.11 christos case 7: 1486 1.11 christos case 8: 1487 1.11 christos case 9: 1488 1.11 christos case 10: 1489 1.11 christos case 11: 1490 1.11 christos case 12: 1491 1.11 christos case 13: 1492 1.11 christos case 14: itype = CRISV10F_INSN_ADDO_M_W_M; goto extract_sfmt_addo_m_w_m; 1493 1.11 christos case 15: itype = CRISV10F_INSN_ADDO_CW; goto extract_sfmt_addo_cw; 1494 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1495 1.11 christos } 1496 1.11 christos } 1497 1.11 christos case 214: 1498 1.11 christos { 1499 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 1500 1.11 christos switch (val1) 1501 1.11 christos { 1502 1.11 christos case 0: 1503 1.11 christos case 1: 1504 1.11 christos case 2: 1505 1.11 christos case 3: 1506 1.11 christos case 4: 1507 1.11 christos case 5: 1508 1.11 christos case 6: 1509 1.11 christos case 7: 1510 1.11 christos case 8: 1511 1.11 christos case 9: 1512 1.11 christos case 10: 1513 1.11 christos case 11: 1514 1.11 christos case 12: 1515 1.11 christos case 13: 1516 1.11 christos case 14: 1517 1.1 christos { 1518 1.11 christos unsigned int val2 = (((insn >> 0) & (15 << 0))); 1519 1.11 christos switch (val2) 1520 1.1 christos { 1521 1.11 christos case 0: 1522 1.11 christos case 1: 1523 1.11 christos case 2: 1524 1.11 christos case 3: 1525 1.11 christos case 4: 1526 1.11 christos case 5: 1527 1.11 christos case 6: 1528 1.11 christos case 7: 1529 1.11 christos case 8: 1530 1.11 christos case 9: 1531 1.11 christos case 10: 1532 1.11 christos case 11: 1533 1.11 christos case 12: 1534 1.11 christos case 13: 1535 1.11 christos case 14: itype = CRISV10F_INSN_ADDO_M_D_M; goto extract_sfmt_addo_m_d_m; 1536 1.11 christos case 15: itype = CRISV10F_INSN_ADDO_CD; goto extract_sfmt_addo_cd; 1537 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1538 1.1 christos } 1539 1.1 christos } 1540 1.11 christos case 15: 1541 1.1 christos { 1542 1.11 christos unsigned int val2 = (((insn >> 0) & (15 << 0))); 1543 1.11 christos switch (val2) 1544 1.1 christos { 1545 1.11 christos case 0: 1546 1.11 christos case 1: 1547 1.11 christos case 2: 1548 1.11 christos case 3: 1549 1.11 christos case 4: 1550 1.11 christos case 5: 1551 1.11 christos case 6: 1552 1.11 christos case 7: 1553 1.11 christos case 8: 1554 1.11 christos case 9: 1555 1.11 christos case 10: 1556 1.11 christos case 11: 1557 1.11 christos case 12: 1558 1.11 christos case 13: 1559 1.11 christos case 14: itype = CRISV10F_INSN_ADDO_M_D_M; goto extract_sfmt_addo_m_d_m; 1560 1.11 christos case 15: itype = CRISV10F_INSN_BDAP_32_PC; goto extract_sfmt_bdap_32_pc; 1561 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1562 1.1 christos } 1563 1.1 christos } 1564 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1565 1.1 christos } 1566 1.1 christos } 1567 1.11 christos case 215: 1568 1.1 christos { 1569 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1570 1.11 christos switch (val1) 1571 1.1 christos { 1572 1.11 christos case 0: 1573 1.11 christos case 1: 1574 1.11 christos case 2: 1575 1.11 christos case 3: 1576 1.11 christos case 4: 1577 1.11 christos case 5: 1578 1.11 christos case 6: 1579 1.11 christos case 7: 1580 1.11 christos case 8: 1581 1.11 christos case 9: 1582 1.11 christos case 10: 1583 1.11 christos case 11: 1584 1.11 christos case 12: 1585 1.11 christos case 13: 1586 1.11 christos case 14: 1587 1.1 christos if ((base_insn & 0xfbf0) == 0x970) 1588 1.1 christos { itype = CRISV10F_INSN_DIP_M; goto extract_sfmt_dip_m; } 1589 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1590 1.11 christos case 15: 1591 1.1 christos if ((base_insn & 0xffff) == 0xd7f) 1592 1.1 christos { itype = CRISV10F_INSN_DIP_C; goto extract_sfmt_dip_c; } 1593 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1594 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1595 1.1 christos } 1596 1.1 christos } 1597 1.11 christos case 220: 1598 1.1 christos { 1599 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1600 1.11 christos switch (val1) 1601 1.1 christos { 1602 1.11 christos case 0: 1603 1.11 christos case 1: 1604 1.11 christos case 2: 1605 1.11 christos case 3: 1606 1.11 christos case 4: 1607 1.11 christos case 5: 1608 1.11 christos case 6: 1609 1.11 christos case 7: 1610 1.11 christos case 8: 1611 1.11 christos case 9: 1612 1.11 christos case 10: 1613 1.11 christos case 11: 1614 1.11 christos case 12: 1615 1.11 christos case 13: 1616 1.11 christos case 14: itype = CRISV10F_INSN_BOUND_M_B_M; goto extract_sfmt_bound_m_b_m; 1617 1.11 christos case 15: itype = CRISV10F_INSN_BOUND_CB; goto extract_sfmt_bound_cb; 1618 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1619 1.11 christos } 1620 1.11 christos } 1621 1.11 christos case 221: 1622 1.11 christos { 1623 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1624 1.11 christos switch (val1) 1625 1.11 christos { 1626 1.11 christos case 0: 1627 1.11 christos case 1: 1628 1.11 christos case 2: 1629 1.11 christos case 3: 1630 1.11 christos case 4: 1631 1.11 christos case 5: 1632 1.11 christos case 6: 1633 1.11 christos case 7: 1634 1.11 christos case 8: 1635 1.11 christos case 9: 1636 1.11 christos case 10: 1637 1.11 christos case 11: 1638 1.11 christos case 12: 1639 1.11 christos case 13: 1640 1.11 christos case 14: itype = CRISV10F_INSN_BOUND_M_W_M; goto extract_sfmt_bound_m_w_m; 1641 1.11 christos case 15: itype = CRISV10F_INSN_BOUND_CW; goto extract_sfmt_bound_cw; 1642 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1643 1.11 christos } 1644 1.11 christos } 1645 1.11 christos case 222: 1646 1.11 christos { 1647 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1648 1.11 christos switch (val1) 1649 1.11 christos { 1650 1.11 christos case 0: 1651 1.11 christos case 1: 1652 1.11 christos case 2: 1653 1.11 christos case 3: 1654 1.11 christos case 4: 1655 1.11 christos case 5: 1656 1.11 christos case 6: 1657 1.11 christos case 7: 1658 1.11 christos case 8: 1659 1.11 christos case 9: 1660 1.11 christos case 10: 1661 1.11 christos case 11: 1662 1.11 christos case 12: 1663 1.11 christos case 13: 1664 1.11 christos case 14: itype = CRISV10F_INSN_BOUND_M_D_M; goto extract_sfmt_bound_m_d_m; 1665 1.11 christos case 15: itype = CRISV10F_INSN_BOUND_CD; goto extract_sfmt_bound_cd; 1666 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1667 1.11 christos } 1668 1.11 christos } 1669 1.11 christos case 223: 1670 1.11 christos { 1671 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 1672 1.11 christos switch (val1) 1673 1.11 christos { 1674 1.11 christos case 0: 1675 1.11 christos case 1: 1676 1.11 christos case 2: 1677 1.11 christos case 3: 1678 1.11 christos case 4: 1679 1.11 christos case 5: 1680 1.11 christos case 6: 1681 1.11 christos case 7: 1682 1.11 christos case 8: 1683 1.11 christos case 9: 1684 1.11 christos case 10: 1685 1.11 christos case 11: 1686 1.11 christos case 12: 1687 1.11 christos case 13: 1688 1.11 christos case 15: 1689 1.1 christos if ((base_insn & 0xfff) == 0xdff) 1690 1.1 christos { itype = CRISV10F_INSN_BCC_W; goto extract_sfmt_bcc_w; } 1691 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1692 1.11 christos case 14: 1693 1.1 christos if ((base_insn & 0xffff) == 0xedff) 1694 1.1 christos { itype = CRISV10F_INSN_BA_W; goto extract_sfmt_ba_w; } 1695 1.1 christos itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1696 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1697 1.1 christos } 1698 1.1 christos } 1699 1.11 christos case 224: 1700 1.1 christos { 1701 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1702 1.11 christos switch (val1) 1703 1.1 christos { 1704 1.11 christos case 0: 1705 1.11 christos case 1: 1706 1.11 christos case 2: 1707 1.11 christos case 3: 1708 1.11 christos case 4: 1709 1.11 christos case 5: 1710 1.11 christos case 6: 1711 1.11 christos case 7: 1712 1.11 christos case 8: 1713 1.11 christos case 9: 1714 1.11 christos case 10: 1715 1.11 christos case 11: 1716 1.11 christos case 12: 1717 1.11 christos case 13: 1718 1.11 christos case 14: itype = CRISV10F_INSN_ADD_M_B_M; goto extract_sfmt_add_m_b_m; 1719 1.11 christos case 15: itype = CRISV10F_INSN_ADDCBR; goto extract_sfmt_addcbr; 1720 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1721 1.11 christos } 1722 1.11 christos } 1723 1.11 christos case 225: 1724 1.11 christos { 1725 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 1726 1.11 christos switch (val1) 1727 1.11 christos { 1728 1.11 christos case 0: 1729 1.11 christos case 1: 1730 1.11 christos case 2: 1731 1.11 christos case 3: 1732 1.11 christos case 4: 1733 1.11 christos case 5: 1734 1.11 christos case 6: 1735 1.11 christos case 7: 1736 1.11 christos case 8: 1737 1.11 christos case 9: 1738 1.11 christos case 10: 1739 1.11 christos case 11: 1740 1.11 christos case 12: 1741 1.11 christos case 13: 1742 1.11 christos case 14: itype = CRISV10F_INSN_ADD_M_W_M; goto extract_sfmt_add_m_w_m; 1743 1.11 christos case 15: itype = CRISV10F_INSN_ADDCWR; goto extract_sfmt_addcwr; 1744 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1745 1.11 christos } 1746 1.11 christos } 1747 1.11 christos case 226: 1748 1.11 christos { 1749 1.11 christos unsigned int val1 = (((insn >> 12) & (15 << 0))); 1750 1.11 christos switch (val1) 1751 1.11 christos { 1752 1.11 christos case 0: 1753 1.11 christos case 1: 1754 1.11 christos case 2: 1755 1.11 christos case 3: 1756 1.11 christos case 4: 1757 1.11 christos case 5: 1758 1.11 christos case 6: 1759 1.11 christos case 7: 1760 1.11 christos case 8: 1761 1.11 christos case 9: 1762 1.11 christos case 10: 1763 1.11 christos case 11: 1764 1.11 christos case 12: 1765 1.11 christos case 13: 1766 1.11 christos case 14: 1767 1.1 christos { 1768 1.11 christos unsigned int val2 = (((insn >> 0) & (15 << 0))); 1769 1.11 christos switch (val2) 1770 1.1 christos { 1771 1.11 christos case 0: 1772 1.11 christos case 1: 1773 1.11 christos case 2: 1774 1.11 christos case 3: 1775 1.11 christos case 4: 1776 1.11 christos case 5: 1777 1.11 christos case 6: 1778 1.11 christos case 7: 1779 1.11 christos case 8: 1780 1.11 christos case 9: 1781 1.11 christos case 10: 1782 1.11 christos case 11: 1783 1.11 christos case 12: 1784 1.11 christos case 13: 1785 1.11 christos case 14: itype = CRISV10F_INSN_ADD_M_D_M; goto extract_sfmt_add_m_d_m; 1786 1.11 christos case 15: itype = CRISV10F_INSN_ADDCDR; goto extract_sfmt_addcdr; 1787 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1788 1.1 christos } 1789 1.1 christos } 1790 1.11 christos case 15: 1791 1.1 christos { 1792 1.11 christos unsigned int val2 = (((insn >> 0) & (15 << 0))); 1793 1.11 christos switch (val2) 1794 1.1 christos { 1795 1.11 christos case 0: 1796 1.11 christos case 1: 1797 1.11 christos case 2: 1798 1.11 christos case 3: 1799 1.11 christos case 4: 1800 1.11 christos case 5: 1801 1.11 christos case 6: 1802 1.11 christos case 7: 1803 1.11 christos case 8: 1804 1.11 christos case 9: 1805 1.11 christos case 10: 1806 1.11 christos case 11: 1807 1.11 christos case 12: 1808 1.11 christos case 13: 1809 1.11 christos case 14: itype = CRISV10F_INSN_ADD_M_D_M; goto extract_sfmt_add_m_d_m; 1810 1.11 christos case 15: itype = CRISV10F_INSN_ADDCPC; goto extract_sfmt_addcpc; 1811 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1812 1.1 christos } 1813 1.1 christos } 1814 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1815 1.1 christos } 1816 1.1 christos } 1817 1.11 christos case 227: 1818 1.1 christos { 1819 1.11 christos unsigned int val1 = (((insn >> 11) & (15 << 1)) | ((insn >> 0) & (1 << 0))); 1820 1.11 christos switch (val1) 1821 1.1 christos { 1822 1.11 christos case 0: 1823 1.11 christos case 2: 1824 1.11 christos case 3: 1825 1.11 christos case 4: 1826 1.11 christos case 5: 1827 1.11 christos case 6: 1828 1.11 christos case 7: 1829 1.11 christos case 8: 1830 1.11 christos case 9: 1831 1.11 christos case 10: 1832 1.11 christos case 12: 1833 1.11 christos case 13: 1834 1.11 christos case 14: 1835 1.11 christos case 17: 1836 1.11 christos case 18: 1837 1.11 christos case 20: 1838 1.11 christos case 22: 1839 1.11 christos case 24: 1840 1.11 christos case 26: 1841 1.11 christos case 28: 1842 1.11 christos case 30: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1843 1.11 christos case 1: 1844 1.1 christos { 1845 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1846 1.11 christos switch (val2) 1847 1.1 christos { 1848 1.11 christos case 0: 1849 1.11 christos case 1: 1850 1.11 christos case 2: 1851 1.11 christos case 3: 1852 1.11 christos case 4: 1853 1.11 christos case 5: 1854 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1855 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_M_PCPLUS_P0; goto extract_sfmt_move_m_pcplus_p0; 1856 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1857 1.1 christos } 1858 1.1 christos } 1859 1.11 christos case 11: 1860 1.1 christos { 1861 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1862 1.11 christos switch (val2) 1863 1.1 christos { 1864 1.11 christos case 0: 1865 1.11 christos case 1: 1866 1.11 christos case 2: 1867 1.11 christos case 3: 1868 1.11 christos case 4: 1869 1.11 christos case 5: 1870 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1871 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P5; goto extract_sfmt_move_c_sprv10_p5; 1872 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1873 1.1 christos } 1874 1.1 christos } 1875 1.11 christos case 15: 1876 1.1 christos { 1877 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1878 1.11 christos switch (val2) 1879 1.1 christos { 1880 1.11 christos case 0: 1881 1.11 christos case 1: 1882 1.11 christos case 2: 1883 1.11 christos case 3: 1884 1.11 christos case 4: 1885 1.11 christos case 5: 1886 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1887 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P7; goto extract_sfmt_move_c_sprv10_p9; 1888 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1889 1.1 christos } 1890 1.1 christos } 1891 1.11 christos case 16: 1892 1.1 christos { 1893 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1894 1.11 christos switch (val2) 1895 1.1 christos { 1896 1.11 christos case 0: 1897 1.11 christos case 1: 1898 1.11 christos case 2: 1899 1.11 christos case 3: 1900 1.11 christos case 4: 1901 1.11 christos case 5: 1902 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1903 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_M_SPPLUS_P8; goto extract_sfmt_move_m_spplus_p8; 1904 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1905 1.1 christos } 1906 1.1 christos } 1907 1.11 christos case 19: 1908 1.1 christos { 1909 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1910 1.11 christos switch (val2) 1911 1.1 christos { 1912 1.11 christos case 0: 1913 1.11 christos case 1: 1914 1.11 christos case 2: 1915 1.11 christos case 3: 1916 1.11 christos case 4: 1917 1.11 christos case 5: 1918 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1919 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P9; goto extract_sfmt_move_c_sprv10_p9; 1920 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1921 1.1 christos } 1922 1.1 christos } 1923 1.11 christos case 21: 1924 1.1 christos { 1925 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1926 1.11 christos switch (val2) 1927 1.1 christos { 1928 1.11 christos case 0: 1929 1.11 christos case 1: 1930 1.11 christos case 2: 1931 1.11 christos case 3: 1932 1.11 christos case 4: 1933 1.11 christos case 5: 1934 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1935 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P10; goto extract_sfmt_move_c_sprv10_p9; 1936 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1937 1.1 christos } 1938 1.1 christos } 1939 1.11 christos case 23: 1940 1.1 christos { 1941 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1942 1.11 christos switch (val2) 1943 1.1 christos { 1944 1.11 christos case 0: 1945 1.11 christos case 1: 1946 1.11 christos case 2: 1947 1.11 christos case 3: 1948 1.11 christos case 4: 1949 1.11 christos case 5: 1950 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1951 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P11; goto extract_sfmt_move_c_sprv10_p9; 1952 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1953 1.1 christos } 1954 1.1 christos } 1955 1.11 christos case 25: 1956 1.1 christos { 1957 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1958 1.11 christos switch (val2) 1959 1.1 christos { 1960 1.11 christos case 0: 1961 1.11 christos case 1: 1962 1.11 christos case 2: 1963 1.11 christos case 3: 1964 1.11 christos case 4: 1965 1.11 christos case 5: 1966 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1967 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P12; goto extract_sfmt_move_c_sprv10_p9; 1968 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1969 1.1 christos } 1970 1.1 christos } 1971 1.11 christos case 27: 1972 1.1 christos { 1973 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1974 1.11 christos switch (val2) 1975 1.1 christos { 1976 1.11 christos case 0: 1977 1.11 christos case 1: 1978 1.11 christos case 2: 1979 1.11 christos case 3: 1980 1.11 christos case 4: 1981 1.11 christos case 5: 1982 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1983 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P13; goto extract_sfmt_move_c_sprv10_p9; 1984 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 1985 1.1 christos } 1986 1.1 christos } 1987 1.11 christos case 29: 1988 1.1 christos { 1989 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 1990 1.11 christos switch (val2) 1991 1.1 christos { 1992 1.11 christos case 0: 1993 1.11 christos case 1: 1994 1.11 christos case 2: 1995 1.11 christos case 3: 1996 1.11 christos case 4: 1997 1.11 christos case 5: 1998 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 1999 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P14; goto extract_sfmt_move_c_sprv10_p9; 2000 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2001 1.1 christos } 2002 1.1 christos } 2003 1.11 christos case 31: 2004 1.1 christos { 2005 1.11 christos unsigned int val2 = (((insn >> 1) & (7 << 0))); 2006 1.11 christos switch (val2) 2007 1.1 christos { 2008 1.11 christos case 0: 2009 1.11 christos case 1: 2010 1.11 christos case 2: 2011 1.11 christos case 3: 2012 1.11 christos case 4: 2013 1.11 christos case 5: 2014 1.11 christos case 6: itype = CRISV10F_INSN_MOVE_M_SPRV10; goto extract_sfmt_move_m_sprv10; 2015 1.11 christos case 7: itype = CRISV10F_INSN_MOVE_C_SPRV10_P15; goto extract_sfmt_move_c_sprv10_p9; 2016 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2017 1.1 christos } 2018 1.1 christos } 2019 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2020 1.1 christos } 2021 1.1 christos } 2022 1.11 christos case 228: 2023 1.1 christos { 2024 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2025 1.11 christos switch (val1) 2026 1.1 christos { 2027 1.11 christos case 0: 2028 1.11 christos case 1: 2029 1.11 christos case 2: 2030 1.11 christos case 3: 2031 1.11 christos case 4: 2032 1.11 christos case 5: 2033 1.11 christos case 6: 2034 1.11 christos case 7: 2035 1.11 christos case 8: 2036 1.11 christos case 9: 2037 1.11 christos case 10: 2038 1.11 christos case 11: 2039 1.11 christos case 12: 2040 1.11 christos case 13: 2041 1.11 christos case 14: itype = CRISV10F_INSN_MOVE_M_B_M; goto extract_sfmt_move_m_b_m; 2042 1.11 christos case 15: itype = CRISV10F_INSN_MOVECBR; goto extract_sfmt_movecbr; 2043 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2044 1.11 christos } 2045 1.11 christos } 2046 1.11 christos case 229: 2047 1.11 christos { 2048 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2049 1.11 christos switch (val1) 2050 1.11 christos { 2051 1.11 christos case 0: 2052 1.11 christos case 1: 2053 1.11 christos case 2: 2054 1.11 christos case 3: 2055 1.11 christos case 4: 2056 1.11 christos case 5: 2057 1.11 christos case 6: 2058 1.11 christos case 7: 2059 1.11 christos case 8: 2060 1.11 christos case 9: 2061 1.11 christos case 10: 2062 1.11 christos case 11: 2063 1.11 christos case 12: 2064 1.11 christos case 13: 2065 1.11 christos case 14: itype = CRISV10F_INSN_MOVE_M_W_M; goto extract_sfmt_move_m_w_m; 2066 1.11 christos case 15: itype = CRISV10F_INSN_MOVECWR; goto extract_sfmt_movecwr; 2067 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2068 1.11 christos } 2069 1.11 christos } 2070 1.11 christos case 230: 2071 1.11 christos { 2072 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2073 1.11 christos switch (val1) 2074 1.11 christos { 2075 1.11 christos case 0: 2076 1.11 christos case 1: 2077 1.11 christos case 2: 2078 1.11 christos case 3: 2079 1.11 christos case 4: 2080 1.11 christos case 5: 2081 1.11 christos case 6: 2082 1.11 christos case 7: 2083 1.11 christos case 8: 2084 1.11 christos case 9: 2085 1.11 christos case 10: 2086 1.11 christos case 11: 2087 1.11 christos case 12: 2088 1.11 christos case 13: 2089 1.11 christos case 14: itype = CRISV10F_INSN_MOVE_M_D_M; goto extract_sfmt_move_m_d_m; 2090 1.11 christos case 15: itype = CRISV10F_INSN_MOVECDR; goto extract_sfmt_movecdr; 2091 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2092 1.11 christos } 2093 1.11 christos } 2094 1.11 christos case 232: 2095 1.11 christos { 2096 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2097 1.11 christos switch (val1) 2098 1.11 christos { 2099 1.11 christos case 0: 2100 1.11 christos case 1: 2101 1.11 christos case 2: 2102 1.11 christos case 3: 2103 1.11 christos case 4: 2104 1.11 christos case 5: 2105 1.11 christos case 6: 2106 1.11 christos case 7: 2107 1.11 christos case 8: 2108 1.11 christos case 9: 2109 1.11 christos case 10: 2110 1.11 christos case 11: 2111 1.11 christos case 12: 2112 1.11 christos case 13: 2113 1.11 christos case 14: itype = CRISV10F_INSN_SUB_M_B_M; goto extract_sfmt_add_m_b_m; 2114 1.11 christos case 15: itype = CRISV10F_INSN_SUBCBR; goto extract_sfmt_addcbr; 2115 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2116 1.11 christos } 2117 1.11 christos } 2118 1.11 christos case 233: 2119 1.11 christos { 2120 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2121 1.11 christos switch (val1) 2122 1.11 christos { 2123 1.11 christos case 0: 2124 1.11 christos case 1: 2125 1.11 christos case 2: 2126 1.11 christos case 3: 2127 1.11 christos case 4: 2128 1.11 christos case 5: 2129 1.11 christos case 6: 2130 1.11 christos case 7: 2131 1.11 christos case 8: 2132 1.11 christos case 9: 2133 1.11 christos case 10: 2134 1.11 christos case 11: 2135 1.11 christos case 12: 2136 1.11 christos case 13: 2137 1.11 christos case 14: itype = CRISV10F_INSN_SUB_M_W_M; goto extract_sfmt_add_m_w_m; 2138 1.11 christos case 15: itype = CRISV10F_INSN_SUBCWR; goto extract_sfmt_addcwr; 2139 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2140 1.11 christos } 2141 1.11 christos } 2142 1.11 christos case 234: 2143 1.11 christos { 2144 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2145 1.11 christos switch (val1) 2146 1.11 christos { 2147 1.11 christos case 0: 2148 1.11 christos case 1: 2149 1.11 christos case 2: 2150 1.11 christos case 3: 2151 1.11 christos case 4: 2152 1.11 christos case 5: 2153 1.11 christos case 6: 2154 1.11 christos case 7: 2155 1.11 christos case 8: 2156 1.11 christos case 9: 2157 1.11 christos case 10: 2158 1.11 christos case 11: 2159 1.11 christos case 12: 2160 1.11 christos case 13: 2161 1.11 christos case 14: itype = CRISV10F_INSN_SUB_M_D_M; goto extract_sfmt_add_m_d_m; 2162 1.11 christos case 15: itype = CRISV10F_INSN_SUBCDR; goto extract_sfmt_addcdr; 2163 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2164 1.11 christos } 2165 1.11 christos } 2166 1.11 christos case 236: 2167 1.11 christos { 2168 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2169 1.11 christos switch (val1) 2170 1.11 christos { 2171 1.11 christos case 0: 2172 1.11 christos case 1: 2173 1.11 christos case 2: 2174 1.11 christos case 3: 2175 1.11 christos case 4: 2176 1.11 christos case 5: 2177 1.11 christos case 6: 2178 1.11 christos case 7: 2179 1.11 christos case 8: 2180 1.11 christos case 9: 2181 1.11 christos case 10: 2182 1.11 christos case 11: 2183 1.11 christos case 12: 2184 1.11 christos case 13: 2185 1.11 christos case 14: itype = CRISV10F_INSN_CMP_M_B_M; goto extract_sfmt_cmp_m_b_m; 2186 1.11 christos case 15: itype = CRISV10F_INSN_CMPCBR; goto extract_sfmt_cmpcbr; 2187 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2188 1.11 christos } 2189 1.11 christos } 2190 1.11 christos case 237: 2191 1.11 christos { 2192 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2193 1.11 christos switch (val1) 2194 1.11 christos { 2195 1.11 christos case 0: 2196 1.11 christos case 1: 2197 1.11 christos case 2: 2198 1.11 christos case 3: 2199 1.11 christos case 4: 2200 1.11 christos case 5: 2201 1.11 christos case 6: 2202 1.11 christos case 7: 2203 1.11 christos case 8: 2204 1.11 christos case 9: 2205 1.11 christos case 10: 2206 1.11 christos case 11: 2207 1.11 christos case 12: 2208 1.11 christos case 13: 2209 1.11 christos case 14: itype = CRISV10F_INSN_CMP_M_W_M; goto extract_sfmt_cmp_m_w_m; 2210 1.11 christos case 15: itype = CRISV10F_INSN_CMPCWR; goto extract_sfmt_cmpcwr; 2211 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2212 1.11 christos } 2213 1.11 christos } 2214 1.11 christos case 238: 2215 1.11 christos { 2216 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2217 1.11 christos switch (val1) 2218 1.11 christos { 2219 1.11 christos case 0: 2220 1.11 christos case 1: 2221 1.11 christos case 2: 2222 1.11 christos case 3: 2223 1.11 christos case 4: 2224 1.11 christos case 5: 2225 1.11 christos case 6: 2226 1.11 christos case 7: 2227 1.11 christos case 8: 2228 1.11 christos case 9: 2229 1.11 christos case 10: 2230 1.11 christos case 11: 2231 1.11 christos case 12: 2232 1.11 christos case 13: 2233 1.11 christos case 14: itype = CRISV10F_INSN_CMP_M_D_M; goto extract_sfmt_cmp_m_d_m; 2234 1.11 christos case 15: itype = CRISV10F_INSN_CMPCDR; goto extract_sfmt_cmpcdr; 2235 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2236 1.11 christos } 2237 1.11 christos } 2238 1.11 christos case 240: 2239 1.11 christos { 2240 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2241 1.11 christos switch (val1) 2242 1.11 christos { 2243 1.11 christos case 0: 2244 1.11 christos case 1: 2245 1.11 christos case 2: 2246 1.11 christos case 3: 2247 1.11 christos case 4: 2248 1.11 christos case 5: 2249 1.11 christos case 6: 2250 1.11 christos case 7: 2251 1.11 christos case 8: 2252 1.11 christos case 9: 2253 1.11 christos case 10: 2254 1.11 christos case 11: 2255 1.11 christos case 12: 2256 1.11 christos case 13: 2257 1.11 christos case 14: itype = CRISV10F_INSN_AND_M_B_M; goto extract_sfmt_and_m_b_m; 2258 1.11 christos case 15: itype = CRISV10F_INSN_ANDCBR; goto extract_sfmt_andcbr; 2259 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2260 1.11 christos } 2261 1.11 christos } 2262 1.11 christos case 241: 2263 1.11 christos { 2264 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2265 1.11 christos switch (val1) 2266 1.11 christos { 2267 1.11 christos case 0: 2268 1.11 christos case 1: 2269 1.11 christos case 2: 2270 1.11 christos case 3: 2271 1.11 christos case 4: 2272 1.11 christos case 5: 2273 1.11 christos case 6: 2274 1.11 christos case 7: 2275 1.11 christos case 8: 2276 1.11 christos case 9: 2277 1.11 christos case 10: 2278 1.11 christos case 11: 2279 1.11 christos case 12: 2280 1.11 christos case 13: 2281 1.11 christos case 14: itype = CRISV10F_INSN_AND_M_W_M; goto extract_sfmt_and_m_w_m; 2282 1.11 christos case 15: itype = CRISV10F_INSN_ANDCWR; goto extract_sfmt_andcwr; 2283 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2284 1.11 christos } 2285 1.11 christos } 2286 1.11 christos case 242: 2287 1.11 christos { 2288 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2289 1.11 christos switch (val1) 2290 1.11 christos { 2291 1.11 christos case 0: 2292 1.11 christos case 1: 2293 1.11 christos case 2: 2294 1.11 christos case 3: 2295 1.11 christos case 4: 2296 1.11 christos case 5: 2297 1.11 christos case 6: 2298 1.11 christos case 7: 2299 1.11 christos case 8: 2300 1.11 christos case 9: 2301 1.11 christos case 10: 2302 1.11 christos case 11: 2303 1.11 christos case 12: 2304 1.11 christos case 13: 2305 1.11 christos case 14: itype = CRISV10F_INSN_AND_M_D_M; goto extract_sfmt_and_m_d_m; 2306 1.11 christos case 15: itype = CRISV10F_INSN_ANDCDR; goto extract_sfmt_andcdr; 2307 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2308 1.11 christos } 2309 1.11 christos } 2310 1.11 christos case 244: 2311 1.11 christos { 2312 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2313 1.11 christos switch (val1) 2314 1.11 christos { 2315 1.11 christos case 0: 2316 1.11 christos case 1: 2317 1.11 christos case 2: 2318 1.11 christos case 3: 2319 1.11 christos case 4: 2320 1.11 christos case 5: 2321 1.11 christos case 6: 2322 1.11 christos case 7: 2323 1.11 christos case 8: 2324 1.11 christos case 9: 2325 1.11 christos case 10: 2326 1.11 christos case 11: 2327 1.11 christos case 12: 2328 1.11 christos case 13: 2329 1.11 christos case 14: itype = CRISV10F_INSN_OR_M_B_M; goto extract_sfmt_and_m_b_m; 2330 1.11 christos case 15: itype = CRISV10F_INSN_ORCBR; goto extract_sfmt_andcbr; 2331 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2332 1.11 christos } 2333 1.11 christos } 2334 1.11 christos case 245: 2335 1.11 christos { 2336 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2337 1.11 christos switch (val1) 2338 1.11 christos { 2339 1.11 christos case 0: 2340 1.11 christos case 1: 2341 1.11 christos case 2: 2342 1.11 christos case 3: 2343 1.11 christos case 4: 2344 1.11 christos case 5: 2345 1.11 christos case 6: 2346 1.11 christos case 7: 2347 1.11 christos case 8: 2348 1.11 christos case 9: 2349 1.11 christos case 10: 2350 1.11 christos case 11: 2351 1.11 christos case 12: 2352 1.11 christos case 13: 2353 1.11 christos case 14: itype = CRISV10F_INSN_OR_M_W_M; goto extract_sfmt_and_m_w_m; 2354 1.11 christos case 15: itype = CRISV10F_INSN_ORCWR; goto extract_sfmt_andcwr; 2355 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2356 1.11 christos } 2357 1.11 christos } 2358 1.11 christos case 246: 2359 1.11 christos { 2360 1.11 christos unsigned int val1 = (((insn >> 0) & (15 << 0))); 2361 1.11 christos switch (val1) 2362 1.11 christos { 2363 1.11 christos case 0: 2364 1.11 christos case 1: 2365 1.11 christos case 2: 2366 1.11 christos case 3: 2367 1.11 christos case 4: 2368 1.11 christos case 5: 2369 1.11 christos case 6: 2370 1.11 christos case 7: 2371 1.11 christos case 8: 2372 1.11 christos case 9: 2373 1.11 christos case 10: 2374 1.11 christos case 11: 2375 1.11 christos case 12: 2376 1.11 christos case 13: 2377 1.11 christos case 14: itype = CRISV10F_INSN_OR_M_D_M; goto extract_sfmt_and_m_d_m; 2378 1.11 christos case 15: itype = CRISV10F_INSN_ORCDR; goto extract_sfmt_andcdr; 2379 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2380 1.1 christos } 2381 1.1 christos } 2382 1.11 christos default: itype = CRISV10F_INSN_X_INVALID; goto extract_sfmt_empty; 2383 1.1 christos } 2384 1.1 christos } 2385 1.1 christos } 2386 1.1 christos 2387 1.1 christos /* The instruction has been decoded, now extract the fields. */ 2388 1.1 christos 2389 1.1 christos extract_sfmt_empty: 2390 1.1 christos { 2391 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2392 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2393 1.1 christos 2394 1.1 christos 2395 1.1 christos /* Record the fields for the semantic handler. */ 2396 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0)); 2397 1.1 christos 2398 1.1 christos #undef FLD 2399 1.1 christos return idesc; 2400 1.1 christos } 2401 1.1 christos 2402 1.1 christos extract_sfmt_nop: 2403 1.1 christos { 2404 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2405 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2406 1.1 christos 2407 1.1 christos 2408 1.1 christos /* Record the fields for the semantic handler. */ 2409 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_nop", (char *) 0)); 2410 1.1 christos 2411 1.1 christos #undef FLD 2412 1.1 christos return idesc; 2413 1.1 christos } 2414 1.1 christos 2415 1.1 christos extract_sfmt_move_b_r: 2416 1.1 christos { 2417 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2418 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2419 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 2420 1.1 christos UINT f_operand2; 2421 1.1 christos UINT f_operand1; 2422 1.1 christos 2423 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2424 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2425 1.1 christos 2426 1.1 christos /* Record the fields for the semantic handler. */ 2427 1.1 christos FLD (f_operand1) = f_operand1; 2428 1.1 christos FLD (f_operand2) = f_operand2; 2429 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_b_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2430 1.1 christos 2431 1.1 christos #if WITH_PROFILE_MODEL_P 2432 1.1 christos /* Record the fields for profiling. */ 2433 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2434 1.1 christos { 2435 1.1 christos FLD (in_Rs) = f_operand1; 2436 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 2437 1.1 christos } 2438 1.1 christos #endif 2439 1.1 christos #undef FLD 2440 1.1 christos return idesc; 2441 1.1 christos } 2442 1.1 christos 2443 1.1 christos extract_sfmt_move_d_r: 2444 1.1 christos { 2445 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2446 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2447 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 2448 1.1 christos UINT f_operand2; 2449 1.1 christos UINT f_operand1; 2450 1.1 christos 2451 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2452 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2453 1.1 christos 2454 1.1 christos /* Record the fields for the semantic handler. */ 2455 1.1 christos FLD (f_operand1) = f_operand1; 2456 1.1 christos FLD (f_operand2) = f_operand2; 2457 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_d_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2458 1.1 christos 2459 1.1 christos #if WITH_PROFILE_MODEL_P 2460 1.1 christos /* Record the fields for profiling. */ 2461 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2462 1.1 christos { 2463 1.1 christos FLD (in_Rs) = f_operand1; 2464 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 2465 1.1 christos } 2466 1.1 christos #endif 2467 1.1 christos #undef FLD 2468 1.1 christos return idesc; 2469 1.1 christos } 2470 1.1 christos 2471 1.1 christos extract_sfmt_movepcr: 2472 1.1 christos { 2473 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2474 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2475 1.1 christos #define FLD(f) abuf->fields.sfmt_moveq.f 2476 1.1 christos UINT f_operand2; 2477 1.1 christos 2478 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2479 1.1 christos 2480 1.1 christos /* Record the fields for the semantic handler. */ 2481 1.1 christos FLD (f_operand2) = f_operand2; 2482 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movepcr", "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2483 1.1 christos 2484 1.1 christos #if WITH_PROFILE_MODEL_P 2485 1.1 christos /* Record the fields for profiling. */ 2486 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2487 1.1 christos { 2488 1.1 christos FLD (out_Rd) = f_operand2; 2489 1.1 christos } 2490 1.1 christos #endif 2491 1.1 christos #undef FLD 2492 1.1 christos return idesc; 2493 1.1 christos } 2494 1.1 christos 2495 1.1 christos extract_sfmt_moveq: 2496 1.1 christos { 2497 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2498 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2499 1.1 christos #define FLD(f) abuf->fields.sfmt_moveq.f 2500 1.1 christos UINT f_operand2; 2501 1.1 christos INT f_s6; 2502 1.1 christos 2503 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2504 1.1 christos f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6); 2505 1.1 christos 2506 1.1 christos /* Record the fields for the semantic handler. */ 2507 1.1 christos FLD (f_s6) = f_s6; 2508 1.1 christos FLD (f_operand2) = f_operand2; 2509 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_moveq", "f_s6 0x%x", 'x', f_s6, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2510 1.1 christos 2511 1.1 christos #if WITH_PROFILE_MODEL_P 2512 1.1 christos /* Record the fields for profiling. */ 2513 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2514 1.1 christos { 2515 1.1 christos FLD (out_Rd) = f_operand2; 2516 1.1 christos } 2517 1.1 christos #endif 2518 1.1 christos #undef FLD 2519 1.1 christos return idesc; 2520 1.1 christos } 2521 1.1 christos 2522 1.1 christos extract_sfmt_movs_b_r: 2523 1.1 christos { 2524 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2525 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2526 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f 2527 1.1 christos UINT f_operand2; 2528 1.1 christos UINT f_operand1; 2529 1.1 christos 2530 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2531 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2532 1.1 christos 2533 1.1 christos /* Record the fields for the semantic handler. */ 2534 1.1 christos FLD (f_operand1) = f_operand1; 2535 1.1 christos FLD (f_operand2) = f_operand2; 2536 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movs_b_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2537 1.1 christos 2538 1.1 christos #if WITH_PROFILE_MODEL_P 2539 1.1 christos /* Record the fields for profiling. */ 2540 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2541 1.1 christos { 2542 1.1 christos FLD (in_Rs) = f_operand1; 2543 1.1 christos FLD (out_Rd) = f_operand2; 2544 1.1 christos } 2545 1.1 christos #endif 2546 1.1 christos #undef FLD 2547 1.1 christos return idesc; 2548 1.1 christos } 2549 1.1 christos 2550 1.1 christos extract_sfmt_movecbr: 2551 1.1 christos { 2552 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2553 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2554 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f 2555 1.1 christos INT f_indir_pc__byte; 2556 1.1 christos UINT f_operand2; 2557 1.1 christos /* Contents of trailing part of insn. */ 2558 1.1 christos UINT word_1; 2559 1.1 christos 2560 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2561 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2562 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2563 1.1 christos 2564 1.1 christos /* Record the fields for the semantic handler. */ 2565 1.1 christos FLD (f_operand2) = f_operand2; 2566 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 2567 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movecbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 2568 1.1 christos 2569 1.1 christos #if WITH_PROFILE_MODEL_P 2570 1.1 christos /* Record the fields for profiling. */ 2571 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2572 1.1 christos { 2573 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 2574 1.1 christos } 2575 1.1 christos #endif 2576 1.1 christos #undef FLD 2577 1.1 christos return idesc; 2578 1.1 christos } 2579 1.1 christos 2580 1.1 christos extract_sfmt_movecwr: 2581 1.1 christos { 2582 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2583 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2584 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f 2585 1.1 christos INT f_indir_pc__word; 2586 1.1 christos UINT f_operand2; 2587 1.1 christos /* Contents of trailing part of insn. */ 2588 1.1 christos UINT word_1; 2589 1.1 christos 2590 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2591 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2592 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2593 1.1 christos 2594 1.1 christos /* Record the fields for the semantic handler. */ 2595 1.1 christos FLD (f_operand2) = f_operand2; 2596 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 2597 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movecwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 2598 1.1 christos 2599 1.1 christos #if WITH_PROFILE_MODEL_P 2600 1.1 christos /* Record the fields for profiling. */ 2601 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2602 1.1 christos { 2603 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 2604 1.1 christos } 2605 1.1 christos #endif 2606 1.1 christos #undef FLD 2607 1.1 christos return idesc; 2608 1.1 christos } 2609 1.1 christos 2610 1.1 christos extract_sfmt_movecdr: 2611 1.1 christos { 2612 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2613 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2614 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f 2615 1.1 christos INT f_indir_pc__dword; 2616 1.1 christos UINT f_operand2; 2617 1.1 christos /* Contents of trailing part of insn. */ 2618 1.1 christos UINT word_1; 2619 1.1 christos 2620 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2621 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 2622 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2623 1.1 christos 2624 1.1 christos /* Record the fields for the semantic handler. */ 2625 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 2626 1.1 christos FLD (f_operand2) = f_operand2; 2627 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movecdr", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2628 1.1 christos 2629 1.1 christos #if WITH_PROFILE_MODEL_P 2630 1.1 christos /* Record the fields for profiling. */ 2631 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2632 1.1 christos { 2633 1.1 christos FLD (out_Rd) = f_operand2; 2634 1.1 christos } 2635 1.1 christos #endif 2636 1.1 christos #undef FLD 2637 1.1 christos return idesc; 2638 1.1 christos } 2639 1.1 christos 2640 1.1 christos extract_sfmt_movscbr: 2641 1.1 christos { 2642 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2643 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2644 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f 2645 1.1 christos UINT f_operand2; 2646 1.1 christos INT f_indir_pc__byte; 2647 1.1 christos /* Contents of trailing part of insn. */ 2648 1.1 christos UINT word_1; 2649 1.1 christos 2650 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2651 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2652 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2653 1.1 christos 2654 1.1 christos /* Record the fields for the semantic handler. */ 2655 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 2656 1.1 christos FLD (f_operand2) = f_operand2; 2657 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movscbr", "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2658 1.1 christos 2659 1.1 christos #if WITH_PROFILE_MODEL_P 2660 1.1 christos /* Record the fields for profiling. */ 2661 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2662 1.1 christos { 2663 1.1 christos FLD (out_Rd) = f_operand2; 2664 1.1 christos } 2665 1.1 christos #endif 2666 1.1 christos #undef FLD 2667 1.1 christos return idesc; 2668 1.1 christos } 2669 1.1 christos 2670 1.1 christos extract_sfmt_movscwr: 2671 1.1 christos { 2672 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2673 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2674 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f 2675 1.1 christos UINT f_operand2; 2676 1.1 christos INT f_indir_pc__word; 2677 1.1 christos /* Contents of trailing part of insn. */ 2678 1.1 christos UINT word_1; 2679 1.1 christos 2680 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2681 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2682 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2683 1.1 christos 2684 1.1 christos /* Record the fields for the semantic handler. */ 2685 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 2686 1.1 christos FLD (f_operand2) = f_operand2; 2687 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movscwr", "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2688 1.1 christos 2689 1.1 christos #if WITH_PROFILE_MODEL_P 2690 1.1 christos /* Record the fields for profiling. */ 2691 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2692 1.1 christos { 2693 1.1 christos FLD (out_Rd) = f_operand2; 2694 1.1 christos } 2695 1.1 christos #endif 2696 1.1 christos #undef FLD 2697 1.1 christos return idesc; 2698 1.1 christos } 2699 1.1 christos 2700 1.1 christos extract_sfmt_movucbr: 2701 1.1 christos { 2702 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2703 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2704 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f 2705 1.1 christos UINT f_operand2; 2706 1.1 christos INT f_indir_pc__byte; 2707 1.1 christos /* Contents of trailing part of insn. */ 2708 1.1 christos UINT word_1; 2709 1.1 christos 2710 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2711 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2712 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2713 1.1 christos 2714 1.1 christos /* Record the fields for the semantic handler. */ 2715 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 2716 1.1 christos FLD (f_operand2) = f_operand2; 2717 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movucbr", "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2718 1.1 christos 2719 1.1 christos #if WITH_PROFILE_MODEL_P 2720 1.1 christos /* Record the fields for profiling. */ 2721 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2722 1.1 christos { 2723 1.1 christos FLD (out_Rd) = f_operand2; 2724 1.1 christos } 2725 1.1 christos #endif 2726 1.1 christos #undef FLD 2727 1.1 christos return idesc; 2728 1.1 christos } 2729 1.1 christos 2730 1.1 christos extract_sfmt_movucwr: 2731 1.1 christos { 2732 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2733 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2734 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f 2735 1.1 christos UINT f_operand2; 2736 1.1 christos INT f_indir_pc__word; 2737 1.1 christos /* Contents of trailing part of insn. */ 2738 1.1 christos UINT word_1; 2739 1.1 christos 2740 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2741 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2742 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2743 1.1 christos 2744 1.1 christos /* Record the fields for the semantic handler. */ 2745 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 2746 1.1 christos FLD (f_operand2) = f_operand2; 2747 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movucwr", "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 2748 1.1 christos 2749 1.1 christos #if WITH_PROFILE_MODEL_P 2750 1.1 christos /* Record the fields for profiling. */ 2751 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2752 1.1 christos { 2753 1.1 christos FLD (out_Rd) = f_operand2; 2754 1.1 christos } 2755 1.1 christos #endif 2756 1.1 christos #undef FLD 2757 1.1 christos return idesc; 2758 1.1 christos } 2759 1.1 christos 2760 1.1 christos extract_sfmt_addq: 2761 1.1 christos { 2762 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2763 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2764 1.1 christos #define FLD(f) abuf->fields.sfmt_addq.f 2765 1.1 christos UINT f_operand2; 2766 1.1 christos UINT f_u6; 2767 1.1 christos 2768 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2769 1.1 christos f_u6 = EXTRACT_LSB0_UINT (insn, 16, 5, 6); 2770 1.1 christos 2771 1.1 christos /* Record the fields for the semantic handler. */ 2772 1.1 christos FLD (f_operand2) = f_operand2; 2773 1.1 christos FLD (f_u6) = f_u6; 2774 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addq", "f_operand2 0x%x", 'x', f_operand2, "f_u6 0x%x", 'x', f_u6, (char *) 0)); 2775 1.1 christos 2776 1.1 christos #if WITH_PROFILE_MODEL_P 2777 1.1 christos /* Record the fields for profiling. */ 2778 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2779 1.1 christos { 2780 1.1 christos FLD (in_Rd) = f_operand2; 2781 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 2782 1.1 christos } 2783 1.1 christos #endif 2784 1.1 christos #undef FLD 2785 1.1 christos return idesc; 2786 1.1 christos } 2787 1.1 christos 2788 1.1 christos extract_sfmt_cmp_r_b_r: 2789 1.1 christos { 2790 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2791 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2792 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 2793 1.1 christos UINT f_operand2; 2794 1.1 christos UINT f_operand1; 2795 1.1 christos 2796 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2797 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2798 1.1 christos 2799 1.1 christos /* Record the fields for the semantic handler. */ 2800 1.1 christos FLD (f_operand2) = f_operand2; 2801 1.1 christos FLD (f_operand1) = f_operand1; 2802 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_r_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 2803 1.1 christos 2804 1.1 christos #if WITH_PROFILE_MODEL_P 2805 1.1 christos /* Record the fields for profiling. */ 2806 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2807 1.1 christos { 2808 1.1 christos FLD (in_Rd) = f_operand2; 2809 1.1 christos FLD (in_Rs) = f_operand1; 2810 1.1 christos } 2811 1.1 christos #endif 2812 1.1 christos #undef FLD 2813 1.1 christos return idesc; 2814 1.1 christos } 2815 1.1 christos 2816 1.1 christos extract_sfmt_cmp_m_b_m: 2817 1.1 christos { 2818 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2819 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2820 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 2821 1.1 christos UINT f_operand2; 2822 1.1 christos UINT f_memmode; 2823 1.1 christos UINT f_operand1; 2824 1.1 christos 2825 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2826 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 2827 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2828 1.1 christos 2829 1.1 christos /* Record the fields for the semantic handler. */ 2830 1.1 christos FLD (f_operand2) = f_operand2; 2831 1.1 christos FLD (f_operand1) = f_operand1; 2832 1.1 christos FLD (f_memmode) = f_memmode; 2833 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 2834 1.1 christos 2835 1.1 christos #if WITH_PROFILE_MODEL_P 2836 1.1 christos /* Record the fields for profiling. */ 2837 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2838 1.1 christos { 2839 1.1 christos FLD (in_Rd) = f_operand2; 2840 1.1 christos FLD (in_Rs) = f_operand1; 2841 1.1 christos FLD (out_Rs) = f_operand1; 2842 1.1 christos } 2843 1.1 christos #endif 2844 1.1 christos #undef FLD 2845 1.1 christos return idesc; 2846 1.1 christos } 2847 1.1 christos 2848 1.1 christos extract_sfmt_cmp_m_w_m: 2849 1.1 christos { 2850 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2851 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2852 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 2853 1.1 christos UINT f_operand2; 2854 1.1 christos UINT f_memmode; 2855 1.1 christos UINT f_operand1; 2856 1.1 christos 2857 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2858 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 2859 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2860 1.1 christos 2861 1.1 christos /* Record the fields for the semantic handler. */ 2862 1.1 christos FLD (f_operand2) = f_operand2; 2863 1.1 christos FLD (f_operand1) = f_operand1; 2864 1.1 christos FLD (f_memmode) = f_memmode; 2865 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 2866 1.1 christos 2867 1.1 christos #if WITH_PROFILE_MODEL_P 2868 1.1 christos /* Record the fields for profiling. */ 2869 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2870 1.1 christos { 2871 1.1 christos FLD (in_Rd) = f_operand2; 2872 1.1 christos FLD (in_Rs) = f_operand1; 2873 1.1 christos FLD (out_Rs) = f_operand1; 2874 1.1 christos } 2875 1.1 christos #endif 2876 1.1 christos #undef FLD 2877 1.1 christos return idesc; 2878 1.1 christos } 2879 1.1 christos 2880 1.1 christos extract_sfmt_cmp_m_d_m: 2881 1.1 christos { 2882 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2883 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2884 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 2885 1.1 christos UINT f_operand2; 2886 1.1 christos UINT f_memmode; 2887 1.1 christos UINT f_operand1; 2888 1.1 christos 2889 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2890 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 2891 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 2892 1.1 christos 2893 1.1 christos /* Record the fields for the semantic handler. */ 2894 1.1 christos FLD (f_operand2) = f_operand2; 2895 1.1 christos FLD (f_operand1) = f_operand1; 2896 1.1 christos FLD (f_memmode) = f_memmode; 2897 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 2898 1.1 christos 2899 1.1 christos #if WITH_PROFILE_MODEL_P 2900 1.1 christos /* Record the fields for profiling. */ 2901 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2902 1.1 christos { 2903 1.1 christos FLD (in_Rd) = f_operand2; 2904 1.1 christos FLD (in_Rs) = f_operand1; 2905 1.1 christos FLD (out_Rs) = f_operand1; 2906 1.1 christos } 2907 1.1 christos #endif 2908 1.1 christos #undef FLD 2909 1.1 christos return idesc; 2910 1.1 christos } 2911 1.1 christos 2912 1.1 christos extract_sfmt_cmpcbr: 2913 1.1 christos { 2914 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2915 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2916 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f 2917 1.1 christos INT f_indir_pc__byte; 2918 1.1 christos UINT f_operand2; 2919 1.1 christos /* Contents of trailing part of insn. */ 2920 1.1 christos UINT word_1; 2921 1.1 christos 2922 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2923 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2924 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2925 1.1 christos 2926 1.1 christos /* Record the fields for the semantic handler. */ 2927 1.1 christos FLD (f_operand2) = f_operand2; 2928 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 2929 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpcbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 2930 1.1 christos 2931 1.1 christos #if WITH_PROFILE_MODEL_P 2932 1.1 christos /* Record the fields for profiling. */ 2933 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2934 1.1 christos { 2935 1.1 christos FLD (in_Rd) = f_operand2; 2936 1.1 christos } 2937 1.1 christos #endif 2938 1.1 christos #undef FLD 2939 1.1 christos return idesc; 2940 1.1 christos } 2941 1.1 christos 2942 1.1 christos extract_sfmt_cmpcwr: 2943 1.1 christos { 2944 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2945 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2946 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f 2947 1.1 christos INT f_indir_pc__word; 2948 1.1 christos UINT f_operand2; 2949 1.1 christos /* Contents of trailing part of insn. */ 2950 1.1 christos UINT word_1; 2951 1.1 christos 2952 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2953 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 2954 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2955 1.1 christos 2956 1.1 christos /* Record the fields for the semantic handler. */ 2957 1.1 christos FLD (f_operand2) = f_operand2; 2958 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 2959 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpcwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 2960 1.1 christos 2961 1.1 christos #if WITH_PROFILE_MODEL_P 2962 1.1 christos /* Record the fields for profiling. */ 2963 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2964 1.1 christos { 2965 1.1 christos FLD (in_Rd) = f_operand2; 2966 1.1 christos } 2967 1.1 christos #endif 2968 1.1 christos #undef FLD 2969 1.1 christos return idesc; 2970 1.1 christos } 2971 1.1 christos 2972 1.1 christos extract_sfmt_cmpcdr: 2973 1.1 christos { 2974 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 2975 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 2976 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f 2977 1.1 christos INT f_indir_pc__dword; 2978 1.1 christos UINT f_operand2; 2979 1.1 christos /* Contents of trailing part of insn. */ 2980 1.1 christos UINT word_1; 2981 1.1 christos 2982 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 2983 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 2984 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 2985 1.1 christos 2986 1.1 christos /* Record the fields for the semantic handler. */ 2987 1.1 christos FLD (f_operand2) = f_operand2; 2988 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 2989 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpcdr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 2990 1.1 christos 2991 1.1 christos #if WITH_PROFILE_MODEL_P 2992 1.1 christos /* Record the fields for profiling. */ 2993 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 2994 1.1 christos { 2995 1.1 christos FLD (in_Rd) = f_operand2; 2996 1.1 christos } 2997 1.1 christos #endif 2998 1.1 christos #undef FLD 2999 1.1 christos return idesc; 3000 1.1 christos } 3001 1.1 christos 3002 1.1 christos extract_sfmt_cmpq: 3003 1.1 christos { 3004 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3005 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3006 1.1 christos #define FLD(f) abuf->fields.sfmt_andq.f 3007 1.1 christos UINT f_operand2; 3008 1.1 christos INT f_s6; 3009 1.1 christos 3010 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3011 1.1 christos f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6); 3012 1.1 christos 3013 1.1 christos /* Record the fields for the semantic handler. */ 3014 1.1 christos FLD (f_operand2) = f_operand2; 3015 1.1 christos FLD (f_s6) = f_s6; 3016 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpq", "f_operand2 0x%x", 'x', f_operand2, "f_s6 0x%x", 'x', f_s6, (char *) 0)); 3017 1.1 christos 3018 1.1 christos #if WITH_PROFILE_MODEL_P 3019 1.1 christos /* Record the fields for profiling. */ 3020 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3021 1.1 christos { 3022 1.1 christos FLD (in_Rd) = f_operand2; 3023 1.1 christos } 3024 1.1 christos #endif 3025 1.1 christos #undef FLD 3026 1.1 christos return idesc; 3027 1.1 christos } 3028 1.1 christos 3029 1.1 christos extract_sfmt_cmpucbr: 3030 1.1 christos { 3031 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3032 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3033 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f 3034 1.1 christos INT f_indir_pc__byte; 3035 1.1 christos UINT f_operand2; 3036 1.1 christos /* Contents of trailing part of insn. */ 3037 1.1 christos UINT word_1; 3038 1.1 christos 3039 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3040 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3041 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3042 1.1 christos 3043 1.1 christos /* Record the fields for the semantic handler. */ 3044 1.1 christos FLD (f_operand2) = f_operand2; 3045 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 3046 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpucbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 3047 1.1 christos 3048 1.1 christos #if WITH_PROFILE_MODEL_P 3049 1.1 christos /* Record the fields for profiling. */ 3050 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3051 1.1 christos { 3052 1.1 christos FLD (in_Rd) = f_operand2; 3053 1.1 christos } 3054 1.1 christos #endif 3055 1.1 christos #undef FLD 3056 1.1 christos return idesc; 3057 1.1 christos } 3058 1.1 christos 3059 1.1 christos extract_sfmt_cmpucwr: 3060 1.1 christos { 3061 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3062 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3063 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f 3064 1.1 christos INT f_indir_pc__word; 3065 1.1 christos UINT f_operand2; 3066 1.1 christos /* Contents of trailing part of insn. */ 3067 1.1 christos UINT word_1; 3068 1.1 christos 3069 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3070 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3071 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3072 1.1 christos 3073 1.1 christos /* Record the fields for the semantic handler. */ 3074 1.1 christos FLD (f_operand2) = f_operand2; 3075 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 3076 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpucwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 3077 1.1 christos 3078 1.1 christos #if WITH_PROFILE_MODEL_P 3079 1.1 christos /* Record the fields for profiling. */ 3080 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3081 1.1 christos { 3082 1.1 christos FLD (in_Rd) = f_operand2; 3083 1.1 christos } 3084 1.1 christos #endif 3085 1.1 christos #undef FLD 3086 1.1 christos return idesc; 3087 1.1 christos } 3088 1.1 christos 3089 1.1 christos extract_sfmt_move_m_b_m: 3090 1.1 christos { 3091 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3092 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3093 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3094 1.1 christos UINT f_operand2; 3095 1.1 christos UINT f_memmode; 3096 1.1 christos UINT f_operand1; 3097 1.1 christos 3098 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3099 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3100 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3101 1.1 christos 3102 1.1 christos /* Record the fields for the semantic handler. */ 3103 1.1 christos FLD (f_operand1) = f_operand1; 3104 1.1 christos FLD (f_operand2) = f_operand2; 3105 1.1 christos FLD (f_memmode) = f_memmode; 3106 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_b_m", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3107 1.1 christos 3108 1.1 christos #if WITH_PROFILE_MODEL_P 3109 1.1 christos /* Record the fields for profiling. */ 3110 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3111 1.1 christos { 3112 1.1 christos FLD (in_Rs) = f_operand1; 3113 1.1 christos FLD (out_Rs) = f_operand1; 3114 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3115 1.1 christos } 3116 1.1 christos #endif 3117 1.1 christos #undef FLD 3118 1.1 christos return idesc; 3119 1.1 christos } 3120 1.1 christos 3121 1.1 christos extract_sfmt_move_m_w_m: 3122 1.1 christos { 3123 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3124 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3125 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3126 1.1 christos UINT f_operand2; 3127 1.1 christos UINT f_memmode; 3128 1.1 christos UINT f_operand1; 3129 1.1 christos 3130 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3131 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3132 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3133 1.1 christos 3134 1.1 christos /* Record the fields for the semantic handler. */ 3135 1.1 christos FLD (f_operand1) = f_operand1; 3136 1.1 christos FLD (f_operand2) = f_operand2; 3137 1.1 christos FLD (f_memmode) = f_memmode; 3138 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_w_m", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3139 1.1 christos 3140 1.1 christos #if WITH_PROFILE_MODEL_P 3141 1.1 christos /* Record the fields for profiling. */ 3142 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3143 1.1 christos { 3144 1.1 christos FLD (in_Rs) = f_operand1; 3145 1.1 christos FLD (out_Rs) = f_operand1; 3146 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3147 1.1 christos } 3148 1.1 christos #endif 3149 1.1 christos #undef FLD 3150 1.1 christos return idesc; 3151 1.1 christos } 3152 1.1 christos 3153 1.1 christos extract_sfmt_move_m_d_m: 3154 1.1 christos { 3155 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3156 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3157 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3158 1.1 christos UINT f_operand2; 3159 1.1 christos UINT f_memmode; 3160 1.1 christos UINT f_operand1; 3161 1.1 christos 3162 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3163 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3164 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3165 1.1 christos 3166 1.1 christos /* Record the fields for the semantic handler. */ 3167 1.1 christos FLD (f_operand1) = f_operand1; 3168 1.1 christos FLD (f_operand2) = f_operand2; 3169 1.1 christos FLD (f_memmode) = f_memmode; 3170 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_d_m", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3171 1.1 christos 3172 1.1 christos #if WITH_PROFILE_MODEL_P 3173 1.1 christos /* Record the fields for profiling. */ 3174 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3175 1.1 christos { 3176 1.1 christos FLD (in_Rs) = f_operand1; 3177 1.1 christos FLD (out_Rs) = f_operand1; 3178 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3179 1.1 christos } 3180 1.1 christos #endif 3181 1.1 christos #undef FLD 3182 1.1 christos return idesc; 3183 1.1 christos } 3184 1.1 christos 3185 1.1 christos extract_sfmt_movs_m_b_m: 3186 1.1 christos { 3187 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3188 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3189 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 3190 1.1 christos UINT f_operand2; 3191 1.1 christos UINT f_memmode; 3192 1.1 christos UINT f_operand1; 3193 1.1 christos 3194 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3195 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3196 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3197 1.1 christos 3198 1.1 christos /* Record the fields for the semantic handler. */ 3199 1.1 christos FLD (f_operand1) = f_operand1; 3200 1.1 christos FLD (f_memmode) = f_memmode; 3201 1.1 christos FLD (f_operand2) = f_operand2; 3202 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movs_m_b_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 3203 1.1 christos 3204 1.1 christos #if WITH_PROFILE_MODEL_P 3205 1.1 christos /* Record the fields for profiling. */ 3206 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3207 1.1 christos { 3208 1.1 christos FLD (in_Rs) = f_operand1; 3209 1.1 christos FLD (out_Rd) = f_operand2; 3210 1.1 christos FLD (out_Rs) = f_operand1; 3211 1.1 christos } 3212 1.1 christos #endif 3213 1.1 christos #undef FLD 3214 1.1 christos return idesc; 3215 1.1 christos } 3216 1.1 christos 3217 1.1 christos extract_sfmt_movs_m_w_m: 3218 1.1 christos { 3219 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3220 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3221 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 3222 1.1 christos UINT f_operand2; 3223 1.1 christos UINT f_memmode; 3224 1.1 christos UINT f_operand1; 3225 1.1 christos 3226 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3227 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3228 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3229 1.1 christos 3230 1.1 christos /* Record the fields for the semantic handler. */ 3231 1.1 christos FLD (f_operand1) = f_operand1; 3232 1.1 christos FLD (f_memmode) = f_memmode; 3233 1.1 christos FLD (f_operand2) = f_operand2; 3234 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movs_m_w_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 3235 1.1 christos 3236 1.1 christos #if WITH_PROFILE_MODEL_P 3237 1.1 christos /* Record the fields for profiling. */ 3238 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3239 1.1 christos { 3240 1.1 christos FLD (in_Rs) = f_operand1; 3241 1.1 christos FLD (out_Rd) = f_operand2; 3242 1.1 christos FLD (out_Rs) = f_operand1; 3243 1.1 christos } 3244 1.1 christos #endif 3245 1.1 christos #undef FLD 3246 1.1 christos return idesc; 3247 1.1 christos } 3248 1.1 christos 3249 1.1 christos extract_sfmt_move_r_sprv10: 3250 1.1 christos { 3251 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3252 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3253 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f 3254 1.1 christos UINT f_operand2; 3255 1.1 christos UINT f_operand1; 3256 1.1 christos 3257 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3258 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3259 1.1 christos 3260 1.1 christos /* Record the fields for the semantic handler. */ 3261 1.1 christos FLD (f_operand1) = f_operand1; 3262 1.1 christos FLD (f_operand2) = f_operand2; 3263 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_sprv10", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 3264 1.1 christos 3265 1.1 christos #if WITH_PROFILE_MODEL_P 3266 1.1 christos /* Record the fields for profiling. */ 3267 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3268 1.1 christos { 3269 1.1 christos FLD (in_Rs) = f_operand1; 3270 1.1 christos FLD (out_Pd) = f_operand2; 3271 1.1 christos } 3272 1.1 christos #endif 3273 1.1 christos #undef FLD 3274 1.1 christos return idesc; 3275 1.1 christos } 3276 1.1 christos 3277 1.1 christos extract_sfmt_move_spr_rv10: 3278 1.1 christos { 3279 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3280 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3281 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_rv10.f 3282 1.1 christos UINT f_operand2; 3283 1.1 christos UINT f_operand1; 3284 1.1 christos 3285 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3286 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3287 1.1 christos 3288 1.1 christos /* Record the fields for the semantic handler. */ 3289 1.1 christos FLD (f_operand2) = f_operand2; 3290 1.1 christos FLD (f_operand1) = f_operand1; 3291 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_spr_rv10", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 3292 1.1 christos 3293 1.1 christos #if WITH_PROFILE_MODEL_P 3294 1.1 christos /* Record the fields for profiling. */ 3295 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3296 1.1 christos { 3297 1.1 christos FLD (in_Ps) = f_operand2; 3298 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rs) = FLD (f_operand1); 3299 1.1 christos } 3300 1.1 christos #endif 3301 1.1 christos #undef FLD 3302 1.1 christos return idesc; 3303 1.1 christos } 3304 1.1 christos 3305 1.1 christos extract_sfmt_ret_type: 3306 1.1 christos { 3307 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3308 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3309 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_rv10.f 3310 1.1 christos UINT f_operand2; 3311 1.1 christos 3312 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3313 1.1 christos 3314 1.1 christos /* Record the fields for the semantic handler. */ 3315 1.1 christos FLD (f_operand2) = f_operand2; 3316 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ret_type", "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 3317 1.1 christos 3318 1.1 christos #if WITH_PROFILE_MODEL_P 3319 1.1 christos /* Record the fields for profiling. */ 3320 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3321 1.1 christos { 3322 1.1 christos FLD (in_Ps) = f_operand2; 3323 1.1 christos } 3324 1.1 christos #endif 3325 1.1 christos #undef FLD 3326 1.1 christos return idesc; 3327 1.1 christos } 3328 1.1 christos 3329 1.1 christos extract_sfmt_move_m_sprv10: 3330 1.1 christos { 3331 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3332 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3333 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f 3334 1.1 christos UINT f_operand2; 3335 1.1 christos UINT f_memmode; 3336 1.1 christos UINT f_operand1; 3337 1.1 christos 3338 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3339 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3340 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3341 1.1 christos 3342 1.1 christos /* Record the fields for the semantic handler. */ 3343 1.1 christos FLD (f_operand1) = f_operand1; 3344 1.1 christos FLD (f_operand2) = f_operand2; 3345 1.1 christos FLD (f_memmode) = f_memmode; 3346 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_sprv10", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3347 1.1 christos 3348 1.1 christos #if WITH_PROFILE_MODEL_P 3349 1.1 christos /* Record the fields for profiling. */ 3350 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3351 1.1 christos { 3352 1.1 christos FLD (in_Rs) = f_operand1; 3353 1.1 christos FLD (out_Pd) = f_operand2; 3354 1.1 christos FLD (out_Rs) = f_operand1; 3355 1.1 christos } 3356 1.1 christos #endif 3357 1.1 christos #undef FLD 3358 1.1 christos return idesc; 3359 1.1 christos } 3360 1.1 christos 3361 1.1 christos extract_sfmt_move_c_sprv10_p5: 3362 1.1 christos { 3363 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3364 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3365 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p5.f 3366 1.1 christos UINT f_operand2; 3367 1.1 christos INT f_indir_pc__word; 3368 1.1 christos /* Contents of trailing part of insn. */ 3369 1.1 christos UINT word_1; 3370 1.1 christos 3371 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3372 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3373 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3374 1.1 christos 3375 1.1 christos /* Record the fields for the semantic handler. */ 3376 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 3377 1.1 christos FLD (f_operand2) = f_operand2; 3378 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_c_sprv10_p5", "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 3379 1.1 christos 3380 1.1 christos #if WITH_PROFILE_MODEL_P 3381 1.1 christos /* Record the fields for profiling. */ 3382 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3383 1.1 christos { 3384 1.1 christos FLD (out_Pd) = f_operand2; 3385 1.1 christos } 3386 1.1 christos #endif 3387 1.1 christos #undef FLD 3388 1.1 christos return idesc; 3389 1.1 christos } 3390 1.1 christos 3391 1.1 christos extract_sfmt_move_c_sprv10_p9: 3392 1.1 christos { 3393 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3394 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3395 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f 3396 1.1 christos INT f_indir_pc__dword; 3397 1.1 christos UINT f_operand2; 3398 1.1 christos /* Contents of trailing part of insn. */ 3399 1.1 christos UINT word_1; 3400 1.1 christos 3401 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3402 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 3403 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3404 1.1 christos 3405 1.1 christos /* Record the fields for the semantic handler. */ 3406 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 3407 1.1 christos FLD (f_operand2) = f_operand2; 3408 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_c_sprv10_p9", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 3409 1.1 christos 3410 1.1 christos #if WITH_PROFILE_MODEL_P 3411 1.1 christos /* Record the fields for profiling. */ 3412 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3413 1.1 christos { 3414 1.1 christos FLD (out_Pd) = f_operand2; 3415 1.1 christos } 3416 1.1 christos #endif 3417 1.1 christos #undef FLD 3418 1.1 christos return idesc; 3419 1.1 christos } 3420 1.1 christos 3421 1.1 christos extract_sfmt_move_spr_mv10: 3422 1.1 christos { 3423 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3424 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3425 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 3426 1.1 christos UINT f_operand2; 3427 1.1 christos UINT f_memmode; 3428 1.1 christos UINT f_operand1; 3429 1.1 christos 3430 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3431 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3432 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3433 1.1 christos 3434 1.1 christos /* Record the fields for the semantic handler. */ 3435 1.1 christos FLD (f_operand2) = f_operand2; 3436 1.1 christos FLD (f_operand1) = f_operand1; 3437 1.1 christos FLD (f_memmode) = f_memmode; 3438 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_spr_mv10", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3439 1.1 christos 3440 1.1 christos #if WITH_PROFILE_MODEL_P 3441 1.1 christos /* Record the fields for profiling. */ 3442 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3443 1.1 christos { 3444 1.1 christos FLD (in_Ps) = f_operand2; 3445 1.1 christos FLD (in_Rs) = f_operand1; 3446 1.1 christos FLD (out_Rs) = f_operand1; 3447 1.1 christos } 3448 1.1 christos #endif 3449 1.1 christos #undef FLD 3450 1.1 christos return idesc; 3451 1.1 christos } 3452 1.1 christos 3453 1.1 christos extract_sfmt_sbfs: 3454 1.1 christos { 3455 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3456 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3457 1.1 christos 3458 1.1 christos 3459 1.1 christos /* Record the fields for the semantic handler. */ 3460 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sbfs", (char *) 0)); 3461 1.1 christos 3462 1.1 christos #undef FLD 3463 1.1 christos return idesc; 3464 1.1 christos } 3465 1.1 christos 3466 1.1 christos extract_sfmt_movem_r_m: 3467 1.1 christos { 3468 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3469 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3470 1.1 christos #define FLD(f) abuf->fields.sfmt_movem_r_m.f 3471 1.1 christos UINT f_operand2; 3472 1.1 christos UINT f_memmode; 3473 1.1 christos UINT f_operand1; 3474 1.1 christos 3475 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3476 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3477 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3478 1.1 christos 3479 1.1 christos /* Record the fields for the semantic handler. */ 3480 1.1 christos FLD (f_operand2) = f_operand2; 3481 1.1 christos FLD (f_operand1) = f_operand1; 3482 1.1 christos FLD (f_memmode) = f_memmode; 3483 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movem_r_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3484 1.1 christos 3485 1.1 christos #if WITH_PROFILE_MODEL_P 3486 1.1 christos /* Record the fields for profiling. */ 3487 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3488 1.1 christos { 3489 1.1 christos FLD (in_Rd) = f_operand2; 3490 1.1 christos FLD (in_Rs) = f_operand1; 3491 1.1 christos FLD (in_h_gr_SI_0) = 0; 3492 1.1 christos FLD (in_h_gr_SI_1) = 1; 3493 1.1 christos FLD (in_h_gr_SI_10) = 10; 3494 1.1 christos FLD (in_h_gr_SI_11) = 11; 3495 1.1 christos FLD (in_h_gr_SI_12) = 12; 3496 1.1 christos FLD (in_h_gr_SI_13) = 13; 3497 1.1 christos FLD (in_h_gr_SI_14) = 14; 3498 1.1 christos FLD (in_h_gr_SI_15) = 15; 3499 1.1 christos FLD (in_h_gr_SI_2) = 2; 3500 1.1 christos FLD (in_h_gr_SI_3) = 3; 3501 1.1 christos FLD (in_h_gr_SI_4) = 4; 3502 1.1 christos FLD (in_h_gr_SI_5) = 5; 3503 1.1 christos FLD (in_h_gr_SI_6) = 6; 3504 1.1 christos FLD (in_h_gr_SI_7) = 7; 3505 1.1 christos FLD (in_h_gr_SI_8) = 8; 3506 1.1 christos FLD (in_h_gr_SI_9) = 9; 3507 1.1 christos FLD (out_Rs) = f_operand1; 3508 1.1 christos } 3509 1.1 christos #endif 3510 1.1 christos #undef FLD 3511 1.1 christos return idesc; 3512 1.1 christos } 3513 1.1 christos 3514 1.1 christos extract_sfmt_movem_m_r: 3515 1.1 christos { 3516 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3517 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3518 1.1 christos #define FLD(f) abuf->fields.sfmt_movem_m_r.f 3519 1.1 christos UINT f_operand2; 3520 1.1 christos UINT f_memmode; 3521 1.1 christos UINT f_operand1; 3522 1.1 christos 3523 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3524 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3525 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3526 1.1 christos 3527 1.1 christos /* Record the fields for the semantic handler. */ 3528 1.1 christos FLD (f_operand2) = f_operand2; 3529 1.1 christos FLD (f_operand1) = f_operand1; 3530 1.1 christos FLD (f_memmode) = f_memmode; 3531 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movem_m_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3532 1.1 christos 3533 1.1 christos #if WITH_PROFILE_MODEL_P 3534 1.1 christos /* Record the fields for profiling. */ 3535 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3536 1.1 christos { 3537 1.1 christos FLD (in_Rd) = f_operand2; 3538 1.1 christos FLD (in_Rs) = f_operand1; 3539 1.1 christos FLD (out_Rs) = f_operand1; 3540 1.1 christos FLD (out_h_gr_SI_0) = 0; 3541 1.1 christos FLD (out_h_gr_SI_1) = 1; 3542 1.1 christos FLD (out_h_gr_SI_10) = 10; 3543 1.1 christos FLD (out_h_gr_SI_11) = 11; 3544 1.1 christos FLD (out_h_gr_SI_12) = 12; 3545 1.1 christos FLD (out_h_gr_SI_13) = 13; 3546 1.1 christos FLD (out_h_gr_SI_14) = 14; 3547 1.1 christos FLD (out_h_gr_SI_2) = 2; 3548 1.1 christos FLD (out_h_gr_SI_3) = 3; 3549 1.1 christos FLD (out_h_gr_SI_4) = 4; 3550 1.1 christos FLD (out_h_gr_SI_5) = 5; 3551 1.1 christos FLD (out_h_gr_SI_6) = 6; 3552 1.1 christos FLD (out_h_gr_SI_7) = 7; 3553 1.1 christos FLD (out_h_gr_SI_8) = 8; 3554 1.1 christos FLD (out_h_gr_SI_9) = 9; 3555 1.1 christos } 3556 1.1 christos #endif 3557 1.1 christos #undef FLD 3558 1.1 christos return idesc; 3559 1.1 christos } 3560 1.1 christos 3561 1.1 christos extract_sfmt_movem_m_pc: 3562 1.1 christos { 3563 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3564 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3565 1.1 christos #define FLD(f) abuf->fields.sfmt_movem_m_r.f 3566 1.1 christos UINT f_memmode; 3567 1.1 christos UINT f_operand1; 3568 1.1 christos 3569 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3570 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3571 1.1 christos 3572 1.1 christos /* Record the fields for the semantic handler. */ 3573 1.1 christos FLD (f_operand1) = f_operand1; 3574 1.1 christos FLD (f_memmode) = f_memmode; 3575 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movem_m_pc", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3576 1.1 christos 3577 1.1 christos #if WITH_PROFILE_MODEL_P 3578 1.1 christos /* Record the fields for profiling. */ 3579 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3580 1.1 christos { 3581 1.1 christos FLD (in_Rs) = f_operand1; 3582 1.1 christos FLD (out_Rs) = f_operand1; 3583 1.1 christos FLD (out_h_gr_SI_0) = 0; 3584 1.1 christos FLD (out_h_gr_SI_1) = 1; 3585 1.1 christos FLD (out_h_gr_SI_10) = 10; 3586 1.1 christos FLD (out_h_gr_SI_11) = 11; 3587 1.1 christos FLD (out_h_gr_SI_12) = 12; 3588 1.1 christos FLD (out_h_gr_SI_13) = 13; 3589 1.1 christos FLD (out_h_gr_SI_14) = 14; 3590 1.1 christos FLD (out_h_gr_SI_2) = 2; 3591 1.1 christos FLD (out_h_gr_SI_3) = 3; 3592 1.1 christos FLD (out_h_gr_SI_4) = 4; 3593 1.1 christos FLD (out_h_gr_SI_5) = 5; 3594 1.1 christos FLD (out_h_gr_SI_6) = 6; 3595 1.1 christos FLD (out_h_gr_SI_7) = 7; 3596 1.1 christos FLD (out_h_gr_SI_8) = 8; 3597 1.1 christos FLD (out_h_gr_SI_9) = 9; 3598 1.1 christos } 3599 1.1 christos #endif 3600 1.1 christos #undef FLD 3601 1.1 christos return idesc; 3602 1.1 christos } 3603 1.1 christos 3604 1.1 christos extract_sfmt_add_b_r: 3605 1.1 christos { 3606 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3607 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3608 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 3609 1.1 christos UINT f_operand2; 3610 1.1 christos UINT f_operand1; 3611 1.1 christos 3612 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3613 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3614 1.1 christos 3615 1.1 christos /* Record the fields for the semantic handler. */ 3616 1.1 christos FLD (f_operand2) = f_operand2; 3617 1.1 christos FLD (f_operand1) = f_operand1; 3618 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 3619 1.1 christos 3620 1.1 christos #if WITH_PROFILE_MODEL_P 3621 1.1 christos /* Record the fields for profiling. */ 3622 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3623 1.1 christos { 3624 1.1 christos FLD (in_Rd) = f_operand2; 3625 1.1 christos FLD (in_Rs) = f_operand1; 3626 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 3627 1.1 christos } 3628 1.1 christos #endif 3629 1.1 christos #undef FLD 3630 1.1 christos return idesc; 3631 1.1 christos } 3632 1.1 christos 3633 1.1 christos extract_sfmt_add_d_r: 3634 1.1 christos { 3635 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3636 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3637 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 3638 1.1 christos UINT f_operand2; 3639 1.1 christos UINT f_operand1; 3640 1.1 christos 3641 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3642 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3643 1.1 christos 3644 1.1 christos /* Record the fields for the semantic handler. */ 3645 1.1 christos FLD (f_operand2) = f_operand2; 3646 1.1 christos FLD (f_operand1) = f_operand1; 3647 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_d_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 3648 1.1 christos 3649 1.1 christos #if WITH_PROFILE_MODEL_P 3650 1.1 christos /* Record the fields for profiling. */ 3651 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3652 1.1 christos { 3653 1.1 christos FLD (in_Rd) = f_operand2; 3654 1.1 christos FLD (in_Rs) = f_operand1; 3655 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 3656 1.1 christos } 3657 1.1 christos #endif 3658 1.1 christos #undef FLD 3659 1.1 christos return idesc; 3660 1.1 christos } 3661 1.1 christos 3662 1.1 christos extract_sfmt_add_m_b_m: 3663 1.1 christos { 3664 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3665 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3666 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3667 1.1 christos UINT f_operand2; 3668 1.1 christos UINT f_memmode; 3669 1.1 christos UINT f_operand1; 3670 1.1 christos 3671 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3672 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3673 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3674 1.1 christos 3675 1.1 christos /* Record the fields for the semantic handler. */ 3676 1.1 christos FLD (f_operand2) = f_operand2; 3677 1.1 christos FLD (f_operand1) = f_operand1; 3678 1.1 christos FLD (f_memmode) = f_memmode; 3679 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3680 1.1 christos 3681 1.1 christos #if WITH_PROFILE_MODEL_P 3682 1.1 christos /* Record the fields for profiling. */ 3683 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3684 1.1 christos { 3685 1.1 christos FLD (in_Rd) = f_operand2; 3686 1.1 christos FLD (in_Rs) = f_operand1; 3687 1.1 christos FLD (out_Rs) = f_operand1; 3688 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3689 1.1 christos } 3690 1.1 christos #endif 3691 1.1 christos #undef FLD 3692 1.1 christos return idesc; 3693 1.1 christos } 3694 1.1 christos 3695 1.1 christos extract_sfmt_add_m_w_m: 3696 1.1 christos { 3697 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3698 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3699 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3700 1.1 christos UINT f_operand2; 3701 1.1 christos UINT f_memmode; 3702 1.1 christos UINT f_operand1; 3703 1.1 christos 3704 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3705 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3706 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3707 1.1 christos 3708 1.1 christos /* Record the fields for the semantic handler. */ 3709 1.1 christos FLD (f_operand2) = f_operand2; 3710 1.1 christos FLD (f_operand1) = f_operand1; 3711 1.1 christos FLD (f_memmode) = f_memmode; 3712 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3713 1.1 christos 3714 1.1 christos #if WITH_PROFILE_MODEL_P 3715 1.1 christos /* Record the fields for profiling. */ 3716 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3717 1.1 christos { 3718 1.1 christos FLD (in_Rd) = f_operand2; 3719 1.1 christos FLD (in_Rs) = f_operand1; 3720 1.1 christos FLD (out_Rs) = f_operand1; 3721 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3722 1.1 christos } 3723 1.1 christos #endif 3724 1.1 christos #undef FLD 3725 1.1 christos return idesc; 3726 1.1 christos } 3727 1.1 christos 3728 1.1 christos extract_sfmt_add_m_d_m: 3729 1.1 christos { 3730 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3731 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3732 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3733 1.1 christos UINT f_operand2; 3734 1.1 christos UINT f_memmode; 3735 1.1 christos UINT f_operand1; 3736 1.1 christos 3737 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3738 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3739 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3740 1.1 christos 3741 1.1 christos /* Record the fields for the semantic handler. */ 3742 1.1 christos FLD (f_operand2) = f_operand2; 3743 1.1 christos FLD (f_operand1) = f_operand1; 3744 1.1 christos FLD (f_memmode) = f_memmode; 3745 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3746 1.1 christos 3747 1.1 christos #if WITH_PROFILE_MODEL_P 3748 1.1 christos /* Record the fields for profiling. */ 3749 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3750 1.1 christos { 3751 1.1 christos FLD (in_Rd) = f_operand2; 3752 1.1 christos FLD (in_Rs) = f_operand1; 3753 1.1 christos FLD (out_Rs) = f_operand1; 3754 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3755 1.1 christos } 3756 1.1 christos #endif 3757 1.1 christos #undef FLD 3758 1.1 christos return idesc; 3759 1.1 christos } 3760 1.1 christos 3761 1.1 christos extract_sfmt_addcbr: 3762 1.1 christos { 3763 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3764 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3765 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f 3766 1.1 christos INT f_indir_pc__byte; 3767 1.1 christos UINT f_operand2; 3768 1.1 christos /* Contents of trailing part of insn. */ 3769 1.1 christos UINT word_1; 3770 1.1 christos 3771 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3772 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3773 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3774 1.1 christos 3775 1.1 christos /* Record the fields for the semantic handler. */ 3776 1.1 christos FLD (f_operand2) = f_operand2; 3777 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 3778 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 3779 1.1 christos 3780 1.1 christos #if WITH_PROFILE_MODEL_P 3781 1.1 christos /* Record the fields for profiling. */ 3782 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3783 1.1 christos { 3784 1.1 christos FLD (in_Rd) = f_operand2; 3785 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 3786 1.1 christos } 3787 1.1 christos #endif 3788 1.1 christos #undef FLD 3789 1.1 christos return idesc; 3790 1.1 christos } 3791 1.1 christos 3792 1.1 christos extract_sfmt_addcwr: 3793 1.1 christos { 3794 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3795 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3796 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f 3797 1.1 christos INT f_indir_pc__word; 3798 1.1 christos UINT f_operand2; 3799 1.1 christos /* Contents of trailing part of insn. */ 3800 1.1 christos UINT word_1; 3801 1.1 christos 3802 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3803 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3804 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3805 1.1 christos 3806 1.1 christos /* Record the fields for the semantic handler. */ 3807 1.1 christos FLD (f_operand2) = f_operand2; 3808 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 3809 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 3810 1.1 christos 3811 1.1 christos #if WITH_PROFILE_MODEL_P 3812 1.1 christos /* Record the fields for profiling. */ 3813 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3814 1.1 christos { 3815 1.1 christos FLD (in_Rd) = f_operand2; 3816 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 3817 1.1 christos } 3818 1.1 christos #endif 3819 1.1 christos #undef FLD 3820 1.1 christos return idesc; 3821 1.1 christos } 3822 1.1 christos 3823 1.1 christos extract_sfmt_addcdr: 3824 1.1 christos { 3825 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3826 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3827 1.1 christos #define FLD(f) abuf->fields.sfmt_addcdr.f 3828 1.1 christos INT f_indir_pc__dword; 3829 1.1 christos UINT f_operand2; 3830 1.1 christos /* Contents of trailing part of insn. */ 3831 1.1 christos UINT word_1; 3832 1.1 christos 3833 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3834 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 3835 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3836 1.1 christos 3837 1.1 christos /* Record the fields for the semantic handler. */ 3838 1.1 christos FLD (f_operand2) = f_operand2; 3839 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 3840 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcdr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 3841 1.1 christos 3842 1.1 christos #if WITH_PROFILE_MODEL_P 3843 1.1 christos /* Record the fields for profiling. */ 3844 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3845 1.1 christos { 3846 1.1 christos FLD (in_Rd) = f_operand2; 3847 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 3848 1.1 christos } 3849 1.1 christos #endif 3850 1.1 christos #undef FLD 3851 1.1 christos return idesc; 3852 1.1 christos } 3853 1.1 christos 3854 1.1 christos extract_sfmt_addcpc: 3855 1.1 christos { 3856 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3857 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3858 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f 3859 1.1 christos INT f_indir_pc__dword; 3860 1.1 christos /* Contents of trailing part of insn. */ 3861 1.1 christos UINT word_1; 3862 1.1 christos 3863 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3864 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 3865 1.1 christos 3866 1.1 christos /* Record the fields for the semantic handler. */ 3867 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 3868 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcpc", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 3869 1.1 christos 3870 1.1 christos #if WITH_PROFILE_MODEL_P 3871 1.1 christos /* Record the fields for profiling. */ 3872 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3873 1.1 christos { 3874 1.1 christos } 3875 1.1 christos #endif 3876 1.1 christos #undef FLD 3877 1.1 christos return idesc; 3878 1.1 christos } 3879 1.1 christos 3880 1.1 christos extract_sfmt_adds_m_b_m: 3881 1.1 christos { 3882 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3883 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3884 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3885 1.1 christos UINT f_operand2; 3886 1.1 christos UINT f_memmode; 3887 1.1 christos UINT f_operand1; 3888 1.1 christos 3889 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3890 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3891 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3892 1.1 christos 3893 1.1 christos /* Record the fields for the semantic handler. */ 3894 1.1 christos FLD (f_operand2) = f_operand2; 3895 1.1 christos FLD (f_operand1) = f_operand1; 3896 1.1 christos FLD (f_memmode) = f_memmode; 3897 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_adds_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3898 1.1 christos 3899 1.1 christos #if WITH_PROFILE_MODEL_P 3900 1.1 christos /* Record the fields for profiling. */ 3901 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3902 1.1 christos { 3903 1.1 christos FLD (in_Rd) = f_operand2; 3904 1.1 christos FLD (in_Rs) = f_operand1; 3905 1.1 christos FLD (out_Rs) = f_operand1; 3906 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3907 1.1 christos } 3908 1.1 christos #endif 3909 1.1 christos #undef FLD 3910 1.1 christos return idesc; 3911 1.1 christos } 3912 1.1 christos 3913 1.1 christos extract_sfmt_adds_m_w_m: 3914 1.1 christos { 3915 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3916 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3917 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 3918 1.1 christos UINT f_operand2; 3919 1.1 christos UINT f_memmode; 3920 1.1 christos UINT f_operand1; 3921 1.1 christos 3922 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3923 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 3924 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 3925 1.1 christos 3926 1.1 christos /* Record the fields for the semantic handler. */ 3927 1.1 christos FLD (f_operand2) = f_operand2; 3928 1.1 christos FLD (f_operand1) = f_operand1; 3929 1.1 christos FLD (f_memmode) = f_memmode; 3930 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_adds_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 3931 1.1 christos 3932 1.1 christos #if WITH_PROFILE_MODEL_P 3933 1.1 christos /* Record the fields for profiling. */ 3934 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3935 1.1 christos { 3936 1.1 christos FLD (in_Rd) = f_operand2; 3937 1.1 christos FLD (in_Rs) = f_operand1; 3938 1.1 christos FLD (out_Rs) = f_operand1; 3939 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 3940 1.1 christos } 3941 1.1 christos #endif 3942 1.1 christos #undef FLD 3943 1.1 christos return idesc; 3944 1.1 christos } 3945 1.1 christos 3946 1.1 christos extract_sfmt_addscbr: 3947 1.1 christos { 3948 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3949 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3950 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f 3951 1.1 christos INT f_indir_pc__byte; 3952 1.1 christos UINT f_operand2; 3953 1.1 christos /* Contents of trailing part of insn. */ 3954 1.1 christos UINT word_1; 3955 1.1 christos 3956 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3957 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3958 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3959 1.1 christos 3960 1.1 christos /* Record the fields for the semantic handler. */ 3961 1.1 christos FLD (f_operand2) = f_operand2; 3962 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 3963 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addscbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 3964 1.1 christos 3965 1.1 christos #if WITH_PROFILE_MODEL_P 3966 1.1 christos /* Record the fields for profiling. */ 3967 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3968 1.1 christos { 3969 1.1 christos FLD (in_Rd) = f_operand2; 3970 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 3971 1.1 christos } 3972 1.1 christos #endif 3973 1.1 christos #undef FLD 3974 1.1 christos return idesc; 3975 1.1 christos } 3976 1.1 christos 3977 1.1 christos extract_sfmt_addscwr: 3978 1.1 christos { 3979 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 3980 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 3981 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f 3982 1.1 christos INT f_indir_pc__word; 3983 1.1 christos UINT f_operand2; 3984 1.1 christos /* Contents of trailing part of insn. */ 3985 1.1 christos UINT word_1; 3986 1.1 christos 3987 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 3988 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 3989 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 3990 1.1 christos 3991 1.1 christos /* Record the fields for the semantic handler. */ 3992 1.1 christos FLD (f_operand2) = f_operand2; 3993 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 3994 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addscwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 3995 1.1 christos 3996 1.1 christos #if WITH_PROFILE_MODEL_P 3997 1.1 christos /* Record the fields for profiling. */ 3998 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 3999 1.1 christos { 4000 1.1 christos FLD (in_Rd) = f_operand2; 4001 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4002 1.1 christos } 4003 1.1 christos #endif 4004 1.1 christos #undef FLD 4005 1.1 christos return idesc; 4006 1.1 christos } 4007 1.1 christos 4008 1.1 christos extract_sfmt_addspcpc: 4009 1.1 christos { 4010 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4011 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 4012 1.1 christos 4013 1.1 christos 4014 1.1 christos /* Record the fields for the semantic handler. */ 4015 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addspcpc", (char *) 0)); 4016 1.1 christos 4017 1.1 christos #if WITH_PROFILE_MODEL_P 4018 1.1 christos /* Record the fields for profiling. */ 4019 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4020 1.1 christos { 4021 1.1 christos } 4022 1.1 christos #endif 4023 1.1 christos #undef FLD 4024 1.1 christos return idesc; 4025 1.1 christos } 4026 1.1 christos 4027 1.1 christos extract_sfmt_addi_b_r: 4028 1.1 christos { 4029 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4030 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4031 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 4032 1.1 christos UINT f_operand2; 4033 1.1 christos UINT f_operand1; 4034 1.1 christos 4035 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4036 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4037 1.1 christos 4038 1.1 christos /* Record the fields for the semantic handler. */ 4039 1.1 christos FLD (f_operand2) = f_operand2; 4040 1.1 christos FLD (f_operand1) = f_operand1; 4041 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4042 1.1 christos 4043 1.1 christos #if WITH_PROFILE_MODEL_P 4044 1.1 christos /* Record the fields for profiling. */ 4045 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4046 1.1 christos { 4047 1.1 christos FLD (in_Rd) = f_operand2; 4048 1.1 christos FLD (in_Rs) = f_operand1; 4049 1.1 christos FLD (out_Rs) = f_operand1; 4050 1.1 christos } 4051 1.1 christos #endif 4052 1.1 christos #undef FLD 4053 1.1 christos return idesc; 4054 1.1 christos } 4055 1.1 christos 4056 1.1 christos extract_sfmt_neg_b_r: 4057 1.1 christos { 4058 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4059 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4060 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4061 1.1 christos UINT f_operand2; 4062 1.1 christos UINT f_operand1; 4063 1.1 christos 4064 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4065 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4066 1.1 christos 4067 1.1 christos /* Record the fields for the semantic handler. */ 4068 1.1 christos FLD (f_operand1) = f_operand1; 4069 1.1 christos FLD (f_operand2) = f_operand2; 4070 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_neg_b_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 4071 1.1 christos 4072 1.1 christos #if WITH_PROFILE_MODEL_P 4073 1.1 christos /* Record the fields for profiling. */ 4074 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4075 1.1 christos { 4076 1.1 christos FLD (in_Rs) = f_operand1; 4077 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4078 1.1 christos } 4079 1.1 christos #endif 4080 1.1 christos #undef FLD 4081 1.1 christos return idesc; 4082 1.1 christos } 4083 1.1 christos 4084 1.1 christos extract_sfmt_neg_d_r: 4085 1.1 christos { 4086 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4087 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4088 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4089 1.1 christos UINT f_operand2; 4090 1.1 christos UINT f_operand1; 4091 1.1 christos 4092 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4093 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4094 1.1 christos 4095 1.1 christos /* Record the fields for the semantic handler. */ 4096 1.1 christos FLD (f_operand1) = f_operand1; 4097 1.1 christos FLD (f_operand2) = f_operand2; 4098 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_neg_d_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 4099 1.1 christos 4100 1.1 christos #if WITH_PROFILE_MODEL_P 4101 1.1 christos /* Record the fields for profiling. */ 4102 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4103 1.1 christos { 4104 1.1 christos FLD (in_Rs) = f_operand1; 4105 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4106 1.1 christos } 4107 1.1 christos #endif 4108 1.1 christos #undef FLD 4109 1.1 christos return idesc; 4110 1.1 christos } 4111 1.1 christos 4112 1.1 christos extract_sfmt_test_m_b_m: 4113 1.1 christos { 4114 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4115 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4116 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 4117 1.1 christos UINT f_memmode; 4118 1.1 christos UINT f_operand1; 4119 1.1 christos 4120 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4121 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4122 1.1 christos 4123 1.1 christos /* Record the fields for the semantic handler. */ 4124 1.1 christos FLD (f_operand1) = f_operand1; 4125 1.1 christos FLD (f_memmode) = f_memmode; 4126 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_test_m_b_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4127 1.1 christos 4128 1.1 christos #if WITH_PROFILE_MODEL_P 4129 1.1 christos /* Record the fields for profiling. */ 4130 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4131 1.1 christos { 4132 1.1 christos FLD (in_Rs) = f_operand1; 4133 1.1 christos FLD (out_Rs) = f_operand1; 4134 1.1 christos } 4135 1.1 christos #endif 4136 1.1 christos #undef FLD 4137 1.1 christos return idesc; 4138 1.1 christos } 4139 1.1 christos 4140 1.1 christos extract_sfmt_test_m_w_m: 4141 1.1 christos { 4142 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4143 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4144 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 4145 1.1 christos UINT f_memmode; 4146 1.1 christos UINT f_operand1; 4147 1.1 christos 4148 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4149 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4150 1.1 christos 4151 1.1 christos /* Record the fields for the semantic handler. */ 4152 1.1 christos FLD (f_operand1) = f_operand1; 4153 1.1 christos FLD (f_memmode) = f_memmode; 4154 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_test_m_w_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4155 1.1 christos 4156 1.1 christos #if WITH_PROFILE_MODEL_P 4157 1.1 christos /* Record the fields for profiling. */ 4158 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4159 1.1 christos { 4160 1.1 christos FLD (in_Rs) = f_operand1; 4161 1.1 christos FLD (out_Rs) = f_operand1; 4162 1.1 christos } 4163 1.1 christos #endif 4164 1.1 christos #undef FLD 4165 1.1 christos return idesc; 4166 1.1 christos } 4167 1.1 christos 4168 1.1 christos extract_sfmt_test_m_d_m: 4169 1.1 christos { 4170 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4171 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4172 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 4173 1.1 christos UINT f_memmode; 4174 1.1 christos UINT f_operand1; 4175 1.1 christos 4176 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4177 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4178 1.1 christos 4179 1.1 christos /* Record the fields for the semantic handler. */ 4180 1.1 christos FLD (f_operand1) = f_operand1; 4181 1.1 christos FLD (f_memmode) = f_memmode; 4182 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_test_m_d_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4183 1.1 christos 4184 1.1 christos #if WITH_PROFILE_MODEL_P 4185 1.1 christos /* Record the fields for profiling. */ 4186 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4187 1.1 christos { 4188 1.1 christos FLD (in_Rs) = f_operand1; 4189 1.1 christos FLD (out_Rs) = f_operand1; 4190 1.1 christos } 4191 1.1 christos #endif 4192 1.1 christos #undef FLD 4193 1.1 christos return idesc; 4194 1.1 christos } 4195 1.1 christos 4196 1.1 christos extract_sfmt_move_r_m_b_m: 4197 1.1 christos { 4198 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4199 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4200 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 4201 1.1 christos UINT f_operand2; 4202 1.1 christos UINT f_memmode; 4203 1.1 christos UINT f_operand1; 4204 1.1 christos 4205 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4206 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4207 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4208 1.1 christos 4209 1.1 christos /* Record the fields for the semantic handler. */ 4210 1.1 christos FLD (f_operand2) = f_operand2; 4211 1.1 christos FLD (f_operand1) = f_operand1; 4212 1.1 christos FLD (f_memmode) = f_memmode; 4213 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4214 1.1 christos 4215 1.1 christos #if WITH_PROFILE_MODEL_P 4216 1.1 christos /* Record the fields for profiling. */ 4217 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4218 1.1 christos { 4219 1.1 christos FLD (in_Rd) = f_operand2; 4220 1.1 christos FLD (in_Rs) = f_operand1; 4221 1.1 christos FLD (out_Rs) = f_operand1; 4222 1.1 christos } 4223 1.1 christos #endif 4224 1.1 christos #undef FLD 4225 1.1 christos return idesc; 4226 1.1 christos } 4227 1.1 christos 4228 1.1 christos extract_sfmt_move_r_m_w_m: 4229 1.1 christos { 4230 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4231 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4232 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 4233 1.1 christos UINT f_operand2; 4234 1.1 christos UINT f_memmode; 4235 1.1 christos UINT f_operand1; 4236 1.1 christos 4237 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4238 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4239 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4240 1.1 christos 4241 1.1 christos /* Record the fields for the semantic handler. */ 4242 1.1 christos FLD (f_operand2) = f_operand2; 4243 1.1 christos FLD (f_operand1) = f_operand1; 4244 1.1 christos FLD (f_memmode) = f_memmode; 4245 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4246 1.1 christos 4247 1.1 christos #if WITH_PROFILE_MODEL_P 4248 1.1 christos /* Record the fields for profiling. */ 4249 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4250 1.1 christos { 4251 1.1 christos FLD (in_Rd) = f_operand2; 4252 1.1 christos FLD (in_Rs) = f_operand1; 4253 1.1 christos FLD (out_Rs) = f_operand1; 4254 1.1 christos } 4255 1.1 christos #endif 4256 1.1 christos #undef FLD 4257 1.1 christos return idesc; 4258 1.1 christos } 4259 1.1 christos 4260 1.1 christos extract_sfmt_move_r_m_d_m: 4261 1.1 christos { 4262 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4263 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4264 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 4265 1.1 christos UINT f_operand2; 4266 1.1 christos UINT f_memmode; 4267 1.1 christos UINT f_operand1; 4268 1.1 christos 4269 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4270 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4271 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4272 1.1 christos 4273 1.1 christos /* Record the fields for the semantic handler. */ 4274 1.1 christos FLD (f_operand2) = f_operand2; 4275 1.1 christos FLD (f_operand1) = f_operand1; 4276 1.1 christos FLD (f_memmode) = f_memmode; 4277 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4278 1.1 christos 4279 1.1 christos #if WITH_PROFILE_MODEL_P 4280 1.1 christos /* Record the fields for profiling. */ 4281 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4282 1.1 christos { 4283 1.1 christos FLD (in_Rd) = f_operand2; 4284 1.1 christos FLD (in_Rs) = f_operand1; 4285 1.1 christos FLD (out_Rs) = f_operand1; 4286 1.1 christos } 4287 1.1 christos #endif 4288 1.1 christos #undef FLD 4289 1.1 christos return idesc; 4290 1.1 christos } 4291 1.1 christos 4292 1.1 christos extract_sfmt_muls_b: 4293 1.1 christos { 4294 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4295 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4296 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f 4297 1.1 christos UINT f_operand2; 4298 1.1 christos UINT f_operand1; 4299 1.1 christos 4300 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4301 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4302 1.1 christos 4303 1.1 christos /* Record the fields for the semantic handler. */ 4304 1.1 christos FLD (f_operand2) = f_operand2; 4305 1.1 christos FLD (f_operand1) = f_operand1; 4306 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_muls_b", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4307 1.1 christos 4308 1.1 christos #if WITH_PROFILE_MODEL_P 4309 1.1 christos /* Record the fields for profiling. */ 4310 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4311 1.1 christos { 4312 1.1 christos FLD (in_Rd) = f_operand2; 4313 1.1 christos FLD (in_Rs) = f_operand1; 4314 1.1 christos FLD (out_Rd) = f_operand2; 4315 1.1 christos FLD (out_h_sr_SI_7) = 7; 4316 1.1 christos } 4317 1.1 christos #endif 4318 1.1 christos #undef FLD 4319 1.1 christos return idesc; 4320 1.1 christos } 4321 1.1 christos 4322 1.1 christos extract_sfmt_mstep: 4323 1.1 christos { 4324 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4325 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4326 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f 4327 1.1 christos UINT f_operand2; 4328 1.1 christos UINT f_operand1; 4329 1.1 christos 4330 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4331 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4332 1.1 christos 4333 1.1 christos /* Record the fields for the semantic handler. */ 4334 1.1 christos FLD (f_operand2) = f_operand2; 4335 1.1 christos FLD (f_operand1) = f_operand1; 4336 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mstep", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4337 1.1 christos 4338 1.1 christos #if WITH_PROFILE_MODEL_P 4339 1.1 christos /* Record the fields for profiling. */ 4340 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4341 1.1 christos { 4342 1.1 christos FLD (in_Rd) = f_operand2; 4343 1.1 christos FLD (in_Rs) = f_operand1; 4344 1.1 christos FLD (out_Rd) = f_operand2; 4345 1.1 christos } 4346 1.1 christos #endif 4347 1.1 christos #undef FLD 4348 1.1 christos return idesc; 4349 1.1 christos } 4350 1.1 christos 4351 1.1 christos extract_sfmt_dstep: 4352 1.1 christos { 4353 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4354 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4355 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f 4356 1.1 christos UINT f_operand2; 4357 1.1 christos UINT f_operand1; 4358 1.1 christos 4359 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4360 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4361 1.1 christos 4362 1.1 christos /* Record the fields for the semantic handler. */ 4363 1.1 christos FLD (f_operand2) = f_operand2; 4364 1.1 christos FLD (f_operand1) = f_operand1; 4365 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dstep", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4366 1.1 christos 4367 1.1 christos #if WITH_PROFILE_MODEL_P 4368 1.1 christos /* Record the fields for profiling. */ 4369 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4370 1.1 christos { 4371 1.1 christos FLD (in_Rd) = f_operand2; 4372 1.1 christos FLD (in_Rs) = f_operand1; 4373 1.1 christos FLD (out_Rd) = f_operand2; 4374 1.1 christos } 4375 1.1 christos #endif 4376 1.1 christos #undef FLD 4377 1.1 christos return idesc; 4378 1.1 christos } 4379 1.1 christos 4380 1.1 christos extract_sfmt_and_b_r: 4381 1.1 christos { 4382 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4383 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4384 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4385 1.1 christos UINT f_operand2; 4386 1.1 christos UINT f_operand1; 4387 1.1 christos 4388 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4389 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4390 1.1 christos 4391 1.1 christos /* Record the fields for the semantic handler. */ 4392 1.1 christos FLD (f_operand2) = f_operand2; 4393 1.1 christos FLD (f_operand1) = f_operand1; 4394 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4395 1.1 christos 4396 1.1 christos #if WITH_PROFILE_MODEL_P 4397 1.1 christos /* Record the fields for profiling. */ 4398 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4399 1.1 christos { 4400 1.1 christos FLD (in_Rd) = f_operand2; 4401 1.1 christos FLD (in_Rs) = f_operand1; 4402 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4403 1.1 christos } 4404 1.1 christos #endif 4405 1.1 christos #undef FLD 4406 1.1 christos return idesc; 4407 1.1 christos } 4408 1.1 christos 4409 1.1 christos extract_sfmt_and_d_r: 4410 1.1 christos { 4411 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4412 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4413 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4414 1.1 christos UINT f_operand2; 4415 1.1 christos UINT f_operand1; 4416 1.1 christos 4417 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4418 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4419 1.1 christos 4420 1.1 christos /* Record the fields for the semantic handler. */ 4421 1.1 christos FLD (f_operand2) = f_operand2; 4422 1.1 christos FLD (f_operand1) = f_operand1; 4423 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_d_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4424 1.1 christos 4425 1.1 christos #if WITH_PROFILE_MODEL_P 4426 1.1 christos /* Record the fields for profiling. */ 4427 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4428 1.1 christos { 4429 1.1 christos FLD (in_Rd) = f_operand2; 4430 1.1 christos FLD (in_Rs) = f_operand1; 4431 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4432 1.1 christos } 4433 1.1 christos #endif 4434 1.1 christos #undef FLD 4435 1.1 christos return idesc; 4436 1.1 christos } 4437 1.1 christos 4438 1.1 christos extract_sfmt_and_m_b_m: 4439 1.1 christos { 4440 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4441 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4442 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 4443 1.1 christos UINT f_operand2; 4444 1.1 christos UINT f_memmode; 4445 1.1 christos UINT f_operand1; 4446 1.1 christos 4447 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4448 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4449 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4450 1.1 christos 4451 1.1 christos /* Record the fields for the semantic handler. */ 4452 1.1 christos FLD (f_operand2) = f_operand2; 4453 1.1 christos FLD (f_operand1) = f_operand1; 4454 1.1 christos FLD (f_memmode) = f_memmode; 4455 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4456 1.1 christos 4457 1.1 christos #if WITH_PROFILE_MODEL_P 4458 1.1 christos /* Record the fields for profiling. */ 4459 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4460 1.1 christos { 4461 1.1 christos FLD (in_Rd) = f_operand2; 4462 1.1 christos FLD (in_Rs) = f_operand1; 4463 1.1 christos FLD (out_Rs) = f_operand1; 4464 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 4465 1.1 christos } 4466 1.1 christos #endif 4467 1.1 christos #undef FLD 4468 1.1 christos return idesc; 4469 1.1 christos } 4470 1.1 christos 4471 1.1 christos extract_sfmt_and_m_w_m: 4472 1.1 christos { 4473 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4474 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4475 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 4476 1.1 christos UINT f_operand2; 4477 1.1 christos UINT f_memmode; 4478 1.1 christos UINT f_operand1; 4479 1.1 christos 4480 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4481 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4482 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4483 1.1 christos 4484 1.1 christos /* Record the fields for the semantic handler. */ 4485 1.1 christos FLD (f_operand2) = f_operand2; 4486 1.1 christos FLD (f_operand1) = f_operand1; 4487 1.1 christos FLD (f_memmode) = f_memmode; 4488 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4489 1.1 christos 4490 1.1 christos #if WITH_PROFILE_MODEL_P 4491 1.1 christos /* Record the fields for profiling. */ 4492 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4493 1.1 christos { 4494 1.1 christos FLD (in_Rd) = f_operand2; 4495 1.1 christos FLD (in_Rs) = f_operand1; 4496 1.1 christos FLD (out_Rs) = f_operand1; 4497 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 4498 1.1 christos } 4499 1.1 christos #endif 4500 1.1 christos #undef FLD 4501 1.1 christos return idesc; 4502 1.1 christos } 4503 1.1 christos 4504 1.1 christos extract_sfmt_and_m_d_m: 4505 1.1 christos { 4506 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4507 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4508 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f 4509 1.1 christos UINT f_operand2; 4510 1.1 christos UINT f_memmode; 4511 1.1 christos UINT f_operand1; 4512 1.1 christos 4513 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4514 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 4515 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4516 1.1 christos 4517 1.1 christos /* Record the fields for the semantic handler. */ 4518 1.1 christos FLD (f_operand2) = f_operand2; 4519 1.1 christos FLD (f_operand1) = f_operand1; 4520 1.1 christos FLD (f_memmode) = f_memmode; 4521 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 4522 1.1 christos 4523 1.1 christos #if WITH_PROFILE_MODEL_P 4524 1.1 christos /* Record the fields for profiling. */ 4525 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4526 1.1 christos { 4527 1.1 christos FLD (in_Rd) = f_operand2; 4528 1.1 christos FLD (in_Rs) = f_operand1; 4529 1.1 christos FLD (out_Rs) = f_operand1; 4530 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2))); 4531 1.1 christos } 4532 1.1 christos #endif 4533 1.1 christos #undef FLD 4534 1.1 christos return idesc; 4535 1.1 christos } 4536 1.1 christos 4537 1.1 christos extract_sfmt_andcbr: 4538 1.1 christos { 4539 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4540 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4541 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f 4542 1.1 christos INT f_indir_pc__byte; 4543 1.1 christos UINT f_operand2; 4544 1.1 christos /* Contents of trailing part of insn. */ 4545 1.1 christos UINT word_1; 4546 1.1 christos 4547 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 4548 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 4549 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4550 1.1 christos 4551 1.1 christos /* Record the fields for the semantic handler. */ 4552 1.1 christos FLD (f_operand2) = f_operand2; 4553 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 4554 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andcbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 4555 1.1 christos 4556 1.1 christos #if WITH_PROFILE_MODEL_P 4557 1.1 christos /* Record the fields for profiling. */ 4558 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4559 1.1 christos { 4560 1.1 christos FLD (in_Rd) = f_operand2; 4561 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4562 1.1 christos } 4563 1.1 christos #endif 4564 1.1 christos #undef FLD 4565 1.1 christos return idesc; 4566 1.1 christos } 4567 1.1 christos 4568 1.1 christos extract_sfmt_andcwr: 4569 1.1 christos { 4570 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4571 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4572 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f 4573 1.1 christos INT f_indir_pc__word; 4574 1.1 christos UINT f_operand2; 4575 1.1 christos /* Contents of trailing part of insn. */ 4576 1.1 christos UINT word_1; 4577 1.1 christos 4578 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 4579 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 4580 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4581 1.1 christos 4582 1.1 christos /* Record the fields for the semantic handler. */ 4583 1.1 christos FLD (f_operand2) = f_operand2; 4584 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 4585 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andcwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 4586 1.1 christos 4587 1.1 christos #if WITH_PROFILE_MODEL_P 4588 1.1 christos /* Record the fields for profiling. */ 4589 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4590 1.1 christos { 4591 1.1 christos FLD (in_Rd) = f_operand2; 4592 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4593 1.1 christos } 4594 1.1 christos #endif 4595 1.1 christos #undef FLD 4596 1.1 christos return idesc; 4597 1.1 christos } 4598 1.1 christos 4599 1.1 christos extract_sfmt_andcdr: 4600 1.1 christos { 4601 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4602 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4603 1.1 christos #define FLD(f) abuf->fields.sfmt_addcdr.f 4604 1.1 christos INT f_indir_pc__dword; 4605 1.1 christos UINT f_operand2; 4606 1.1 christos /* Contents of trailing part of insn. */ 4607 1.1 christos UINT word_1; 4608 1.1 christos 4609 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 4610 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 4611 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4612 1.1 christos 4613 1.1 christos /* Record the fields for the semantic handler. */ 4614 1.1 christos FLD (f_operand2) = f_operand2; 4615 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 4616 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andcdr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 4617 1.1 christos 4618 1.1 christos #if WITH_PROFILE_MODEL_P 4619 1.1 christos /* Record the fields for profiling. */ 4620 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4621 1.1 christos { 4622 1.1 christos FLD (in_Rd) = f_operand2; 4623 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4624 1.1 christos } 4625 1.1 christos #endif 4626 1.1 christos #undef FLD 4627 1.1 christos return idesc; 4628 1.1 christos } 4629 1.1 christos 4630 1.1 christos extract_sfmt_andq: 4631 1.1 christos { 4632 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4633 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4634 1.1 christos #define FLD(f) abuf->fields.sfmt_andq.f 4635 1.1 christos UINT f_operand2; 4636 1.1 christos INT f_s6; 4637 1.1 christos 4638 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4639 1.1 christos f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6); 4640 1.1 christos 4641 1.1 christos /* Record the fields for the semantic handler. */ 4642 1.1 christos FLD (f_operand2) = f_operand2; 4643 1.1 christos FLD (f_s6) = f_s6; 4644 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andq", "f_operand2 0x%x", 'x', f_operand2, "f_s6 0x%x", 'x', f_s6, (char *) 0)); 4645 1.1 christos 4646 1.1 christos #if WITH_PROFILE_MODEL_P 4647 1.1 christos /* Record the fields for profiling. */ 4648 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4649 1.1 christos { 4650 1.1 christos FLD (in_Rd) = f_operand2; 4651 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4652 1.1 christos } 4653 1.1 christos #endif 4654 1.1 christos #undef FLD 4655 1.1 christos return idesc; 4656 1.1 christos } 4657 1.1 christos 4658 1.1 christos extract_sfmt_swap: 4659 1.1 christos { 4660 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4661 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4662 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 4663 1.1 christos UINT f_operand2; 4664 1.1 christos UINT f_operand1; 4665 1.1 christos 4666 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4667 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4668 1.1 christos 4669 1.1 christos /* Record the fields for the semantic handler. */ 4670 1.1 christos FLD (f_operand1) = f_operand1; 4671 1.1 christos FLD (f_operand2) = f_operand2; 4672 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_swap", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 4673 1.1 christos 4674 1.1 christos #if WITH_PROFILE_MODEL_P 4675 1.1 christos /* Record the fields for profiling. */ 4676 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4677 1.1 christos { 4678 1.1 christos FLD (in_Rs) = f_operand1; 4679 1.1 christos FLD (out_Rs) = f_operand1; 4680 1.1 christos } 4681 1.1 christos #endif 4682 1.1 christos #undef FLD 4683 1.1 christos return idesc; 4684 1.1 christos } 4685 1.1 christos 4686 1.1 christos extract_sfmt_asrq: 4687 1.1 christos { 4688 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4689 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4690 1.1 christos #define FLD(f) abuf->fields.sfmt_asrq.f 4691 1.1 christos UINT f_operand2; 4692 1.1 christos UINT f_u5; 4693 1.1 christos 4694 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4695 1.1 christos f_u5 = EXTRACT_LSB0_UINT (insn, 16, 4, 5); 4696 1.1 christos 4697 1.1 christos /* Record the fields for the semantic handler. */ 4698 1.1 christos FLD (f_operand2) = f_operand2; 4699 1.1 christos FLD (f_u5) = f_u5; 4700 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_asrq", "f_operand2 0x%x", 'x', f_operand2, "f_u5 0x%x", 'x', f_u5, (char *) 0)); 4701 1.1 christos 4702 1.1 christos #if WITH_PROFILE_MODEL_P 4703 1.1 christos /* Record the fields for profiling. */ 4704 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4705 1.1 christos { 4706 1.1 christos FLD (in_Rd) = f_operand2; 4707 1.1 christos FLD (out_Rd) = f_operand2; 4708 1.1 christos } 4709 1.1 christos #endif 4710 1.1 christos #undef FLD 4711 1.1 christos return idesc; 4712 1.1 christos } 4713 1.1 christos 4714 1.1 christos extract_sfmt_lsrr_b_r: 4715 1.1 christos { 4716 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4717 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4718 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4719 1.1 christos UINT f_operand2; 4720 1.1 christos UINT f_operand1; 4721 1.1 christos 4722 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4723 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4724 1.1 christos 4725 1.1 christos /* Record the fields for the semantic handler. */ 4726 1.1 christos FLD (f_operand2) = f_operand2; 4727 1.1 christos FLD (f_operand1) = f_operand1; 4728 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsrr_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4729 1.1 christos 4730 1.1 christos #if WITH_PROFILE_MODEL_P 4731 1.1 christos /* Record the fields for profiling. */ 4732 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4733 1.1 christos { 4734 1.1 christos FLD (in_Rd) = f_operand2; 4735 1.1 christos FLD (in_Rs) = f_operand1; 4736 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4737 1.1 christos } 4738 1.1 christos #endif 4739 1.1 christos #undef FLD 4740 1.1 christos return idesc; 4741 1.1 christos } 4742 1.1 christos 4743 1.1 christos extract_sfmt_lsrr_d_r: 4744 1.1 christos { 4745 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4746 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4747 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4748 1.1 christos UINT f_operand2; 4749 1.1 christos UINT f_operand1; 4750 1.1 christos 4751 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4752 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4753 1.1 christos 4754 1.1 christos /* Record the fields for the semantic handler. */ 4755 1.1 christos FLD (f_operand2) = f_operand2; 4756 1.1 christos FLD (f_operand1) = f_operand1; 4757 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsrr_d_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4758 1.1 christos 4759 1.1 christos #if WITH_PROFILE_MODEL_P 4760 1.1 christos /* Record the fields for profiling. */ 4761 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4762 1.1 christos { 4763 1.1 christos FLD (in_Rd) = f_operand2; 4764 1.1 christos FLD (in_Rs) = f_operand1; 4765 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2); 4766 1.1 christos } 4767 1.1 christos #endif 4768 1.1 christos #undef FLD 4769 1.1 christos return idesc; 4770 1.1 christos } 4771 1.1 christos 4772 1.1 christos extract_sfmt_btst: 4773 1.1 christos { 4774 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4775 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4776 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 4777 1.1 christos UINT f_operand2; 4778 1.1 christos UINT f_operand1; 4779 1.1 christos 4780 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4781 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4782 1.1 christos 4783 1.1 christos /* Record the fields for the semantic handler. */ 4784 1.1 christos FLD (f_operand2) = f_operand2; 4785 1.1 christos FLD (f_operand1) = f_operand1; 4786 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btst", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 4787 1.1 christos 4788 1.1 christos #if WITH_PROFILE_MODEL_P 4789 1.1 christos /* Record the fields for profiling. */ 4790 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4791 1.1 christos { 4792 1.1 christos FLD (in_Rd) = f_operand2; 4793 1.1 christos FLD (in_Rs) = f_operand1; 4794 1.1 christos } 4795 1.1 christos #endif 4796 1.1 christos #undef FLD 4797 1.1 christos return idesc; 4798 1.1 christos } 4799 1.1 christos 4800 1.1 christos extract_sfmt_btstq: 4801 1.1 christos { 4802 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4803 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4804 1.1 christos #define FLD(f) abuf->fields.sfmt_asrq.f 4805 1.1 christos UINT f_operand2; 4806 1.1 christos UINT f_u5; 4807 1.1 christos 4808 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4809 1.1 christos f_u5 = EXTRACT_LSB0_UINT (insn, 16, 4, 5); 4810 1.1 christos 4811 1.1 christos /* Record the fields for the semantic handler. */ 4812 1.1 christos FLD (f_operand2) = f_operand2; 4813 1.1 christos FLD (f_u5) = f_u5; 4814 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btstq", "f_operand2 0x%x", 'x', f_operand2, "f_u5 0x%x", 'x', f_u5, (char *) 0)); 4815 1.1 christos 4816 1.1 christos #if WITH_PROFILE_MODEL_P 4817 1.1 christos /* Record the fields for profiling. */ 4818 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4819 1.1 christos { 4820 1.1 christos FLD (in_Rd) = f_operand2; 4821 1.1 christos } 4822 1.1 christos #endif 4823 1.1 christos #undef FLD 4824 1.1 christos return idesc; 4825 1.1 christos } 4826 1.1 christos 4827 1.1 christos extract_sfmt_setf: 4828 1.1 christos { 4829 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4830 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4831 1.1 christos #define FLD(f) abuf->fields.sfmt_setf.f 4832 1.1 christos UINT f_operand2; 4833 1.1 christos UINT f_operand1; 4834 1.1 christos UINT f_dstsrc; 4835 1.1 christos 4836 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4837 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4838 1.1 christos f_dstsrc = ((((f_operand1) | (((f_operand2) << (4))))) & (255)); 4839 1.1 christos 4840 1.1 christos /* Record the fields for the semantic handler. */ 4841 1.1 christos FLD (f_dstsrc) = f_dstsrc; 4842 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_setf", "f_dstsrc 0x%x", 'x', f_dstsrc, (char *) 0)); 4843 1.1 christos 4844 1.1 christos #undef FLD 4845 1.1 christos return idesc; 4846 1.1 christos } 4847 1.1 christos 4848 1.1 christos extract_sfmt_bcc_b: 4849 1.1 christos { 4850 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4851 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4852 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_b.f 4853 1.1 christos UINT f_operand2; 4854 1.1 christos UINT f_disp9_lo; 4855 1.1 christos INT f_disp9_hi; 4856 1.1 christos INT f_disp9; 4857 1.1 christos 4858 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4859 1.1 christos f_disp9_lo = EXTRACT_LSB0_UINT (insn, 16, 7, 7); 4860 1.1 christos f_disp9_hi = EXTRACT_LSB0_SINT (insn, 16, 0, 1); 4861 1.1 christos { 4862 1.1 christos SI tmp_abslo; 4863 1.1 christos SI tmp_absval; 4864 1.1 christos tmp_abslo = ((f_disp9_lo) << (1)); 4865 1.1 christos tmp_absval = ((((((f_disp9_hi) != (0))) ? ((~ (255))) : (0))) | (tmp_abslo)); 4866 1.1 christos f_disp9 = ((((pc) + (tmp_absval))) + (((GET_H_V32_NON_V32 ()) ? (0) : (2)))); 4867 1.1 christos } 4868 1.1 christos 4869 1.1 christos /* Record the fields for the semantic handler. */ 4870 1.1 christos FLD (f_operand2) = f_operand2; 4871 1.1 christos FLD (i_o_pcrel) = f_disp9; 4872 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcc_b", "f_operand2 0x%x", 'x', f_operand2, "o_pcrel 0x%x", 'x', f_disp9, (char *) 0)); 4873 1.1 christos 4874 1.1 christos #if WITH_PROFILE_MODEL_P 4875 1.1 christos /* Record the fields for profiling. */ 4876 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4877 1.1 christos { 4878 1.1 christos } 4879 1.1 christos #endif 4880 1.1 christos #undef FLD 4881 1.1 christos return idesc; 4882 1.1 christos } 4883 1.1 christos 4884 1.1 christos extract_sfmt_ba_b: 4885 1.1 christos { 4886 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4887 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4888 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_b.f 4889 1.1 christos UINT f_disp9_lo; 4890 1.1 christos INT f_disp9_hi; 4891 1.1 christos INT f_disp9; 4892 1.1 christos 4893 1.1 christos f_disp9_lo = EXTRACT_LSB0_UINT (insn, 16, 7, 7); 4894 1.1 christos f_disp9_hi = EXTRACT_LSB0_SINT (insn, 16, 0, 1); 4895 1.1 christos { 4896 1.1 christos SI tmp_abslo; 4897 1.1 christos SI tmp_absval; 4898 1.1 christos tmp_abslo = ((f_disp9_lo) << (1)); 4899 1.1 christos tmp_absval = ((((((f_disp9_hi) != (0))) ? ((~ (255))) : (0))) | (tmp_abslo)); 4900 1.1 christos f_disp9 = ((((pc) + (tmp_absval))) + (((GET_H_V32_NON_V32 ()) ? (0) : (2)))); 4901 1.1 christos } 4902 1.1 christos 4903 1.1 christos /* Record the fields for the semantic handler. */ 4904 1.1 christos FLD (i_o_pcrel) = f_disp9; 4905 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ba_b", "o_pcrel 0x%x", 'x', f_disp9, (char *) 0)); 4906 1.1 christos 4907 1.1 christos #if WITH_PROFILE_MODEL_P 4908 1.1 christos /* Record the fields for profiling. */ 4909 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4910 1.1 christos { 4911 1.1 christos } 4912 1.1 christos #endif 4913 1.1 christos #undef FLD 4914 1.1 christos return idesc; 4915 1.1 christos } 4916 1.1 christos 4917 1.1 christos extract_sfmt_bcc_w: 4918 1.1 christos { 4919 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4920 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4921 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_w.f 4922 1.1 christos SI f_indir_pc__word_pcrel; 4923 1.1 christos UINT f_operand2; 4924 1.1 christos /* Contents of trailing part of insn. */ 4925 1.1 christos UINT word_1; 4926 1.1 christos 4927 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 4928 1.1 christos f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_NON_V32 ()) ? (0) : (4)))))); 4929 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4930 1.1 christos 4931 1.1 christos /* Record the fields for the semantic handler. */ 4932 1.1 christos FLD (f_operand2) = f_operand2; 4933 1.1 christos FLD (i_o_word_pcrel) = f_indir_pc__word_pcrel; 4934 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcc_w", "f_operand2 0x%x", 'x', f_operand2, "o_word_pcrel 0x%x", 'x', f_indir_pc__word_pcrel, (char *) 0)); 4935 1.1 christos 4936 1.1 christos #if WITH_PROFILE_MODEL_P 4937 1.1 christos /* Record the fields for profiling. */ 4938 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4939 1.1 christos { 4940 1.1 christos } 4941 1.1 christos #endif 4942 1.1 christos #undef FLD 4943 1.1 christos return idesc; 4944 1.1 christos } 4945 1.1 christos 4946 1.1 christos extract_sfmt_ba_w: 4947 1.1 christos { 4948 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4949 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4950 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_w.f 4951 1.1 christos SI f_indir_pc__word_pcrel; 4952 1.1 christos /* Contents of trailing part of insn. */ 4953 1.1 christos UINT word_1; 4954 1.1 christos 4955 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 4956 1.1 christos f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_NON_V32 ()) ? (0) : (4)))))); 4957 1.1 christos 4958 1.1 christos /* Record the fields for the semantic handler. */ 4959 1.1 christos FLD (i_o_word_pcrel) = f_indir_pc__word_pcrel; 4960 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ba_w", "o_word_pcrel 0x%x", 'x', f_indir_pc__word_pcrel, (char *) 0)); 4961 1.1 christos 4962 1.1 christos #if WITH_PROFILE_MODEL_P 4963 1.1 christos /* Record the fields for profiling. */ 4964 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4965 1.1 christos { 4966 1.1 christos } 4967 1.1 christos #endif 4968 1.1 christos #undef FLD 4969 1.1 christos return idesc; 4970 1.1 christos } 4971 1.1 christos 4972 1.1 christos extract_sfmt_jump_r: 4973 1.1 christos { 4974 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 4975 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 4976 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f 4977 1.1 christos UINT f_operand2; 4978 1.1 christos UINT f_operand1; 4979 1.1 christos 4980 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 4981 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 4982 1.1 christos 4983 1.1 christos /* Record the fields for the semantic handler. */ 4984 1.1 christos FLD (f_operand1) = f_operand1; 4985 1.1 christos FLD (f_operand2) = f_operand2; 4986 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jump_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 4987 1.1 christos 4988 1.1 christos #if WITH_PROFILE_MODEL_P 4989 1.1 christos /* Record the fields for profiling. */ 4990 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 4991 1.1 christos { 4992 1.1 christos FLD (in_Rs) = f_operand1; 4993 1.1 christos FLD (out_Pd) = f_operand2; 4994 1.1 christos } 4995 1.1 christos #endif 4996 1.1 christos #undef FLD 4997 1.1 christos return idesc; 4998 1.1 christos } 4999 1.1 christos 5000 1.1 christos extract_sfmt_jump_m: 5001 1.1 christos { 5002 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5003 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5004 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f 5005 1.1 christos UINT f_operand2; 5006 1.1 christos UINT f_memmode; 5007 1.1 christos UINT f_operand1; 5008 1.1 christos 5009 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5010 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5011 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5012 1.1 christos 5013 1.1 christos /* Record the fields for the semantic handler. */ 5014 1.1 christos FLD (f_operand1) = f_operand1; 5015 1.1 christos FLD (f_memmode) = f_memmode; 5016 1.1 christos FLD (f_operand2) = f_operand2; 5017 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jump_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 5018 1.1 christos 5019 1.1 christos #if WITH_PROFILE_MODEL_P 5020 1.1 christos /* Record the fields for profiling. */ 5021 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5022 1.1 christos { 5023 1.1 christos FLD (in_Rs) = f_operand1; 5024 1.1 christos FLD (out_Pd) = f_operand2; 5025 1.1 christos FLD (out_Rs) = f_operand1; 5026 1.1 christos } 5027 1.1 christos #endif 5028 1.1 christos #undef FLD 5029 1.1 christos return idesc; 5030 1.1 christos } 5031 1.1 christos 5032 1.1 christos extract_sfmt_jump_c: 5033 1.1 christos { 5034 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5035 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5036 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f 5037 1.1 christos INT f_indir_pc__dword; 5038 1.1 christos UINT f_operand2; 5039 1.1 christos /* Contents of trailing part of insn. */ 5040 1.1 christos UINT word_1; 5041 1.1 christos 5042 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5043 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 5044 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5045 1.1 christos 5046 1.1 christos /* Record the fields for the semantic handler. */ 5047 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 5048 1.1 christos FLD (f_operand2) = f_operand2; 5049 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jump_c", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 5050 1.1 christos 5051 1.1 christos #if WITH_PROFILE_MODEL_P 5052 1.1 christos /* Record the fields for profiling. */ 5053 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5054 1.1 christos { 5055 1.1 christos FLD (out_Pd) = f_operand2; 5056 1.1 christos } 5057 1.1 christos #endif 5058 1.1 christos #undef FLD 5059 1.1 christos return idesc; 5060 1.1 christos } 5061 1.1 christos 5062 1.1 christos extract_sfmt_break: 5063 1.1 christos { 5064 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5065 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5066 1.1 christos #define FLD(f) abuf->fields.sfmt_break.f 5067 1.1 christos UINT f_u4; 5068 1.1 christos 5069 1.1 christos f_u4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5070 1.1 christos 5071 1.1 christos /* Record the fields for the semantic handler. */ 5072 1.1 christos FLD (f_u4) = f_u4; 5073 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_break", "f_u4 0x%x", 'x', f_u4, (char *) 0)); 5074 1.1 christos 5075 1.1 christos #if WITH_PROFILE_MODEL_P 5076 1.1 christos /* Record the fields for profiling. */ 5077 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5078 1.1 christos { 5079 1.1 christos } 5080 1.1 christos #endif 5081 1.1 christos #undef FLD 5082 1.1 christos return idesc; 5083 1.1 christos } 5084 1.1 christos 5085 1.1 christos extract_sfmt_bound_m_b_m: 5086 1.1 christos { 5087 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5088 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5089 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 5090 1.1 christos UINT f_operand2; 5091 1.1 christos UINT f_memmode; 5092 1.1 christos UINT f_operand1; 5093 1.1 christos 5094 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5095 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5096 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5097 1.1 christos 5098 1.1 christos /* Record the fields for the semantic handler. */ 5099 1.1 christos FLD (f_operand2) = f_operand2; 5100 1.1 christos FLD (f_operand1) = f_operand1; 5101 1.1 christos FLD (f_memmode) = f_memmode; 5102 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5103 1.1 christos 5104 1.1 christos #if WITH_PROFILE_MODEL_P 5105 1.1 christos /* Record the fields for profiling. */ 5106 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5107 1.1 christos { 5108 1.1 christos FLD (in_Rd) = f_operand2; 5109 1.1 christos FLD (in_Rs) = f_operand1; 5110 1.1 christos FLD (out_Rd) = f_operand2; 5111 1.1 christos FLD (out_Rs) = f_operand1; 5112 1.1 christos } 5113 1.1 christos #endif 5114 1.1 christos #undef FLD 5115 1.1 christos return idesc; 5116 1.1 christos } 5117 1.1 christos 5118 1.1 christos extract_sfmt_bound_m_w_m: 5119 1.1 christos { 5120 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5121 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5122 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 5123 1.1 christos UINT f_operand2; 5124 1.1 christos UINT f_memmode; 5125 1.1 christos UINT f_operand1; 5126 1.1 christos 5127 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5128 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5129 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5130 1.1 christos 5131 1.1 christos /* Record the fields for the semantic handler. */ 5132 1.1 christos FLD (f_operand2) = f_operand2; 5133 1.1 christos FLD (f_operand1) = f_operand1; 5134 1.1 christos FLD (f_memmode) = f_memmode; 5135 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5136 1.1 christos 5137 1.1 christos #if WITH_PROFILE_MODEL_P 5138 1.1 christos /* Record the fields for profiling. */ 5139 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5140 1.1 christos { 5141 1.1 christos FLD (in_Rd) = f_operand2; 5142 1.1 christos FLD (in_Rs) = f_operand1; 5143 1.1 christos FLD (out_Rd) = f_operand2; 5144 1.1 christos FLD (out_Rs) = f_operand1; 5145 1.1 christos } 5146 1.1 christos #endif 5147 1.1 christos #undef FLD 5148 1.1 christos return idesc; 5149 1.1 christos } 5150 1.1 christos 5151 1.1 christos extract_sfmt_bound_m_d_m: 5152 1.1 christos { 5153 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5154 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5155 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 5156 1.1 christos UINT f_operand2; 5157 1.1 christos UINT f_memmode; 5158 1.1 christos UINT f_operand1; 5159 1.1 christos 5160 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5161 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5162 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5163 1.1 christos 5164 1.1 christos /* Record the fields for the semantic handler. */ 5165 1.1 christos FLD (f_operand2) = f_operand2; 5166 1.1 christos FLD (f_operand1) = f_operand1; 5167 1.1 christos FLD (f_memmode) = f_memmode; 5168 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5169 1.1 christos 5170 1.1 christos #if WITH_PROFILE_MODEL_P 5171 1.1 christos /* Record the fields for profiling. */ 5172 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5173 1.1 christos { 5174 1.1 christos FLD (in_Rd) = f_operand2; 5175 1.1 christos FLD (in_Rs) = f_operand1; 5176 1.1 christos FLD (out_Rd) = f_operand2; 5177 1.1 christos FLD (out_Rs) = f_operand1; 5178 1.1 christos } 5179 1.1 christos #endif 5180 1.1 christos #undef FLD 5181 1.1 christos return idesc; 5182 1.1 christos } 5183 1.1 christos 5184 1.1 christos extract_sfmt_bound_cb: 5185 1.1 christos { 5186 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5187 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5188 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f 5189 1.1 christos INT f_indir_pc__byte; 5190 1.1 christos UINT f_operand2; 5191 1.1 christos /* Contents of trailing part of insn. */ 5192 1.1 christos UINT word_1; 5193 1.1 christos 5194 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5195 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 5196 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5197 1.1 christos 5198 1.1 christos /* Record the fields for the semantic handler. */ 5199 1.1 christos FLD (f_operand2) = f_operand2; 5200 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 5201 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_cb", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 5202 1.1 christos 5203 1.1 christos #if WITH_PROFILE_MODEL_P 5204 1.1 christos /* Record the fields for profiling. */ 5205 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5206 1.1 christos { 5207 1.1 christos FLD (in_Rd) = f_operand2; 5208 1.1 christos FLD (out_Rd) = f_operand2; 5209 1.1 christos } 5210 1.1 christos #endif 5211 1.1 christos #undef FLD 5212 1.1 christos return idesc; 5213 1.1 christos } 5214 1.1 christos 5215 1.1 christos extract_sfmt_bound_cw: 5216 1.1 christos { 5217 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5218 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5219 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f 5220 1.1 christos INT f_indir_pc__word; 5221 1.1 christos UINT f_operand2; 5222 1.1 christos /* Contents of trailing part of insn. */ 5223 1.1 christos UINT word_1; 5224 1.1 christos 5225 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5226 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 5227 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5228 1.1 christos 5229 1.1 christos /* Record the fields for the semantic handler. */ 5230 1.1 christos FLD (f_operand2) = f_operand2; 5231 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 5232 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_cw", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 5233 1.1 christos 5234 1.1 christos #if WITH_PROFILE_MODEL_P 5235 1.1 christos /* Record the fields for profiling. */ 5236 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5237 1.1 christos { 5238 1.1 christos FLD (in_Rd) = f_operand2; 5239 1.1 christos FLD (out_Rd) = f_operand2; 5240 1.1 christos } 5241 1.1 christos #endif 5242 1.1 christos #undef FLD 5243 1.1 christos return idesc; 5244 1.1 christos } 5245 1.1 christos 5246 1.1 christos extract_sfmt_bound_cd: 5247 1.1 christos { 5248 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5249 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5250 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f 5251 1.1 christos INT f_indir_pc__dword; 5252 1.1 christos UINT f_operand2; 5253 1.1 christos /* Contents of trailing part of insn. */ 5254 1.1 christos UINT word_1; 5255 1.1 christos 5256 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5257 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 5258 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5259 1.1 christos 5260 1.1 christos /* Record the fields for the semantic handler. */ 5261 1.1 christos FLD (f_operand2) = f_operand2; 5262 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 5263 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_cd", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 5264 1.1 christos 5265 1.1 christos #if WITH_PROFILE_MODEL_P 5266 1.1 christos /* Record the fields for profiling. */ 5267 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5268 1.1 christos { 5269 1.1 christos FLD (in_Rd) = f_operand2; 5270 1.1 christos FLD (out_Rd) = f_operand2; 5271 1.1 christos } 5272 1.1 christos #endif 5273 1.1 christos #undef FLD 5274 1.1 christos return idesc; 5275 1.1 christos } 5276 1.1 christos 5277 1.1 christos extract_sfmt_scc: 5278 1.1 christos { 5279 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5280 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5281 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 5282 1.1 christos UINT f_operand2; 5283 1.1 christos UINT f_operand1; 5284 1.1 christos 5285 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5286 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5287 1.1 christos 5288 1.1 christos /* Record the fields for the semantic handler. */ 5289 1.1 christos FLD (f_operand2) = f_operand2; 5290 1.1 christos FLD (f_operand1) = f_operand1; 5291 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_scc", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 5292 1.1 christos 5293 1.1 christos #if WITH_PROFILE_MODEL_P 5294 1.1 christos /* Record the fields for profiling. */ 5295 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5296 1.1 christos { 5297 1.1 christos FLD (out_Rs) = f_operand1; 5298 1.1 christos } 5299 1.1 christos #endif 5300 1.1 christos #undef FLD 5301 1.1 christos return idesc; 5302 1.1 christos } 5303 1.1 christos 5304 1.1 christos extract_sfmt_addoq: 5305 1.1 christos { 5306 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5307 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5308 1.1 christos #define FLD(f) abuf->fields.sfmt_addoq.f 5309 1.1 christos UINT f_operand2; 5310 1.1 christos INT f_s8; 5311 1.1 christos 5312 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5313 1.1 christos f_s8 = EXTRACT_LSB0_SINT (insn, 16, 7, 8); 5314 1.1 christos 5315 1.1 christos /* Record the fields for the semantic handler. */ 5316 1.1 christos FLD (f_operand2) = f_operand2; 5317 1.1 christos FLD (f_s8) = f_s8; 5318 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addoq", "f_operand2 0x%x", 'x', f_operand2, "f_s8 0x%x", 'x', f_s8, (char *) 0)); 5319 1.1 christos 5320 1.1 christos #if WITH_PROFILE_MODEL_P 5321 1.1 christos /* Record the fields for profiling. */ 5322 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5323 1.1 christos { 5324 1.1 christos FLD (in_Rd) = f_operand2; 5325 1.1 christos } 5326 1.1 christos #endif 5327 1.1 christos #undef FLD 5328 1.1 christos return idesc; 5329 1.1 christos } 5330 1.1 christos 5331 1.1 christos extract_sfmt_bdapqpc: 5332 1.1 christos { 5333 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5334 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5335 1.1 christos #define FLD(f) abuf->fields.sfmt_addoq.f 5336 1.1 christos INT f_s8; 5337 1.1 christos 5338 1.1 christos f_s8 = EXTRACT_LSB0_SINT (insn, 16, 7, 8); 5339 1.1 christos 5340 1.1 christos /* Record the fields for the semantic handler. */ 5341 1.1 christos FLD (f_s8) = f_s8; 5342 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bdapqpc", "f_s8 0x%x", 'x', f_s8, (char *) 0)); 5343 1.1 christos 5344 1.1 christos #if WITH_PROFILE_MODEL_P 5345 1.1 christos /* Record the fields for profiling. */ 5346 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5347 1.1 christos { 5348 1.1 christos } 5349 1.1 christos #endif 5350 1.1 christos #undef FLD 5351 1.1 christos return idesc; 5352 1.1 christos } 5353 1.1 christos 5354 1.1 christos extract_sfmt_bdap_32_pc: 5355 1.1 christos { 5356 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5357 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5358 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f 5359 1.1 christos INT f_indir_pc__dword; 5360 1.1 christos /* Contents of trailing part of insn. */ 5361 1.1 christos UINT word_1; 5362 1.1 christos 5363 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5364 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 5365 1.1 christos 5366 1.1 christos /* Record the fields for the semantic handler. */ 5367 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 5368 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bdap_32_pc", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 5369 1.1 christos 5370 1.1 christos #if WITH_PROFILE_MODEL_P 5371 1.1 christos /* Record the fields for profiling. */ 5372 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5373 1.1 christos { 5374 1.1 christos } 5375 1.1 christos #endif 5376 1.1 christos #undef FLD 5377 1.1 christos return idesc; 5378 1.1 christos } 5379 1.1 christos 5380 1.1 christos extract_sfmt_move_m_pcplus_p0: 5381 1.1 christos { 5382 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5383 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5384 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_spplus_p8.f 5385 1.1 christos UINT f_memmode; 5386 1.1 christos 5387 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5388 1.1 christos 5389 1.1 christos /* Record the fields for the semantic handler. */ 5390 1.1 christos FLD (f_memmode) = f_memmode; 5391 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_pcplus_p0", "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5392 1.1 christos 5393 1.1 christos #if WITH_PROFILE_MODEL_P 5394 1.1 christos /* Record the fields for profiling. */ 5395 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5396 1.1 christos { 5397 1.1 christos } 5398 1.1 christos #endif 5399 1.1 christos #undef FLD 5400 1.1 christos return idesc; 5401 1.1 christos } 5402 1.1 christos 5403 1.1 christos extract_sfmt_move_m_spplus_p8: 5404 1.1 christos { 5405 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5406 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5407 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_spplus_p8.f 5408 1.1 christos UINT f_memmode; 5409 1.1 christos 5410 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5411 1.1 christos 5412 1.1 christos /* Record the fields for the semantic handler. */ 5413 1.1 christos FLD (f_memmode) = f_memmode; 5414 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_spplus_p8", "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5415 1.1 christos 5416 1.1 christos #if WITH_PROFILE_MODEL_P 5417 1.1 christos /* Record the fields for profiling. */ 5418 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5419 1.1 christos { 5420 1.1 christos FLD (in_h_gr_SI_14) = 14; 5421 1.1 christos FLD (out_h_gr_SI_14) = 14; 5422 1.1 christos } 5423 1.1 christos #endif 5424 1.1 christos #undef FLD 5425 1.1 christos return idesc; 5426 1.1 christos } 5427 1.1 christos 5428 1.1 christos extract_sfmt_addo_m_b_m: 5429 1.1 christos { 5430 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5431 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5432 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 5433 1.1 christos UINT f_operand2; 5434 1.1 christos UINT f_memmode; 5435 1.1 christos UINT f_operand1; 5436 1.1 christos 5437 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5438 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5439 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5440 1.1 christos 5441 1.1 christos /* Record the fields for the semantic handler. */ 5442 1.1 christos FLD (f_operand2) = f_operand2; 5443 1.1 christos FLD (f_operand1) = f_operand1; 5444 1.1 christos FLD (f_memmode) = f_memmode; 5445 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5446 1.1 christos 5447 1.1 christos #if WITH_PROFILE_MODEL_P 5448 1.1 christos /* Record the fields for profiling. */ 5449 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5450 1.1 christos { 5451 1.1 christos FLD (in_Rd) = f_operand2; 5452 1.1 christos FLD (in_Rs) = f_operand1; 5453 1.1 christos FLD (out_Rs) = f_operand1; 5454 1.1 christos } 5455 1.1 christos #endif 5456 1.1 christos #undef FLD 5457 1.1 christos return idesc; 5458 1.1 christos } 5459 1.1 christos 5460 1.1 christos extract_sfmt_addo_m_w_m: 5461 1.1 christos { 5462 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5463 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5464 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 5465 1.1 christos UINT f_operand2; 5466 1.1 christos UINT f_memmode; 5467 1.1 christos UINT f_operand1; 5468 1.1 christos 5469 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5470 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5471 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5472 1.1 christos 5473 1.1 christos /* Record the fields for the semantic handler. */ 5474 1.1 christos FLD (f_operand2) = f_operand2; 5475 1.1 christos FLD (f_operand1) = f_operand1; 5476 1.1 christos FLD (f_memmode) = f_memmode; 5477 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5478 1.1 christos 5479 1.1 christos #if WITH_PROFILE_MODEL_P 5480 1.1 christos /* Record the fields for profiling. */ 5481 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5482 1.1 christos { 5483 1.1 christos FLD (in_Rd) = f_operand2; 5484 1.1 christos FLD (in_Rs) = f_operand1; 5485 1.1 christos FLD (out_Rs) = f_operand1; 5486 1.1 christos } 5487 1.1 christos #endif 5488 1.1 christos #undef FLD 5489 1.1 christos return idesc; 5490 1.1 christos } 5491 1.1 christos 5492 1.1 christos extract_sfmt_addo_m_d_m: 5493 1.1 christos { 5494 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5495 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5496 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f 5497 1.1 christos UINT f_operand2; 5498 1.1 christos UINT f_memmode; 5499 1.1 christos UINT f_operand1; 5500 1.1 christos 5501 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5502 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5503 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5504 1.1 christos 5505 1.1 christos /* Record the fields for the semantic handler. */ 5506 1.1 christos FLD (f_operand2) = f_operand2; 5507 1.1 christos FLD (f_operand1) = f_operand1; 5508 1.1 christos FLD (f_memmode) = f_memmode; 5509 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5510 1.1 christos 5511 1.1 christos #if WITH_PROFILE_MODEL_P 5512 1.1 christos /* Record the fields for profiling. */ 5513 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5514 1.1 christos { 5515 1.1 christos FLD (in_Rd) = f_operand2; 5516 1.1 christos FLD (in_Rs) = f_operand1; 5517 1.1 christos FLD (out_Rs) = f_operand1; 5518 1.1 christos } 5519 1.1 christos #endif 5520 1.1 christos #undef FLD 5521 1.1 christos return idesc; 5522 1.1 christos } 5523 1.1 christos 5524 1.1 christos extract_sfmt_addo_cb: 5525 1.1 christos { 5526 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5527 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5528 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f 5529 1.1 christos INT f_indir_pc__byte; 5530 1.1 christos UINT f_operand2; 5531 1.1 christos /* Contents of trailing part of insn. */ 5532 1.1 christos UINT word_1; 5533 1.1 christos 5534 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5535 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 5536 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5537 1.1 christos 5538 1.1 christos /* Record the fields for the semantic handler. */ 5539 1.1 christos FLD (f_operand2) = f_operand2; 5540 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte; 5541 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_cb", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0)); 5542 1.1 christos 5543 1.1 christos #if WITH_PROFILE_MODEL_P 5544 1.1 christos /* Record the fields for profiling. */ 5545 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5546 1.1 christos { 5547 1.1 christos FLD (in_Rd) = f_operand2; 5548 1.1 christos } 5549 1.1 christos #endif 5550 1.1 christos #undef FLD 5551 1.1 christos return idesc; 5552 1.1 christos } 5553 1.1 christos 5554 1.1 christos extract_sfmt_addo_cw: 5555 1.1 christos { 5556 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5557 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5558 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f 5559 1.1 christos INT f_indir_pc__word; 5560 1.1 christos UINT f_operand2; 5561 1.1 christos /* Contents of trailing part of insn. */ 5562 1.1 christos UINT word_1; 5563 1.1 christos 5564 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5565 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); 5566 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5567 1.1 christos 5568 1.1 christos /* Record the fields for the semantic handler. */ 5569 1.1 christos FLD (f_operand2) = f_operand2; 5570 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word; 5571 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_cw", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0)); 5572 1.1 christos 5573 1.1 christos #if WITH_PROFILE_MODEL_P 5574 1.1 christos /* Record the fields for profiling. */ 5575 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5576 1.1 christos { 5577 1.1 christos FLD (in_Rd) = f_operand2; 5578 1.1 christos } 5579 1.1 christos #endif 5580 1.1 christos #undef FLD 5581 1.1 christos return idesc; 5582 1.1 christos } 5583 1.1 christos 5584 1.1 christos extract_sfmt_addo_cd: 5585 1.1 christos { 5586 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5587 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5588 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f 5589 1.1 christos INT f_indir_pc__dword; 5590 1.1 christos UINT f_operand2; 5591 1.1 christos /* Contents of trailing part of insn. */ 5592 1.1 christos UINT word_1; 5593 1.1 christos 5594 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5595 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 5596 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5597 1.1 christos 5598 1.1 christos /* Record the fields for the semantic handler. */ 5599 1.1 christos FLD (f_operand2) = f_operand2; 5600 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 5601 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_cd", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 5602 1.1 christos 5603 1.1 christos #if WITH_PROFILE_MODEL_P 5604 1.1 christos /* Record the fields for profiling. */ 5605 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5606 1.1 christos { 5607 1.1 christos FLD (in_Rd) = f_operand2; 5608 1.1 christos } 5609 1.1 christos #endif 5610 1.1 christos #undef FLD 5611 1.1 christos return idesc; 5612 1.1 christos } 5613 1.1 christos 5614 1.1 christos extract_sfmt_dip_m: 5615 1.1 christos { 5616 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5617 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5618 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f 5619 1.1 christos UINT f_memmode; 5620 1.1 christos UINT f_operand1; 5621 1.1 christos 5622 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1); 5623 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5624 1.1 christos 5625 1.1 christos /* Record the fields for the semantic handler. */ 5626 1.1 christos FLD (f_operand1) = f_operand1; 5627 1.1 christos FLD (f_memmode) = f_memmode; 5628 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dip_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0)); 5629 1.1 christos 5630 1.1 christos #if WITH_PROFILE_MODEL_P 5631 1.1 christos /* Record the fields for profiling. */ 5632 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5633 1.1 christos { 5634 1.1 christos FLD (in_Rs) = f_operand1; 5635 1.1 christos FLD (out_Rs) = f_operand1; 5636 1.1 christos } 5637 1.1 christos #endif 5638 1.1 christos #undef FLD 5639 1.1 christos return idesc; 5640 1.1 christos } 5641 1.1 christos 5642 1.1 christos extract_sfmt_dip_c: 5643 1.1 christos { 5644 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5645 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5646 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f 5647 1.1 christos INT f_indir_pc__dword; 5648 1.1 christos /* Contents of trailing part of insn. */ 5649 1.1 christos UINT word_1; 5650 1.1 christos 5651 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2); 5652 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); 5653 1.1 christos 5654 1.1 christos /* Record the fields for the semantic handler. */ 5655 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword; 5656 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dip_c", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0)); 5657 1.1 christos 5658 1.1 christos #undef FLD 5659 1.1 christos return idesc; 5660 1.1 christos } 5661 1.1 christos 5662 1.1 christos extract_sfmt_addi_acr_b_r: 5663 1.1 christos { 5664 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5665 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5666 1.1 christos #define FLD(f) abuf->fields.sfmt_add_b_r.f 5667 1.1 christos UINT f_operand2; 5668 1.1 christos UINT f_operand1; 5669 1.1 christos 5670 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5671 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); 5672 1.1 christos 5673 1.1 christos /* Record the fields for the semantic handler. */ 5674 1.1 christos FLD (f_operand2) = f_operand2; 5675 1.1 christos FLD (f_operand1) = f_operand1; 5676 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi_acr_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0)); 5677 1.1 christos 5678 1.1 christos #if WITH_PROFILE_MODEL_P 5679 1.1 christos /* Record the fields for profiling. */ 5680 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5681 1.1 christos { 5682 1.1 christos FLD (in_Rd) = f_operand2; 5683 1.1 christos FLD (in_Rs) = f_operand1; 5684 1.1 christos } 5685 1.1 christos #endif 5686 1.1 christos #undef FLD 5687 1.1 christos return idesc; 5688 1.1 christos } 5689 1.1 christos 5690 1.1 christos extract_sfmt_biap_pc_b_r: 5691 1.1 christos { 5692 1.1 christos const IDESC *idesc = &crisv10f_insn_data[itype]; 5693 1.11 christos CGEN_INSN_WORD insn ATTRIBUTE_UNUSED = base_insn; 5694 1.1 christos #define FLD(f) abuf->fields.sfmt_addoq.f 5695 1.1 christos UINT f_operand2; 5696 1.1 christos 5697 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); 5698 1.1 christos 5699 1.1 christos /* Record the fields for the semantic handler. */ 5700 1.1 christos FLD (f_operand2) = f_operand2; 5701 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_biap_pc_b_r", "f_operand2 0x%x", 'x', f_operand2, (char *) 0)); 5702 1.1 christos 5703 1.1 christos #if WITH_PROFILE_MODEL_P 5704 1.1 christos /* Record the fields for profiling. */ 5705 1.1 christos if (PROFILE_MODEL_P (current_cpu)) 5706 1.1 christos { 5707 1.1 christos FLD (in_Rd) = f_operand2; 5708 1.1 christos } 5709 1.1 christos #endif 5710 1.1 christos #undef FLD 5711 1.1 christos return idesc; 5712 1.1 christos } 5713 1.1 christos 5714 1.1 christos } 5715