1 /* Decode header for crisv10f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2019 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, see <http://www.gnu.org/licenses/>.
24 #ifndef CRISV10F_DECODE_H
25 #define CRISV10F_DECODE_H
27 extern const IDESC
*crisv10f_decode (SIM_CPU
*, IADDR
,
30 extern void crisv10f_init_idesc_table (SIM_CPU
*);
31 extern void crisv10f_sem_init_idesc_table (SIM_CPU
*);
32 extern void crisv10f_semf_init_idesc_table (SIM_CPU
*);
34 /* Enum declaration for instructions in cpu family crisv10f. */
35 typedef enum crisv10f_insn_type
{
36 CRISV10F_INSN_X_INVALID
, CRISV10F_INSN_X_AFTER
, CRISV10F_INSN_X_BEFORE
, CRISV10F_INSN_X_CTI_CHAIN
37 , CRISV10F_INSN_X_CHAIN
, CRISV10F_INSN_X_BEGIN
, CRISV10F_INSN_NOP
, CRISV10F_INSN_MOVE_B_R
38 , CRISV10F_INSN_MOVE_W_R
, CRISV10F_INSN_MOVE_D_R
, CRISV10F_INSN_MOVEPCR
, CRISV10F_INSN_MOVEQ
39 , CRISV10F_INSN_MOVS_B_R
, CRISV10F_INSN_MOVS_W_R
, CRISV10F_INSN_MOVU_B_R
, CRISV10F_INSN_MOVU_W_R
40 , CRISV10F_INSN_MOVECBR
, CRISV10F_INSN_MOVECWR
, CRISV10F_INSN_MOVECDR
, CRISV10F_INSN_MOVSCBR
41 , CRISV10F_INSN_MOVSCWR
, CRISV10F_INSN_MOVUCBR
, CRISV10F_INSN_MOVUCWR
, CRISV10F_INSN_ADDQ
42 , CRISV10F_INSN_SUBQ
, CRISV10F_INSN_CMP_R_B_R
, CRISV10F_INSN_CMP_R_W_R
, CRISV10F_INSN_CMP_R_D_R
43 , CRISV10F_INSN_CMP_M_B_M
, CRISV10F_INSN_CMP_M_W_M
, CRISV10F_INSN_CMP_M_D_M
, CRISV10F_INSN_CMPCBR
44 , CRISV10F_INSN_CMPCWR
, CRISV10F_INSN_CMPCDR
, CRISV10F_INSN_CMPQ
, CRISV10F_INSN_CMPS_M_B_M
45 , CRISV10F_INSN_CMPS_M_W_M
, CRISV10F_INSN_CMPSCBR
, CRISV10F_INSN_CMPSCWR
, CRISV10F_INSN_CMPU_M_B_M
46 , CRISV10F_INSN_CMPU_M_W_M
, CRISV10F_INSN_CMPUCBR
, CRISV10F_INSN_CMPUCWR
, CRISV10F_INSN_MOVE_M_B_M
47 , CRISV10F_INSN_MOVE_M_W_M
, CRISV10F_INSN_MOVE_M_D_M
, CRISV10F_INSN_MOVS_M_B_M
, CRISV10F_INSN_MOVS_M_W_M
48 , CRISV10F_INSN_MOVU_M_B_M
, CRISV10F_INSN_MOVU_M_W_M
, CRISV10F_INSN_MOVE_R_SPRV10
, CRISV10F_INSN_MOVE_SPR_RV10
49 , CRISV10F_INSN_RET_TYPE
, CRISV10F_INSN_MOVE_M_SPRV10
, CRISV10F_INSN_MOVE_C_SPRV10_P5
, CRISV10F_INSN_MOVE_C_SPRV10_P9
50 , CRISV10F_INSN_MOVE_C_SPRV10_P10
, CRISV10F_INSN_MOVE_C_SPRV10_P11
, CRISV10F_INSN_MOVE_C_SPRV10_P12
, CRISV10F_INSN_MOVE_C_SPRV10_P13
51 , CRISV10F_INSN_MOVE_C_SPRV10_P7
, CRISV10F_INSN_MOVE_C_SPRV10_P14
, CRISV10F_INSN_MOVE_C_SPRV10_P15
, CRISV10F_INSN_MOVE_SPR_MV10
52 , CRISV10F_INSN_SBFS
, CRISV10F_INSN_MOVEM_R_M
, CRISV10F_INSN_MOVEM_M_R
, CRISV10F_INSN_MOVEM_M_PC
53 , CRISV10F_INSN_ADD_B_R
, CRISV10F_INSN_ADD_W_R
, CRISV10F_INSN_ADD_D_R
, CRISV10F_INSN_ADD_M_B_M
54 , CRISV10F_INSN_ADD_M_W_M
, CRISV10F_INSN_ADD_M_D_M
, CRISV10F_INSN_ADDCBR
, CRISV10F_INSN_ADDCWR
55 , CRISV10F_INSN_ADDCDR
, CRISV10F_INSN_ADDCPC
, CRISV10F_INSN_ADDS_B_R
, CRISV10F_INSN_ADDS_W_R
56 , CRISV10F_INSN_ADDS_M_B_M
, CRISV10F_INSN_ADDS_M_W_M
, CRISV10F_INSN_ADDSCBR
, CRISV10F_INSN_ADDSCWR
57 , CRISV10F_INSN_ADDSPCPC
, CRISV10F_INSN_ADDU_B_R
, CRISV10F_INSN_ADDU_W_R
, CRISV10F_INSN_ADDU_M_B_M
58 , CRISV10F_INSN_ADDU_M_W_M
, CRISV10F_INSN_ADDUCBR
, CRISV10F_INSN_ADDUCWR
, CRISV10F_INSN_SUB_B_R
59 , CRISV10F_INSN_SUB_W_R
, CRISV10F_INSN_SUB_D_R
, CRISV10F_INSN_SUB_M_B_M
, CRISV10F_INSN_SUB_M_W_M
60 , CRISV10F_INSN_SUB_M_D_M
, CRISV10F_INSN_SUBCBR
, CRISV10F_INSN_SUBCWR
, CRISV10F_INSN_SUBCDR
61 , CRISV10F_INSN_SUBS_B_R
, CRISV10F_INSN_SUBS_W_R
, CRISV10F_INSN_SUBS_M_B_M
, CRISV10F_INSN_SUBS_M_W_M
62 , CRISV10F_INSN_SUBSCBR
, CRISV10F_INSN_SUBSCWR
, CRISV10F_INSN_SUBU_B_R
, CRISV10F_INSN_SUBU_W_R
63 , CRISV10F_INSN_SUBU_M_B_M
, CRISV10F_INSN_SUBU_M_W_M
, CRISV10F_INSN_SUBUCBR
, CRISV10F_INSN_SUBUCWR
64 , CRISV10F_INSN_ADDI_B_R
, CRISV10F_INSN_ADDI_W_R
, CRISV10F_INSN_ADDI_D_R
, CRISV10F_INSN_NEG_B_R
65 , CRISV10F_INSN_NEG_W_R
, CRISV10F_INSN_NEG_D_R
, CRISV10F_INSN_TEST_M_B_M
, CRISV10F_INSN_TEST_M_W_M
66 , CRISV10F_INSN_TEST_M_D_M
, CRISV10F_INSN_MOVE_R_M_B_M
, CRISV10F_INSN_MOVE_R_M_W_M
, CRISV10F_INSN_MOVE_R_M_D_M
67 , CRISV10F_INSN_MULS_B
, CRISV10F_INSN_MULS_W
, CRISV10F_INSN_MULS_D
, CRISV10F_INSN_MULU_B
68 , CRISV10F_INSN_MULU_W
, CRISV10F_INSN_MULU_D
, CRISV10F_INSN_MSTEP
, CRISV10F_INSN_DSTEP
69 , CRISV10F_INSN_ABS
, CRISV10F_INSN_AND_B_R
, CRISV10F_INSN_AND_W_R
, CRISV10F_INSN_AND_D_R
70 , CRISV10F_INSN_AND_M_B_M
, CRISV10F_INSN_AND_M_W_M
, CRISV10F_INSN_AND_M_D_M
, CRISV10F_INSN_ANDCBR
71 , CRISV10F_INSN_ANDCWR
, CRISV10F_INSN_ANDCDR
, CRISV10F_INSN_ANDQ
, CRISV10F_INSN_ORR_B_R
72 , CRISV10F_INSN_ORR_W_R
, CRISV10F_INSN_ORR_D_R
, CRISV10F_INSN_OR_M_B_M
, CRISV10F_INSN_OR_M_W_M
73 , CRISV10F_INSN_OR_M_D_M
, CRISV10F_INSN_ORCBR
, CRISV10F_INSN_ORCWR
, CRISV10F_INSN_ORCDR
74 , CRISV10F_INSN_ORQ
, CRISV10F_INSN_XOR
, CRISV10F_INSN_SWAP
, CRISV10F_INSN_ASRR_B_R
75 , CRISV10F_INSN_ASRR_W_R
, CRISV10F_INSN_ASRR_D_R
, CRISV10F_INSN_ASRQ
, CRISV10F_INSN_LSRR_B_R
76 , CRISV10F_INSN_LSRR_W_R
, CRISV10F_INSN_LSRR_D_R
, CRISV10F_INSN_LSRQ
, CRISV10F_INSN_LSLR_B_R
77 , CRISV10F_INSN_LSLR_W_R
, CRISV10F_INSN_LSLR_D_R
, CRISV10F_INSN_LSLQ
, CRISV10F_INSN_BTST
78 , CRISV10F_INSN_BTSTQ
, CRISV10F_INSN_SETF
, CRISV10F_INSN_CLEARF
, CRISV10F_INSN_BCC_B
79 , CRISV10F_INSN_BA_B
, CRISV10F_INSN_BCC_W
, CRISV10F_INSN_BA_W
, CRISV10F_INSN_JUMP_R
80 , CRISV10F_INSN_JUMP_M
, CRISV10F_INSN_JUMP_C
, CRISV10F_INSN_BREAK
, CRISV10F_INSN_BOUND_R_B_R
81 , CRISV10F_INSN_BOUND_R_W_R
, CRISV10F_INSN_BOUND_R_D_R
, CRISV10F_INSN_BOUND_M_B_M
, CRISV10F_INSN_BOUND_M_W_M
82 , CRISV10F_INSN_BOUND_M_D_M
, CRISV10F_INSN_BOUND_CB
, CRISV10F_INSN_BOUND_CW
, CRISV10F_INSN_BOUND_CD
83 , CRISV10F_INSN_SCC
, CRISV10F_INSN_LZ
, CRISV10F_INSN_ADDOQ
, CRISV10F_INSN_BDAPQPC
84 , CRISV10F_INSN_BDAP_32_PC
, CRISV10F_INSN_MOVE_M_PCPLUS_P0
, CRISV10F_INSN_MOVE_M_SPPLUS_P8
, CRISV10F_INSN_ADDO_M_B_M
85 , CRISV10F_INSN_ADDO_M_W_M
, CRISV10F_INSN_ADDO_M_D_M
, CRISV10F_INSN_ADDO_CB
, CRISV10F_INSN_ADDO_CW
86 , CRISV10F_INSN_ADDO_CD
, CRISV10F_INSN_DIP_M
, CRISV10F_INSN_DIP_C
, CRISV10F_INSN_ADDI_ACR_B_R
87 , CRISV10F_INSN_ADDI_ACR_W_R
, CRISV10F_INSN_ADDI_ACR_D_R
, CRISV10F_INSN_BIAP_PC_B_R
, CRISV10F_INSN_BIAP_PC_W_R
88 , CRISV10F_INSN_BIAP_PC_D_R
, CRISV10F_INSN__MAX
91 /* Enum declaration for semantic formats in cpu family crisv10f. */
92 typedef enum crisv10f_sfmt_type
{
93 CRISV10F_SFMT_EMPTY
, CRISV10F_SFMT_NOP
, CRISV10F_SFMT_MOVE_B_R
, CRISV10F_SFMT_MOVE_D_R
94 , CRISV10F_SFMT_MOVEPCR
, CRISV10F_SFMT_MOVEQ
, CRISV10F_SFMT_MOVS_B_R
, CRISV10F_SFMT_MOVECBR
95 , CRISV10F_SFMT_MOVECWR
, CRISV10F_SFMT_MOVECDR
, CRISV10F_SFMT_MOVSCBR
, CRISV10F_SFMT_MOVSCWR
96 , CRISV10F_SFMT_MOVUCBR
, CRISV10F_SFMT_MOVUCWR
, CRISV10F_SFMT_ADDQ
, CRISV10F_SFMT_CMP_R_B_R
97 , CRISV10F_SFMT_CMP_M_B_M
, CRISV10F_SFMT_CMP_M_W_M
, CRISV10F_SFMT_CMP_M_D_M
, CRISV10F_SFMT_CMPCBR
98 , CRISV10F_SFMT_CMPCWR
, CRISV10F_SFMT_CMPCDR
, CRISV10F_SFMT_CMPQ
, CRISV10F_SFMT_CMPUCBR
99 , CRISV10F_SFMT_CMPUCWR
, CRISV10F_SFMT_MOVE_M_B_M
, CRISV10F_SFMT_MOVE_M_W_M
, CRISV10F_SFMT_MOVE_M_D_M
100 , CRISV10F_SFMT_MOVS_M_B_M
, CRISV10F_SFMT_MOVS_M_W_M
, CRISV10F_SFMT_MOVE_R_SPRV10
, CRISV10F_SFMT_MOVE_SPR_RV10
101 , CRISV10F_SFMT_RET_TYPE
, CRISV10F_SFMT_MOVE_M_SPRV10
, CRISV10F_SFMT_MOVE_C_SPRV10_P5
, CRISV10F_SFMT_MOVE_C_SPRV10_P9
102 , CRISV10F_SFMT_MOVE_SPR_MV10
, CRISV10F_SFMT_SBFS
, CRISV10F_SFMT_MOVEM_R_M
, CRISV10F_SFMT_MOVEM_M_R
103 , CRISV10F_SFMT_MOVEM_M_PC
, CRISV10F_SFMT_ADD_B_R
, CRISV10F_SFMT_ADD_D_R
, CRISV10F_SFMT_ADD_M_B_M
104 , CRISV10F_SFMT_ADD_M_W_M
, CRISV10F_SFMT_ADD_M_D_M
, CRISV10F_SFMT_ADDCBR
, CRISV10F_SFMT_ADDCWR
105 , CRISV10F_SFMT_ADDCDR
, CRISV10F_SFMT_ADDCPC
, CRISV10F_SFMT_ADDS_M_B_M
, CRISV10F_SFMT_ADDS_M_W_M
106 , CRISV10F_SFMT_ADDSCBR
, CRISV10F_SFMT_ADDSCWR
, CRISV10F_SFMT_ADDSPCPC
, CRISV10F_SFMT_ADDI_B_R
107 , CRISV10F_SFMT_NEG_B_R
, CRISV10F_SFMT_NEG_D_R
, CRISV10F_SFMT_TEST_M_B_M
, CRISV10F_SFMT_TEST_M_W_M
108 , CRISV10F_SFMT_TEST_M_D_M
, CRISV10F_SFMT_MOVE_R_M_B_M
, CRISV10F_SFMT_MOVE_R_M_W_M
, CRISV10F_SFMT_MOVE_R_M_D_M
109 , CRISV10F_SFMT_MULS_B
, CRISV10F_SFMT_MSTEP
, CRISV10F_SFMT_DSTEP
, CRISV10F_SFMT_AND_B_R
110 , CRISV10F_SFMT_AND_D_R
, CRISV10F_SFMT_AND_M_B_M
, CRISV10F_SFMT_AND_M_W_M
, CRISV10F_SFMT_AND_M_D_M
111 , CRISV10F_SFMT_ANDCBR
, CRISV10F_SFMT_ANDCWR
, CRISV10F_SFMT_ANDCDR
, CRISV10F_SFMT_ANDQ
112 , CRISV10F_SFMT_SWAP
, CRISV10F_SFMT_ASRQ
, CRISV10F_SFMT_LSRR_B_R
, CRISV10F_SFMT_LSRR_D_R
113 , CRISV10F_SFMT_BTST
, CRISV10F_SFMT_BTSTQ
, CRISV10F_SFMT_SETF
, CRISV10F_SFMT_BCC_B
114 , CRISV10F_SFMT_BA_B
, CRISV10F_SFMT_BCC_W
, CRISV10F_SFMT_BA_W
, CRISV10F_SFMT_JUMP_R
115 , CRISV10F_SFMT_JUMP_M
, CRISV10F_SFMT_JUMP_C
, CRISV10F_SFMT_BREAK
, CRISV10F_SFMT_BOUND_M_B_M
116 , CRISV10F_SFMT_BOUND_M_W_M
, CRISV10F_SFMT_BOUND_M_D_M
, CRISV10F_SFMT_BOUND_CB
, CRISV10F_SFMT_BOUND_CW
117 , CRISV10F_SFMT_BOUND_CD
, CRISV10F_SFMT_SCC
, CRISV10F_SFMT_ADDOQ
, CRISV10F_SFMT_BDAPQPC
118 , CRISV10F_SFMT_BDAP_32_PC
, CRISV10F_SFMT_MOVE_M_PCPLUS_P0
, CRISV10F_SFMT_MOVE_M_SPPLUS_P8
, CRISV10F_SFMT_ADDO_M_B_M
119 , CRISV10F_SFMT_ADDO_M_W_M
, CRISV10F_SFMT_ADDO_M_D_M
, CRISV10F_SFMT_ADDO_CB
, CRISV10F_SFMT_ADDO_CW
120 , CRISV10F_SFMT_ADDO_CD
, CRISV10F_SFMT_DIP_M
, CRISV10F_SFMT_DIP_C
, CRISV10F_SFMT_ADDI_ACR_B_R
121 , CRISV10F_SFMT_BIAP_PC_B_R
122 } CRISV10F_SFMT_TYPE
;
124 /* Function unit handlers (user written). */
126 extern int crisv10f_model_crisv10_u_movem (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/, INT
/*Rd*/);
127 extern int crisv10f_model_crisv10_u_multiply (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
128 extern int crisv10f_model_crisv10_u_skip4 (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
129 extern int crisv10f_model_crisv10_u_stall (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
130 extern int crisv10f_model_crisv10_u_const32 (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
131 extern int crisv10f_model_crisv10_u_const16 (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
132 extern int crisv10f_model_crisv10_u_mem (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
133 extern int crisv10f_model_crisv10_u_exec (SIM_CPU
*, const IDESC
*, int /*unit_num*/, int /*referenced*/);
135 /* Profiling before/after handlers (user written) */
137 extern void crisv10f_model_insn_before (SIM_CPU
*, int /*first_p*/);
138 extern void crisv10f_model_insn_after (SIM_CPU
*, int /*last_p*/, int /*cycles*/);
140 #endif /* CRISV10F_DECODE_H */