1 /* Simulator instruction decoder for or1k32bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996-2024 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, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
25 #define WANT_CPU or1k32bf
26 #define WANT_CPU_OR1K32BF
29 #include "sim-assert.h"
33 /* The instruction descriptor array.
34 This is computed at runtime. Space for it is not malloc'd to save a
35 teensy bit of cpu in the decoder. Moving it to malloc space is trivial
36 but won't be done until necessary (we don't currently support the runtime
37 addition of instructions nor an SMP machine with different cpus). */
38 static IDESC or1k32bf_insn_data
[OR1K32BF_INSN__MAX
];
40 /* Commas between elements are contained in the macros.
41 Some of these are conditionally compiled out. */
43 static const struct insn_sem or1k32bf_insn_sem
[] =
45 { VIRTUAL_INSN_X_INVALID
, OR1K32BF_INSN_X_INVALID
, OR1K32BF_SFMT_EMPTY
},
46 { VIRTUAL_INSN_X_AFTER
, OR1K32BF_INSN_X_AFTER
, OR1K32BF_SFMT_EMPTY
},
47 { VIRTUAL_INSN_X_BEFORE
, OR1K32BF_INSN_X_BEFORE
, OR1K32BF_SFMT_EMPTY
},
48 { VIRTUAL_INSN_X_CTI_CHAIN
, OR1K32BF_INSN_X_CTI_CHAIN
, OR1K32BF_SFMT_EMPTY
},
49 { VIRTUAL_INSN_X_CHAIN
, OR1K32BF_INSN_X_CHAIN
, OR1K32BF_SFMT_EMPTY
},
50 { VIRTUAL_INSN_X_BEGIN
, OR1K32BF_INSN_X_BEGIN
, OR1K32BF_SFMT_EMPTY
},
51 { OR1K_INSN_L_J
, OR1K32BF_INSN_L_J
, OR1K32BF_SFMT_L_J
},
52 { OR1K_INSN_L_ADRP
, OR1K32BF_INSN_L_ADRP
, OR1K32BF_SFMT_L_ADRP
},
53 { OR1K_INSN_L_JAL
, OR1K32BF_INSN_L_JAL
, OR1K32BF_SFMT_L_JAL
},
54 { OR1K_INSN_L_JR
, OR1K32BF_INSN_L_JR
, OR1K32BF_SFMT_L_JR
},
55 { OR1K_INSN_L_JALR
, OR1K32BF_INSN_L_JALR
, OR1K32BF_SFMT_L_JALR
},
56 { OR1K_INSN_L_BNF
, OR1K32BF_INSN_L_BNF
, OR1K32BF_SFMT_L_BNF
},
57 { OR1K_INSN_L_BF
, OR1K32BF_INSN_L_BF
, OR1K32BF_SFMT_L_BNF
},
58 { OR1K_INSN_L_TRAP
, OR1K32BF_INSN_L_TRAP
, OR1K32BF_SFMT_L_TRAP
},
59 { OR1K_INSN_L_SYS
, OR1K32BF_INSN_L_SYS
, OR1K32BF_SFMT_L_TRAP
},
60 { OR1K_INSN_L_MSYNC
, OR1K32BF_INSN_L_MSYNC
, OR1K32BF_SFMT_L_MSYNC
},
61 { OR1K_INSN_L_PSYNC
, OR1K32BF_INSN_L_PSYNC
, OR1K32BF_SFMT_L_MSYNC
},
62 { OR1K_INSN_L_CSYNC
, OR1K32BF_INSN_L_CSYNC
, OR1K32BF_SFMT_L_MSYNC
},
63 { OR1K_INSN_L_RFE
, OR1K32BF_INSN_L_RFE
, OR1K32BF_SFMT_L_MSYNC
},
64 { OR1K_INSN_L_NOP_IMM
, OR1K32BF_INSN_L_NOP_IMM
, OR1K32BF_SFMT_L_NOP_IMM
},
65 { OR1K_INSN_L_MOVHI
, OR1K32BF_INSN_L_MOVHI
, OR1K32BF_SFMT_L_MOVHI
},
66 { OR1K_INSN_L_MACRC
, OR1K32BF_INSN_L_MACRC
, OR1K32BF_SFMT_L_MACRC
},
67 { OR1K_INSN_L_MFSPR
, OR1K32BF_INSN_L_MFSPR
, OR1K32BF_SFMT_L_MFSPR
},
68 { OR1K_INSN_L_MTSPR
, OR1K32BF_INSN_L_MTSPR
, OR1K32BF_SFMT_L_MTSPR
},
69 { OR1K_INSN_L_LWZ
, OR1K32BF_INSN_L_LWZ
, OR1K32BF_SFMT_L_LWZ
},
70 { OR1K_INSN_L_LWS
, OR1K32BF_INSN_L_LWS
, OR1K32BF_SFMT_L_LWS
},
71 { OR1K_INSN_L_LWA
, OR1K32BF_INSN_L_LWA
, OR1K32BF_SFMT_L_LWA
},
72 { OR1K_INSN_L_LBZ
, OR1K32BF_INSN_L_LBZ
, OR1K32BF_SFMT_L_LBZ
},
73 { OR1K_INSN_L_LBS
, OR1K32BF_INSN_L_LBS
, OR1K32BF_SFMT_L_LBS
},
74 { OR1K_INSN_L_LHZ
, OR1K32BF_INSN_L_LHZ
, OR1K32BF_SFMT_L_LHZ
},
75 { OR1K_INSN_L_LHS
, OR1K32BF_INSN_L_LHS
, OR1K32BF_SFMT_L_LHS
},
76 { OR1K_INSN_L_SW
, OR1K32BF_INSN_L_SW
, OR1K32BF_SFMT_L_SW
},
77 { OR1K_INSN_L_SB
, OR1K32BF_INSN_L_SB
, OR1K32BF_SFMT_L_SB
},
78 { OR1K_INSN_L_SH
, OR1K32BF_INSN_L_SH
, OR1K32BF_SFMT_L_SH
},
79 { OR1K_INSN_L_SWA
, OR1K32BF_INSN_L_SWA
, OR1K32BF_SFMT_L_SWA
},
80 { OR1K_INSN_L_SLL
, OR1K32BF_INSN_L_SLL
, OR1K32BF_SFMT_L_SLL
},
81 { OR1K_INSN_L_SLLI
, OR1K32BF_INSN_L_SLLI
, OR1K32BF_SFMT_L_SLLI
},
82 { OR1K_INSN_L_SRL
, OR1K32BF_INSN_L_SRL
, OR1K32BF_SFMT_L_SLL
},
83 { OR1K_INSN_L_SRLI
, OR1K32BF_INSN_L_SRLI
, OR1K32BF_SFMT_L_SLLI
},
84 { OR1K_INSN_L_SRA
, OR1K32BF_INSN_L_SRA
, OR1K32BF_SFMT_L_SLL
},
85 { OR1K_INSN_L_SRAI
, OR1K32BF_INSN_L_SRAI
, OR1K32BF_SFMT_L_SLLI
},
86 { OR1K_INSN_L_ROR
, OR1K32BF_INSN_L_ROR
, OR1K32BF_SFMT_L_SLL
},
87 { OR1K_INSN_L_RORI
, OR1K32BF_INSN_L_RORI
, OR1K32BF_SFMT_L_SLLI
},
88 { OR1K_INSN_L_AND
, OR1K32BF_INSN_L_AND
, OR1K32BF_SFMT_L_AND
},
89 { OR1K_INSN_L_OR
, OR1K32BF_INSN_L_OR
, OR1K32BF_SFMT_L_AND
},
90 { OR1K_INSN_L_XOR
, OR1K32BF_INSN_L_XOR
, OR1K32BF_SFMT_L_AND
},
91 { OR1K_INSN_L_ADD
, OR1K32BF_INSN_L_ADD
, OR1K32BF_SFMT_L_ADD
},
92 { OR1K_INSN_L_SUB
, OR1K32BF_INSN_L_SUB
, OR1K32BF_SFMT_L_ADD
},
93 { OR1K_INSN_L_ADDC
, OR1K32BF_INSN_L_ADDC
, OR1K32BF_SFMT_L_ADDC
},
94 { OR1K_INSN_L_MUL
, OR1K32BF_INSN_L_MUL
, OR1K32BF_SFMT_L_MUL
},
95 { OR1K_INSN_L_MULD
, OR1K32BF_INSN_L_MULD
, OR1K32BF_SFMT_L_MULD
},
96 { OR1K_INSN_L_MULU
, OR1K32BF_INSN_L_MULU
, OR1K32BF_SFMT_L_MULU
},
97 { OR1K_INSN_L_MULDU
, OR1K32BF_INSN_L_MULDU
, OR1K32BF_SFMT_L_MULD
},
98 { OR1K_INSN_L_DIV
, OR1K32BF_INSN_L_DIV
, OR1K32BF_SFMT_L_DIV
},
99 { OR1K_INSN_L_DIVU
, OR1K32BF_INSN_L_DIVU
, OR1K32BF_SFMT_L_DIVU
},
100 { OR1K_INSN_L_FF1
, OR1K32BF_INSN_L_FF1
, OR1K32BF_SFMT_L_FF1
},
101 { OR1K_INSN_L_FL1
, OR1K32BF_INSN_L_FL1
, OR1K32BF_SFMT_L_FF1
},
102 { OR1K_INSN_L_ANDI
, OR1K32BF_INSN_L_ANDI
, OR1K32BF_SFMT_L_MFSPR
},
103 { OR1K_INSN_L_ORI
, OR1K32BF_INSN_L_ORI
, OR1K32BF_SFMT_L_MFSPR
},
104 { OR1K_INSN_L_XORI
, OR1K32BF_INSN_L_XORI
, OR1K32BF_SFMT_L_XORI
},
105 { OR1K_INSN_L_ADDI
, OR1K32BF_INSN_L_ADDI
, OR1K32BF_SFMT_L_ADDI
},
106 { OR1K_INSN_L_ADDIC
, OR1K32BF_INSN_L_ADDIC
, OR1K32BF_SFMT_L_ADDIC
},
107 { OR1K_INSN_L_MULI
, OR1K32BF_INSN_L_MULI
, OR1K32BF_SFMT_L_MULI
},
108 { OR1K_INSN_L_EXTHS
, OR1K32BF_INSN_L_EXTHS
, OR1K32BF_SFMT_L_EXTHS
},
109 { OR1K_INSN_L_EXTBS
, OR1K32BF_INSN_L_EXTBS
, OR1K32BF_SFMT_L_EXTHS
},
110 { OR1K_INSN_L_EXTHZ
, OR1K32BF_INSN_L_EXTHZ
, OR1K32BF_SFMT_L_EXTHS
},
111 { OR1K_INSN_L_EXTBZ
, OR1K32BF_INSN_L_EXTBZ
, OR1K32BF_SFMT_L_EXTHS
},
112 { OR1K_INSN_L_EXTWS
, OR1K32BF_INSN_L_EXTWS
, OR1K32BF_SFMT_L_EXTHS
},
113 { OR1K_INSN_L_EXTWZ
, OR1K32BF_INSN_L_EXTWZ
, OR1K32BF_SFMT_L_EXTHS
},
114 { OR1K_INSN_L_CMOV
, OR1K32BF_INSN_L_CMOV
, OR1K32BF_SFMT_L_CMOV
},
115 { OR1K_INSN_L_SFGTS
, OR1K32BF_INSN_L_SFGTS
, OR1K32BF_SFMT_L_SFGTS
},
116 { OR1K_INSN_L_SFGTSI
, OR1K32BF_INSN_L_SFGTSI
, OR1K32BF_SFMT_L_SFGTSI
},
117 { OR1K_INSN_L_SFGTU
, OR1K32BF_INSN_L_SFGTU
, OR1K32BF_SFMT_L_SFGTS
},
118 { OR1K_INSN_L_SFGTUI
, OR1K32BF_INSN_L_SFGTUI
, OR1K32BF_SFMT_L_SFGTSI
},
119 { OR1K_INSN_L_SFGES
, OR1K32BF_INSN_L_SFGES
, OR1K32BF_SFMT_L_SFGTS
},
120 { OR1K_INSN_L_SFGESI
, OR1K32BF_INSN_L_SFGESI
, OR1K32BF_SFMT_L_SFGTSI
},
121 { OR1K_INSN_L_SFGEU
, OR1K32BF_INSN_L_SFGEU
, OR1K32BF_SFMT_L_SFGTS
},
122 { OR1K_INSN_L_SFGEUI
, OR1K32BF_INSN_L_SFGEUI
, OR1K32BF_SFMT_L_SFGTSI
},
123 { OR1K_INSN_L_SFLTS
, OR1K32BF_INSN_L_SFLTS
, OR1K32BF_SFMT_L_SFGTS
},
124 { OR1K_INSN_L_SFLTSI
, OR1K32BF_INSN_L_SFLTSI
, OR1K32BF_SFMT_L_SFGTSI
},
125 { OR1K_INSN_L_SFLTU
, OR1K32BF_INSN_L_SFLTU
, OR1K32BF_SFMT_L_SFGTS
},
126 { OR1K_INSN_L_SFLTUI
, OR1K32BF_INSN_L_SFLTUI
, OR1K32BF_SFMT_L_SFGTSI
},
127 { OR1K_INSN_L_SFLES
, OR1K32BF_INSN_L_SFLES
, OR1K32BF_SFMT_L_SFGTS
},
128 { OR1K_INSN_L_SFLESI
, OR1K32BF_INSN_L_SFLESI
, OR1K32BF_SFMT_L_SFGTSI
},
129 { OR1K_INSN_L_SFLEU
, OR1K32BF_INSN_L_SFLEU
, OR1K32BF_SFMT_L_SFGTS
},
130 { OR1K_INSN_L_SFLEUI
, OR1K32BF_INSN_L_SFLEUI
, OR1K32BF_SFMT_L_SFGTSI
},
131 { OR1K_INSN_L_SFEQ
, OR1K32BF_INSN_L_SFEQ
, OR1K32BF_SFMT_L_SFGTS
},
132 { OR1K_INSN_L_SFEQI
, OR1K32BF_INSN_L_SFEQI
, OR1K32BF_SFMT_L_SFGTSI
},
133 { OR1K_INSN_L_SFNE
, OR1K32BF_INSN_L_SFNE
, OR1K32BF_SFMT_L_SFGTS
},
134 { OR1K_INSN_L_SFNEI
, OR1K32BF_INSN_L_SFNEI
, OR1K32BF_SFMT_L_SFGTSI
},
135 { OR1K_INSN_L_MAC
, OR1K32BF_INSN_L_MAC
, OR1K32BF_SFMT_L_MAC
},
136 { OR1K_INSN_L_MACI
, OR1K32BF_INSN_L_MACI
, OR1K32BF_SFMT_L_MACI
},
137 { OR1K_INSN_L_MACU
, OR1K32BF_INSN_L_MACU
, OR1K32BF_SFMT_L_MACU
},
138 { OR1K_INSN_L_MSB
, OR1K32BF_INSN_L_MSB
, OR1K32BF_SFMT_L_MAC
},
139 { OR1K_INSN_L_MSBU
, OR1K32BF_INSN_L_MSBU
, OR1K32BF_SFMT_L_MACU
},
140 { OR1K_INSN_L_CUST1
, OR1K32BF_INSN_L_CUST1
, OR1K32BF_SFMT_L_MSYNC
},
141 { OR1K_INSN_L_CUST2
, OR1K32BF_INSN_L_CUST2
, OR1K32BF_SFMT_L_MSYNC
},
142 { OR1K_INSN_L_CUST3
, OR1K32BF_INSN_L_CUST3
, OR1K32BF_SFMT_L_MSYNC
},
143 { OR1K_INSN_L_CUST4
, OR1K32BF_INSN_L_CUST4
, OR1K32BF_SFMT_L_MSYNC
},
144 { OR1K_INSN_L_CUST5
, OR1K32BF_INSN_L_CUST5
, OR1K32BF_SFMT_L_MSYNC
},
145 { OR1K_INSN_L_CUST6
, OR1K32BF_INSN_L_CUST6
, OR1K32BF_SFMT_L_MSYNC
},
146 { OR1K_INSN_L_CUST7
, OR1K32BF_INSN_L_CUST7
, OR1K32BF_SFMT_L_MSYNC
},
147 { OR1K_INSN_L_CUST8
, OR1K32BF_INSN_L_CUST8
, OR1K32BF_SFMT_L_MSYNC
},
148 { OR1K_INSN_LF_ADD_S
, OR1K32BF_INSN_LF_ADD_S
, OR1K32BF_SFMT_LF_ADD_S
},
149 { OR1K_INSN_LF_ADD_D32
, OR1K32BF_INSN_LF_ADD_D32
, OR1K32BF_SFMT_LF_ADD_D32
},
150 { OR1K_INSN_LF_SUB_S
, OR1K32BF_INSN_LF_SUB_S
, OR1K32BF_SFMT_LF_ADD_S
},
151 { OR1K_INSN_LF_SUB_D32
, OR1K32BF_INSN_LF_SUB_D32
, OR1K32BF_SFMT_LF_ADD_D32
},
152 { OR1K_INSN_LF_MUL_S
, OR1K32BF_INSN_LF_MUL_S
, OR1K32BF_SFMT_LF_ADD_S
},
153 { OR1K_INSN_LF_MUL_D32
, OR1K32BF_INSN_LF_MUL_D32
, OR1K32BF_SFMT_LF_ADD_D32
},
154 { OR1K_INSN_LF_DIV_S
, OR1K32BF_INSN_LF_DIV_S
, OR1K32BF_SFMT_LF_ADD_S
},
155 { OR1K_INSN_LF_DIV_D32
, OR1K32BF_INSN_LF_DIV_D32
, OR1K32BF_SFMT_LF_ADD_D32
},
156 { OR1K_INSN_LF_REM_S
, OR1K32BF_INSN_LF_REM_S
, OR1K32BF_SFMT_LF_ADD_S
},
157 { OR1K_INSN_LF_REM_D32
, OR1K32BF_INSN_LF_REM_D32
, OR1K32BF_SFMT_LF_ADD_D32
},
158 { OR1K_INSN_LF_ITOF_S
, OR1K32BF_INSN_LF_ITOF_S
, OR1K32BF_SFMT_LF_ITOF_S
},
159 { OR1K_INSN_LF_ITOF_D32
, OR1K32BF_INSN_LF_ITOF_D32
, OR1K32BF_SFMT_LF_ITOF_D32
},
160 { OR1K_INSN_LF_FTOI_S
, OR1K32BF_INSN_LF_FTOI_S
, OR1K32BF_SFMT_LF_FTOI_S
},
161 { OR1K_INSN_LF_FTOI_D32
, OR1K32BF_INSN_LF_FTOI_D32
, OR1K32BF_SFMT_LF_FTOI_D32
},
162 { OR1K_INSN_LF_SFEQ_S
, OR1K32BF_INSN_LF_SFEQ_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
163 { OR1K_INSN_LF_SFEQ_D32
, OR1K32BF_INSN_LF_SFEQ_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
164 { OR1K_INSN_LF_SFNE_S
, OR1K32BF_INSN_LF_SFNE_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
165 { OR1K_INSN_LF_SFNE_D32
, OR1K32BF_INSN_LF_SFNE_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
166 { OR1K_INSN_LF_SFGE_S
, OR1K32BF_INSN_LF_SFGE_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
167 { OR1K_INSN_LF_SFGE_D32
, OR1K32BF_INSN_LF_SFGE_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
168 { OR1K_INSN_LF_SFGT_S
, OR1K32BF_INSN_LF_SFGT_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
169 { OR1K_INSN_LF_SFGT_D32
, OR1K32BF_INSN_LF_SFGT_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
170 { OR1K_INSN_LF_SFLT_S
, OR1K32BF_INSN_LF_SFLT_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
171 { OR1K_INSN_LF_SFLT_D32
, OR1K32BF_INSN_LF_SFLT_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
172 { OR1K_INSN_LF_SFLE_S
, OR1K32BF_INSN_LF_SFLE_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
173 { OR1K_INSN_LF_SFLE_D32
, OR1K32BF_INSN_LF_SFLE_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
174 { OR1K_INSN_LF_SFUEQ_S
, OR1K32BF_INSN_LF_SFUEQ_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
175 { OR1K_INSN_LF_SFUEQ_D32
, OR1K32BF_INSN_LF_SFUEQ_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
176 { OR1K_INSN_LF_SFUNE_S
, OR1K32BF_INSN_LF_SFUNE_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
177 { OR1K_INSN_LF_SFUNE_D32
, OR1K32BF_INSN_LF_SFUNE_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
178 { OR1K_INSN_LF_SFUGT_S
, OR1K32BF_INSN_LF_SFUGT_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
179 { OR1K_INSN_LF_SFUGT_D32
, OR1K32BF_INSN_LF_SFUGT_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
180 { OR1K_INSN_LF_SFUGE_S
, OR1K32BF_INSN_LF_SFUGE_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
181 { OR1K_INSN_LF_SFUGE_D32
, OR1K32BF_INSN_LF_SFUGE_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
182 { OR1K_INSN_LF_SFULT_S
, OR1K32BF_INSN_LF_SFULT_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
183 { OR1K_INSN_LF_SFULT_D32
, OR1K32BF_INSN_LF_SFULT_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
184 { OR1K_INSN_LF_SFULE_S
, OR1K32BF_INSN_LF_SFULE_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
185 { OR1K_INSN_LF_SFULE_D32
, OR1K32BF_INSN_LF_SFULE_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
186 { OR1K_INSN_LF_SFUN_S
, OR1K32BF_INSN_LF_SFUN_S
, OR1K32BF_SFMT_LF_SFEQ_S
},
187 { OR1K_INSN_LF_SFUN_D32
, OR1K32BF_INSN_LF_SFUN_D32
, OR1K32BF_SFMT_LF_SFEQ_D32
},
188 { OR1K_INSN_LF_MADD_S
, OR1K32BF_INSN_LF_MADD_S
, OR1K32BF_SFMT_LF_MADD_S
},
189 { OR1K_INSN_LF_MADD_D32
, OR1K32BF_INSN_LF_MADD_D32
, OR1K32BF_SFMT_LF_MADD_D32
},
190 { OR1K_INSN_LF_CUST1_S
, OR1K32BF_INSN_LF_CUST1_S
, OR1K32BF_SFMT_L_MSYNC
},
191 { OR1K_INSN_LF_CUST1_D32
, OR1K32BF_INSN_LF_CUST1_D32
, OR1K32BF_SFMT_L_MSYNC
},
194 static const struct insn_sem or1k32bf_insn_sem_invalid
=
196 VIRTUAL_INSN_X_INVALID
, OR1K32BF_INSN_X_INVALID
, OR1K32BF_SFMT_EMPTY
199 /* Initialize an IDESC from the compile-time computable parts. */
202 init_idesc (SIM_CPU
*cpu
, IDESC
*id
, const struct insn_sem
*t
)
204 const CGEN_INSN
*insn_table
= CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu
))->init_entries
;
208 if ((int) t
->type
<= 0)
209 id
->idata
= & cgen_virtual_insn_table
[- (int) t
->type
];
211 id
->idata
= & insn_table
[t
->type
];
212 id
->attrs
= CGEN_INSN_ATTRS (id
->idata
);
213 /* Oh my god, a magic number. */
214 id
->length
= CGEN_INSN_BITSIZE (id
->idata
) / 8;
216 #if WITH_PROFILE_MODEL_P
217 id
->timing
= & MODEL_TIMING (CPU_MODEL (cpu
)) [t
->index
];
219 SIM_DESC sd
= CPU_STATE (cpu
);
220 SIM_ASSERT (t
->index
== id
->timing
->num
);
224 /* Semantic pointers are initialized elsewhere. */
227 /* Initialize the instruction descriptor table. */
230 or1k32bf_init_idesc_table (SIM_CPU
*cpu
)
233 const struct insn_sem
*t
,*tend
;
234 int tabsize
= OR1K32BF_INSN__MAX
;
235 IDESC
*table
= or1k32bf_insn_data
;
237 memset (table
, 0, tabsize
* sizeof (IDESC
));
239 /* First set all entries to the `invalid insn'. */
240 t
= & or1k32bf_insn_sem_invalid
;
241 for (id
= table
, tabend
= table
+ tabsize
; id
< tabend
; ++id
)
242 init_idesc (cpu
, id
, t
);
244 /* Now fill in the values for the chosen cpu. */
245 for (t
= or1k32bf_insn_sem
, tend
= t
+ ARRAY_SIZE (or1k32bf_insn_sem
);
248 init_idesc (cpu
, & table
[t
->index
], t
);
251 /* Link the IDESC table into the cpu. */
252 CPU_IDESC (cpu
) = table
;
255 /* Given an instruction, return a pointer to its IDESC entry. */
258 or1k32bf_decode (SIM_CPU
*current_cpu
, IADDR pc
,
259 CGEN_INSN_WORD base_insn
, CGEN_INSN_WORD entire_insn
,
262 /* Result of decoder. */
263 OR1K32BF_INSN_TYPE itype
;
266 CGEN_INSN_WORD insn
= base_insn
;
269 unsigned int val0
= (((insn
>> 21) & (63 << 5)) | ((insn
>> 0) & (31 << 0)));
303 case 31: itype
= OR1K32BF_INSN_L_J
; goto extract_sfmt_l_j
;
335 case 63: itype
= OR1K32BF_INSN_L_JAL
; goto extract_sfmt_l_jal
;
367 case 95: itype
= OR1K32BF_INSN_L_ADRP
; goto extract_sfmt_l_adrp
;
399 case 127: itype
= OR1K32BF_INSN_L_BNF
; goto extract_sfmt_l_bnf
;
431 case 159: itype
= OR1K32BF_INSN_L_BF
; goto extract_sfmt_l_bnf
;
464 if ((entire_insn
& 0xffff0000) == 0x15000000)
465 { itype
= OR1K32BF_INSN_L_NOP_IMM
; goto extract_sfmt_l_nop_imm
; }
466 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
469 unsigned int val1
= (((insn
>> 16) & (1 << 0)));
473 if ((entire_insn
& 0xfc1f0000) == 0x18000000)
474 { itype
= OR1K32BF_INSN_L_MOVHI
; goto extract_sfmt_l_movhi
; }
475 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
477 if ((entire_insn
& 0xfc1fffff) == 0x18010000)
478 { itype
= OR1K32BF_INSN_L_MACRC
; goto extract_sfmt_l_macrc
; }
479 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
480 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
514 if ((entire_insn
& 0xfc1f0000) == 0x18000000)
515 { itype
= OR1K32BF_INSN_L_MOVHI
; goto extract_sfmt_l_movhi
; }
516 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
519 unsigned int val1
= (((insn
>> 23) & (7 << 0)));
523 if ((entire_insn
& 0xffff0000) == 0x20000000)
524 { itype
= OR1K32BF_INSN_L_SYS
; goto extract_sfmt_l_trap
; }
525 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
527 if ((entire_insn
& 0xffff0000) == 0x21000000)
528 { itype
= OR1K32BF_INSN_L_TRAP
; goto extract_sfmt_l_trap
; }
529 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
531 if ((entire_insn
& 0xffffffff) == 0x22000000)
532 { itype
= OR1K32BF_INSN_L_MSYNC
; goto extract_sfmt_l_msync
; }
533 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
535 if ((entire_insn
& 0xffffffff) == 0x22800000)
536 { itype
= OR1K32BF_INSN_L_PSYNC
; goto extract_sfmt_l_msync
; }
537 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
539 if ((entire_insn
& 0xffffffff) == 0x23000000)
540 { itype
= OR1K32BF_INSN_L_CSYNC
; goto extract_sfmt_l_msync
; }
541 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
542 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
577 unsigned int val1
= (((insn
>> 24) & (1 << 0)));
581 if ((entire_insn
& 0xffff0000) == 0x20000000)
582 { itype
= OR1K32BF_INSN_L_SYS
; goto extract_sfmt_l_trap
; }
583 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
585 if ((entire_insn
& 0xffff0000) == 0x21000000)
586 { itype
= OR1K32BF_INSN_L_TRAP
; goto extract_sfmt_l_trap
; }
587 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
588 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
592 if ((entire_insn
& 0xffffffff) == 0x24000000)
593 { itype
= OR1K32BF_INSN_L_RFE
; goto extract_sfmt_l_msync
; }
594 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
596 if ((entire_insn
& 0xffff07ff) == 0x44000000)
597 { itype
= OR1K32BF_INSN_L_JR
; goto extract_sfmt_l_jr
; }
598 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
600 if ((entire_insn
& 0xffff07ff) == 0x48000000)
601 { itype
= OR1K32BF_INSN_L_JALR
; goto extract_sfmt_l_jalr
; }
602 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
635 if ((entire_insn
& 0xffe00000) == 0x4c000000)
636 { itype
= OR1K32BF_INSN_L_MACI
; goto extract_sfmt_l_maci
; }
637 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
669 case 895: itype
= OR1K32BF_INSN_L_LWA
; goto extract_sfmt_l_lwa
;
671 if ((entire_insn
& 0xffffffff) == 0x70000000)
672 { itype
= OR1K32BF_INSN_L_CUST1
; goto extract_sfmt_l_msync
; }
673 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
675 if ((entire_insn
& 0xffffffff) == 0x74000000)
676 { itype
= OR1K32BF_INSN_L_CUST2
; goto extract_sfmt_l_msync
; }
677 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
679 if ((entire_insn
& 0xffffffff) == 0x78000000)
680 { itype
= OR1K32BF_INSN_L_CUST3
; goto extract_sfmt_l_msync
; }
681 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
683 if ((entire_insn
& 0xffffffff) == 0x7c000000)
684 { itype
= OR1K32BF_INSN_L_CUST4
; goto extract_sfmt_l_msync
; }
685 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
717 case 1087: itype
= OR1K32BF_INSN_L_LWZ
; goto extract_sfmt_l_lwz
;
749 case 1119: itype
= OR1K32BF_INSN_L_LWS
; goto extract_sfmt_l_lws
;
781 case 1151: itype
= OR1K32BF_INSN_L_LBZ
; goto extract_sfmt_l_lbz
;
813 case 1183: itype
= OR1K32BF_INSN_L_LBS
; goto extract_sfmt_l_lbs
;
845 case 1215: itype
= OR1K32BF_INSN_L_LHZ
; goto extract_sfmt_l_lhz
;
877 case 1247: itype
= OR1K32BF_INSN_L_LHS
; goto extract_sfmt_l_lhs
;
909 case 1279: itype
= OR1K32BF_INSN_L_ADDI
; goto extract_sfmt_l_addi
;
941 case 1311: itype
= OR1K32BF_INSN_L_ADDIC
; goto extract_sfmt_l_addic
;
973 case 1343: itype
= OR1K32BF_INSN_L_ANDI
; goto extract_sfmt_l_mfspr
;
1005 case 1375: itype
= OR1K32BF_INSN_L_ORI
; goto extract_sfmt_l_mfspr
;
1037 case 1407: itype
= OR1K32BF_INSN_L_XORI
; goto extract_sfmt_l_xori
;
1069 case 1439: itype
= OR1K32BF_INSN_L_MULI
; goto extract_sfmt_l_muli
;
1101 case 1471: itype
= OR1K32BF_INSN_L_MFSPR
; goto extract_sfmt_l_mfspr
;
1135 unsigned int val1
= (((insn
>> 6) & (3 << 0)));
1139 if ((entire_insn
& 0xfc00ffc0) == 0xb8000000)
1140 { itype
= OR1K32BF_INSN_L_SLLI
; goto extract_sfmt_l_slli
; }
1141 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1143 if ((entire_insn
& 0xfc00ffc0) == 0xb8000040)
1144 { itype
= OR1K32BF_INSN_L_SRLI
; goto extract_sfmt_l_slli
; }
1145 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1147 if ((entire_insn
& 0xfc00ffc0) == 0xb8000080)
1148 { itype
= OR1K32BF_INSN_L_SRAI
; goto extract_sfmt_l_slli
; }
1149 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1151 if ((entire_insn
& 0xfc00ffc0) == 0xb80000c0)
1152 { itype
= OR1K32BF_INSN_L_RORI
; goto extract_sfmt_l_slli
; }
1153 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1154 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1190 unsigned int val1
= (((insn
>> 21) & (15 << 0)));
1194 if ((entire_insn
& 0xffe00000) == 0xbc000000)
1195 { itype
= OR1K32BF_INSN_L_SFEQI
; goto extract_sfmt_l_sfgtsi
; }
1196 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1198 if ((entire_insn
& 0xffe00000) == 0xbc200000)
1199 { itype
= OR1K32BF_INSN_L_SFNEI
; goto extract_sfmt_l_sfgtsi
; }
1200 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1202 if ((entire_insn
& 0xffe00000) == 0xbc400000)
1203 { itype
= OR1K32BF_INSN_L_SFGTUI
; goto extract_sfmt_l_sfgtsi
; }
1204 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1206 if ((entire_insn
& 0xffe00000) == 0xbc600000)
1207 { itype
= OR1K32BF_INSN_L_SFGEUI
; goto extract_sfmt_l_sfgtsi
; }
1208 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1210 if ((entire_insn
& 0xffe00000) == 0xbc800000)
1211 { itype
= OR1K32BF_INSN_L_SFLTUI
; goto extract_sfmt_l_sfgtsi
; }
1212 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1214 if ((entire_insn
& 0xffe00000) == 0xbca00000)
1215 { itype
= OR1K32BF_INSN_L_SFLEUI
; goto extract_sfmt_l_sfgtsi
; }
1216 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1218 if ((entire_insn
& 0xffe00000) == 0xbd400000)
1219 { itype
= OR1K32BF_INSN_L_SFGTSI
; goto extract_sfmt_l_sfgtsi
; }
1220 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1222 if ((entire_insn
& 0xffe00000) == 0xbd600000)
1223 { itype
= OR1K32BF_INSN_L_SFGESI
; goto extract_sfmt_l_sfgtsi
; }
1224 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1226 if ((entire_insn
& 0xffe00000) == 0xbd800000)
1227 { itype
= OR1K32BF_INSN_L_SFLTSI
; goto extract_sfmt_l_sfgtsi
; }
1228 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1230 if ((entire_insn
& 0xffe00000) == 0xbda00000)
1231 { itype
= OR1K32BF_INSN_L_SFLESI
; goto extract_sfmt_l_sfgtsi
; }
1232 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1233 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1267 case 1567: itype
= OR1K32BF_INSN_L_MTSPR
; goto extract_sfmt_l_mtspr
;
1269 if ((entire_insn
& 0xffe007ff) == 0xc4000001)
1270 { itype
= OR1K32BF_INSN_L_MAC
; goto extract_sfmt_l_mac
; }
1271 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1273 if ((entire_insn
& 0xffe007ff) == 0xc4000002)
1274 { itype
= OR1K32BF_INSN_L_MSB
; goto extract_sfmt_l_mac
; }
1275 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1277 if ((entire_insn
& 0xffe007ff) == 0xc4000003)
1278 { itype
= OR1K32BF_INSN_L_MACU
; goto extract_sfmt_l_macu
; }
1279 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1281 if ((entire_insn
& 0xffe007ff) == 0xc4000004)
1282 { itype
= OR1K32BF_INSN_L_MSBU
; goto extract_sfmt_l_macu
; }
1283 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1286 unsigned int val1
= (((insn
>> 5) & (7 << 0)));
1290 if ((entire_insn
& 0xfc0007ff) == 0xc8000000)
1291 { itype
= OR1K32BF_INSN_LF_ADD_S
; goto extract_sfmt_lf_add_s
; }
1292 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1294 if ((entire_insn
& 0xffe004ff) == 0xc80000e0)
1295 { itype
= OR1K32BF_INSN_LF_CUST1_D32
; goto extract_sfmt_l_msync
; }
1296 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1297 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1301 if ((entire_insn
& 0xfc0007ff) == 0xc8000001)
1302 { itype
= OR1K32BF_INSN_LF_SUB_S
; goto extract_sfmt_lf_add_s
; }
1303 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1305 if ((entire_insn
& 0xfc0007ff) == 0xc8000002)
1306 { itype
= OR1K32BF_INSN_LF_MUL_S
; goto extract_sfmt_lf_add_s
; }
1307 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1309 if ((entire_insn
& 0xfc0007ff) == 0xc8000003)
1310 { itype
= OR1K32BF_INSN_LF_DIV_S
; goto extract_sfmt_lf_add_s
; }
1311 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1313 if ((entire_insn
& 0xfc00ffff) == 0xc8000004)
1314 { itype
= OR1K32BF_INSN_LF_ITOF_S
; goto extract_sfmt_lf_itof_s
; }
1315 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1317 if ((entire_insn
& 0xfc00ffff) == 0xc8000005)
1318 { itype
= OR1K32BF_INSN_LF_FTOI_S
; goto extract_sfmt_lf_ftoi_s
; }
1319 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1321 if ((entire_insn
& 0xfc0007ff) == 0xc8000006)
1322 { itype
= OR1K32BF_INSN_LF_REM_S
; goto extract_sfmt_lf_add_s
; }
1323 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1325 if ((entire_insn
& 0xfc0007ff) == 0xc8000007)
1326 { itype
= OR1K32BF_INSN_LF_MADD_S
; goto extract_sfmt_lf_madd_s
; }
1327 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1330 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1334 if ((entire_insn
& 0xffe007ff) == 0xc8000008)
1335 { itype
= OR1K32BF_INSN_LF_SFEQ_S
; goto extract_sfmt_lf_sfeq_s
; }
1336 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1338 if ((entire_insn
& 0xffe007ff) == 0xc8000028)
1339 { itype
= OR1K32BF_INSN_LF_SFUEQ_S
; goto extract_sfmt_lf_sfeq_s
; }
1340 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1341 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1346 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1350 if ((entire_insn
& 0xffe007ff) == 0xc8000009)
1351 { itype
= OR1K32BF_INSN_LF_SFNE_S
; goto extract_sfmt_lf_sfeq_s
; }
1352 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1354 if ((entire_insn
& 0xffe007ff) == 0xc8000029)
1355 { itype
= OR1K32BF_INSN_LF_SFUNE_S
; goto extract_sfmt_lf_sfeq_s
; }
1356 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1357 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1362 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1366 if ((entire_insn
& 0xffe007ff) == 0xc800000a)
1367 { itype
= OR1K32BF_INSN_LF_SFGT_S
; goto extract_sfmt_lf_sfeq_s
; }
1368 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1370 if ((entire_insn
& 0xffe007ff) == 0xc800002a)
1371 { itype
= OR1K32BF_INSN_LF_SFUGT_S
; goto extract_sfmt_lf_sfeq_s
; }
1372 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1373 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1378 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1382 if ((entire_insn
& 0xffe007ff) == 0xc800000b)
1383 { itype
= OR1K32BF_INSN_LF_SFGE_S
; goto extract_sfmt_lf_sfeq_s
; }
1384 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1386 if ((entire_insn
& 0xffe007ff) == 0xc800002b)
1387 { itype
= OR1K32BF_INSN_LF_SFUGE_S
; goto extract_sfmt_lf_sfeq_s
; }
1388 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1389 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1394 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1398 if ((entire_insn
& 0xffe007ff) == 0xc800000c)
1399 { itype
= OR1K32BF_INSN_LF_SFLT_S
; goto extract_sfmt_lf_sfeq_s
; }
1400 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1402 if ((entire_insn
& 0xffe007ff) == 0xc800002c)
1403 { itype
= OR1K32BF_INSN_LF_SFULT_S
; goto extract_sfmt_lf_sfeq_s
; }
1404 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1405 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1410 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1414 if ((entire_insn
& 0xffe007ff) == 0xc800000d)
1415 { itype
= OR1K32BF_INSN_LF_SFLE_S
; goto extract_sfmt_lf_sfeq_s
; }
1416 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1418 if ((entire_insn
& 0xffe007ff) == 0xc800002d)
1419 { itype
= OR1K32BF_INSN_LF_SFULE_S
; goto extract_sfmt_lf_sfeq_s
; }
1420 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1421 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1425 if ((entire_insn
& 0xffe007ff) == 0xc800002e)
1426 { itype
= OR1K32BF_INSN_LF_SFUN_S
; goto extract_sfmt_lf_sfeq_s
; }
1427 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1430 unsigned int val1
= (((insn
>> 6) & (3 << 0)));
1434 if ((entire_insn
& 0xfc0000ff) == 0xc8000010)
1435 { itype
= OR1K32BF_INSN_LF_ADD_D32
; goto extract_sfmt_lf_add_d32
; }
1436 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1438 if ((entire_insn
& 0xffe007ff) == 0xc80000d0)
1439 { itype
= OR1K32BF_INSN_LF_CUST1_S
; goto extract_sfmt_l_msync
; }
1440 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1441 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1445 if ((entire_insn
& 0xfc0000ff) == 0xc8000011)
1446 { itype
= OR1K32BF_INSN_LF_SUB_D32
; goto extract_sfmt_lf_add_d32
; }
1447 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1449 if ((entire_insn
& 0xfc0000ff) == 0xc8000012)
1450 { itype
= OR1K32BF_INSN_LF_MUL_D32
; goto extract_sfmt_lf_add_d32
; }
1451 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1453 if ((entire_insn
& 0xfc0000ff) == 0xc8000013)
1454 { itype
= OR1K32BF_INSN_LF_DIV_D32
; goto extract_sfmt_lf_add_d32
; }
1455 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1457 if ((entire_insn
& 0xfc00f9ff) == 0xc8000014)
1458 { itype
= OR1K32BF_INSN_LF_ITOF_D32
; goto extract_sfmt_lf_itof_d32
; }
1459 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1461 if ((entire_insn
& 0xfc00f9ff) == 0xc8000015)
1462 { itype
= OR1K32BF_INSN_LF_FTOI_D32
; goto extract_sfmt_lf_ftoi_d32
; }
1463 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1465 if ((entire_insn
& 0xfc0000ff) == 0xc8000016)
1466 { itype
= OR1K32BF_INSN_LF_REM_D32
; goto extract_sfmt_lf_add_d32
; }
1467 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1469 if ((entire_insn
& 0xfc0000ff) == 0xc8000017)
1470 { itype
= OR1K32BF_INSN_LF_MADD_D32
; goto extract_sfmt_lf_madd_d32
; }
1471 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1474 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1478 if ((entire_insn
& 0xffe004ff) == 0xc8000018)
1479 { itype
= OR1K32BF_INSN_LF_SFEQ_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1480 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1482 if ((entire_insn
& 0xffe004ff) == 0xc8000038)
1483 { itype
= OR1K32BF_INSN_LF_SFUEQ_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1484 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1485 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1490 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1494 if ((entire_insn
& 0xffe004ff) == 0xc8000019)
1495 { itype
= OR1K32BF_INSN_LF_SFNE_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1496 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1498 if ((entire_insn
& 0xffe004ff) == 0xc8000039)
1499 { itype
= OR1K32BF_INSN_LF_SFUNE_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1500 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1501 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1506 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1510 if ((entire_insn
& 0xffe004ff) == 0xc800001a)
1511 { itype
= OR1K32BF_INSN_LF_SFGT_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1512 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1514 if ((entire_insn
& 0xffe004ff) == 0xc800003a)
1515 { itype
= OR1K32BF_INSN_LF_SFUGT_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1516 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1517 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1522 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1526 if ((entire_insn
& 0xffe004ff) == 0xc800001b)
1527 { itype
= OR1K32BF_INSN_LF_SFGE_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1528 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1530 if ((entire_insn
& 0xffe004ff) == 0xc800003b)
1531 { itype
= OR1K32BF_INSN_LF_SFUGE_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1532 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1533 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1538 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1542 if ((entire_insn
& 0xffe004ff) == 0xc800001c)
1543 { itype
= OR1K32BF_INSN_LF_SFLT_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1544 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1546 if ((entire_insn
& 0xffe004ff) == 0xc800003c)
1547 { itype
= OR1K32BF_INSN_LF_SFULT_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1548 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1549 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1554 unsigned int val1
= (((insn
>> 5) & (1 << 0)));
1558 if ((entire_insn
& 0xffe004ff) == 0xc800001d)
1559 { itype
= OR1K32BF_INSN_LF_SFLE_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1560 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1562 if ((entire_insn
& 0xffe004ff) == 0xc800003d)
1563 { itype
= OR1K32BF_INSN_LF_SFULE_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1564 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1565 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1569 if ((entire_insn
& 0xffe004ff) == 0xc800003e)
1570 { itype
= OR1K32BF_INSN_LF_SFUN_D32
; goto extract_sfmt_lf_sfeq_d32
; }
1571 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1603 case 1663: itype
= OR1K32BF_INSN_L_SWA
; goto extract_sfmt_l_swa
;
1635 case 1727: itype
= OR1K32BF_INSN_L_SW
; goto extract_sfmt_l_sw
;
1667 case 1759: itype
= OR1K32BF_INSN_L_SB
; goto extract_sfmt_l_sb
;
1699 case 1791: itype
= OR1K32BF_INSN_L_SH
; goto extract_sfmt_l_sh
;
1701 if ((entire_insn
& 0xfc0007ff) == 0xe0000000)
1702 { itype
= OR1K32BF_INSN_L_ADD
; goto extract_sfmt_l_add
; }
1703 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1705 if ((entire_insn
& 0xfc0007ff) == 0xe0000001)
1706 { itype
= OR1K32BF_INSN_L_ADDC
; goto extract_sfmt_l_addc
; }
1707 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1709 if ((entire_insn
& 0xfc0007ff) == 0xe0000002)
1710 { itype
= OR1K32BF_INSN_L_SUB
; goto extract_sfmt_l_add
; }
1711 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1713 if ((entire_insn
& 0xfc0007ff) == 0xe0000003)
1714 { itype
= OR1K32BF_INSN_L_AND
; goto extract_sfmt_l_and
; }
1715 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1717 if ((entire_insn
& 0xfc0007ff) == 0xe0000004)
1718 { itype
= OR1K32BF_INSN_L_OR
; goto extract_sfmt_l_and
; }
1719 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1721 if ((entire_insn
& 0xfc0007ff) == 0xe0000005)
1722 { itype
= OR1K32BF_INSN_L_XOR
; goto extract_sfmt_l_and
; }
1723 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1725 if ((entire_insn
& 0xfc0007ff) == 0xe0000306)
1726 { itype
= OR1K32BF_INSN_L_MUL
; goto extract_sfmt_l_mul
; }
1727 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1729 if ((entire_insn
& 0xffe007ff) == 0xe0000307)
1730 { itype
= OR1K32BF_INSN_L_MULD
; goto extract_sfmt_l_muld
; }
1731 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1734 unsigned int val1
= (((insn
>> 6) & (3 << 0)));
1738 if ((entire_insn
& 0xfc0007ff) == 0xe0000008)
1739 { itype
= OR1K32BF_INSN_L_SLL
; goto extract_sfmt_l_sll
; }
1740 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1742 if ((entire_insn
& 0xfc0007ff) == 0xe0000048)
1743 { itype
= OR1K32BF_INSN_L_SRL
; goto extract_sfmt_l_sll
; }
1744 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1746 if ((entire_insn
& 0xfc0007ff) == 0xe0000088)
1747 { itype
= OR1K32BF_INSN_L_SRA
; goto extract_sfmt_l_sll
; }
1748 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1750 if ((entire_insn
& 0xfc0007ff) == 0xe00000c8)
1751 { itype
= OR1K32BF_INSN_L_ROR
; goto extract_sfmt_l_sll
; }
1752 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1753 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1757 if ((entire_insn
& 0xfc0007ff) == 0xe0000309)
1758 { itype
= OR1K32BF_INSN_L_DIV
; goto extract_sfmt_l_div
; }
1759 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1761 if ((entire_insn
& 0xfc0007ff) == 0xe000030a)
1762 { itype
= OR1K32BF_INSN_L_DIVU
; goto extract_sfmt_l_divu
; }
1763 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1765 if ((entire_insn
& 0xfc0007ff) == 0xe000030b)
1766 { itype
= OR1K32BF_INSN_L_MULU
; goto extract_sfmt_l_mulu
; }
1767 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1770 unsigned int val1
= (((insn
>> 6) & (3 << 0)));
1774 if ((entire_insn
& 0xfc00ffff) == 0xe000000c)
1775 { itype
= OR1K32BF_INSN_L_EXTHS
; goto extract_sfmt_l_exths
; }
1776 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1778 if ((entire_insn
& 0xfc00ffff) == 0xe000004c)
1779 { itype
= OR1K32BF_INSN_L_EXTBS
; goto extract_sfmt_l_exths
; }
1780 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1782 if ((entire_insn
& 0xfc00ffff) == 0xe000008c)
1783 { itype
= OR1K32BF_INSN_L_EXTHZ
; goto extract_sfmt_l_exths
; }
1784 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1786 if ((entire_insn
& 0xfc00ffff) == 0xe00000cc)
1787 { itype
= OR1K32BF_INSN_L_EXTBZ
; goto extract_sfmt_l_exths
; }
1788 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1789 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1794 unsigned int val1
= (((insn
>> 7) & (3 << 1)) | ((insn
>> 6) & (1 << 0)));
1798 if ((entire_insn
& 0xfc00ffff) == 0xe000000d)
1799 { itype
= OR1K32BF_INSN_L_EXTWS
; goto extract_sfmt_l_exths
; }
1800 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1802 if ((entire_insn
& 0xfc00ffff) == 0xe000004d)
1803 { itype
= OR1K32BF_INSN_L_EXTWZ
; goto extract_sfmt_l_exths
; }
1804 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1806 if ((entire_insn
& 0xffe007ff) == 0xe000030d)
1807 { itype
= OR1K32BF_INSN_L_MULDU
; goto extract_sfmt_l_muld
; }
1808 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1809 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1813 if ((entire_insn
& 0xfc0007ff) == 0xe000000e)
1814 { itype
= OR1K32BF_INSN_L_CMOV
; goto extract_sfmt_l_cmov
; }
1815 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1818 unsigned int val1
= (((insn
>> 8) & (1 << 0)));
1822 if ((entire_insn
& 0xfc0007ff) == 0xe000000f)
1823 { itype
= OR1K32BF_INSN_L_FF1
; goto extract_sfmt_l_ff1
; }
1824 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1826 if ((entire_insn
& 0xfc0007ff) == 0xe000010f)
1827 { itype
= OR1K32BF_INSN_L_FL1
; goto extract_sfmt_l_ff1
; }
1828 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1829 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1834 unsigned int val1
= (((insn
>> 21) & (15 << 0)));
1838 if ((entire_insn
& 0xffe007ff) == 0xe4000000)
1839 { itype
= OR1K32BF_INSN_L_SFEQ
; goto extract_sfmt_l_sfgts
; }
1840 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1842 if ((entire_insn
& 0xffe007ff) == 0xe4200000)
1843 { itype
= OR1K32BF_INSN_L_SFNE
; goto extract_sfmt_l_sfgts
; }
1844 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1846 if ((entire_insn
& 0xffe007ff) == 0xe4400000)
1847 { itype
= OR1K32BF_INSN_L_SFGTU
; goto extract_sfmt_l_sfgts
; }
1848 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1850 if ((entire_insn
& 0xffe007ff) == 0xe4600000)
1851 { itype
= OR1K32BF_INSN_L_SFGEU
; goto extract_sfmt_l_sfgts
; }
1852 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1854 if ((entire_insn
& 0xffe007ff) == 0xe4800000)
1855 { itype
= OR1K32BF_INSN_L_SFLTU
; goto extract_sfmt_l_sfgts
; }
1856 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1858 if ((entire_insn
& 0xffe007ff) == 0xe4a00000)
1859 { itype
= OR1K32BF_INSN_L_SFLEU
; goto extract_sfmt_l_sfgts
; }
1860 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1862 if ((entire_insn
& 0xffe007ff) == 0xe5400000)
1863 { itype
= OR1K32BF_INSN_L_SFGTS
; goto extract_sfmt_l_sfgts
; }
1864 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1866 if ((entire_insn
& 0xffe007ff) == 0xe5600000)
1867 { itype
= OR1K32BF_INSN_L_SFGES
; goto extract_sfmt_l_sfgts
; }
1868 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1870 if ((entire_insn
& 0xffe007ff) == 0xe5800000)
1871 { itype
= OR1K32BF_INSN_L_SFLTS
; goto extract_sfmt_l_sfgts
; }
1872 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1874 if ((entire_insn
& 0xffe007ff) == 0xe5a00000)
1875 { itype
= OR1K32BF_INSN_L_SFLES
; goto extract_sfmt_l_sfgts
; }
1876 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1877 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1881 if ((entire_insn
& 0xffffffff) == 0xf0000000)
1882 { itype
= OR1K32BF_INSN_L_CUST5
; goto extract_sfmt_l_msync
; }
1883 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1885 if ((entire_insn
& 0xffffffff) == 0xf4000000)
1886 { itype
= OR1K32BF_INSN_L_CUST6
; goto extract_sfmt_l_msync
; }
1887 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1889 if ((entire_insn
& 0xffffffff) == 0xf8000000)
1890 { itype
= OR1K32BF_INSN_L_CUST7
; goto extract_sfmt_l_msync
; }
1891 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1893 if ((entire_insn
& 0xffffffff) == 0xfc000000)
1894 { itype
= OR1K32BF_INSN_L_CUST8
; goto extract_sfmt_l_msync
; }
1895 itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1896 default: itype
= OR1K32BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
1901 /* The instruction has been decoded, now extract the fields. */
1905 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
1906 #define FLD(f) abuf->fields.sfmt_empty.f
1909 /* Record the fields for the semantic handler. */
1910 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_empty", (char *) 0));
1918 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
1919 CGEN_INSN_WORD insn
= entire_insn
;
1920 #define FLD(f) abuf->fields.sfmt_l_j.f
1923 f_disp26
= ((((EXTRACT_LSB0_SINT (insn
, 32, 25, 26)) * (4))) + (pc
));
1925 /* Record the fields for the semantic handler. */
1926 FLD (i_disp26
) = f_disp26
;
1927 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_j", "disp26 0x%x", 'x', f_disp26
, (char *) 0));
1933 extract_sfmt_l_adrp
:
1935 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
1936 CGEN_INSN_WORD insn
= entire_insn
;
1937 #define FLD(f) abuf->fields.sfmt_l_adrp.f
1941 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1942 f_disp21
= ((((EXTRACT_LSB0_SINT (insn
, 32, 20, 21)) + (((SI
) (pc
) >> (13))))) * (8192));
1944 /* Record the fields for the semantic handler. */
1946 FLD (i_disp21
) = f_disp21
;
1947 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_adrp", "f_r1 0x%x", 'x', f_r1
, "disp21 0x%x", 'x', f_disp21
, (char *) 0));
1955 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
1956 CGEN_INSN_WORD insn
= entire_insn
;
1957 #define FLD(f) abuf->fields.sfmt_l_j.f
1960 f_disp26
= ((((EXTRACT_LSB0_SINT (insn
, 32, 25, 26)) * (4))) + (pc
));
1962 /* Record the fields for the semantic handler. */
1963 FLD (i_disp26
) = f_disp26
;
1964 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_jal", "disp26 0x%x", 'x', f_disp26
, (char *) 0));
1972 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
1973 CGEN_INSN_WORD insn
= entire_insn
;
1974 #define FLD(f) abuf->fields.sfmt_l_sll.f
1977 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1979 /* Record the fields for the semantic handler. */
1981 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_jr", "f_r3 0x%x", 'x', f_r3
, (char *) 0));
1987 extract_sfmt_l_jalr
:
1989 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
1990 CGEN_INSN_WORD insn
= entire_insn
;
1991 #define FLD(f) abuf->fields.sfmt_l_sll.f
1994 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1996 /* Record the fields for the semantic handler. */
1998 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_jalr", "f_r3 0x%x", 'x', f_r3
, (char *) 0));
2006 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2007 CGEN_INSN_WORD insn
= entire_insn
;
2008 #define FLD(f) abuf->fields.sfmt_l_j.f
2011 f_disp26
= ((((EXTRACT_LSB0_SINT (insn
, 32, 25, 26)) * (4))) + (pc
));
2013 /* Record the fields for the semantic handler. */
2014 FLD (i_disp26
) = f_disp26
;
2015 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_bnf", "disp26 0x%x", 'x', f_disp26
, (char *) 0));
2021 extract_sfmt_l_trap
:
2023 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2024 #define FLD(f) abuf->fields.sfmt_empty.f
2027 /* Record the fields for the semantic handler. */
2028 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_trap", (char *) 0));
2034 extract_sfmt_l_msync
:
2036 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2037 #define FLD(f) abuf->fields.sfmt_empty.f
2040 /* Record the fields for the semantic handler. */
2041 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_msync", (char *) 0));
2047 extract_sfmt_l_nop_imm
:
2049 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2050 CGEN_INSN_WORD insn
= entire_insn
;
2051 #define FLD(f) abuf->fields.sfmt_l_mfspr.f
2054 f_uimm16
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
2056 /* Record the fields for the semantic handler. */
2057 FLD (f_uimm16
) = f_uimm16
;
2058 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_nop_imm", "f_uimm16 0x%x", 'x', f_uimm16
, (char *) 0));
2064 extract_sfmt_l_movhi
:
2066 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2067 CGEN_INSN_WORD insn
= entire_insn
;
2068 #define FLD(f) abuf->fields.sfmt_l_mfspr.f
2072 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2073 f_uimm16
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
2075 /* Record the fields for the semantic handler. */
2076 FLD (f_uimm16
) = f_uimm16
;
2078 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_movhi", "f_uimm16 0x%x", 'x', f_uimm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2084 extract_sfmt_l_macrc
:
2086 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2087 CGEN_INSN_WORD insn
= entire_insn
;
2088 #define FLD(f) abuf->fields.sfmt_l_adrp.f
2091 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2093 /* Record the fields for the semantic handler. */
2095 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_macrc", "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2101 extract_sfmt_l_mfspr
:
2103 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2104 CGEN_INSN_WORD insn
= entire_insn
;
2105 #define FLD(f) abuf->fields.sfmt_l_mfspr.f
2110 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2111 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2112 f_uimm16
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
2114 /* Record the fields for the semantic handler. */
2116 FLD (f_uimm16
) = f_uimm16
;
2118 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_mfspr", "f_r2 0x%x", 'x', f_r2
, "f_uimm16 0x%x", 'x', f_uimm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2124 extract_sfmt_l_mtspr
:
2126 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2127 CGEN_INSN_WORD insn
= entire_insn
;
2128 #define FLD(f) abuf->fields.sfmt_l_mtspr.f
2133 UINT f_uimm16_split
;
2135 f_imm16_25_5
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2136 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2137 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2138 f_imm16_10_11
= EXTRACT_LSB0_UINT (insn
, 32, 10, 11);
2139 f_uimm16_split
= ((UHI
) (UINT
) (((((f_imm16_25_5
) << (11))) | (f_imm16_10_11
))));
2141 /* Record the fields for the semantic handler. */
2144 FLD (f_uimm16_split
) = f_uimm16_split
;
2145 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_mtspr", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_uimm16_split 0x%x", 'x', f_uimm16_split
, (char *) 0));
2153 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2154 CGEN_INSN_WORD insn
= entire_insn
;
2155 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2160 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2161 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2162 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2164 /* Record the fields for the semantic handler. */
2166 FLD (f_simm16
) = f_simm16
;
2168 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lwz", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2176 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2177 CGEN_INSN_WORD insn
= entire_insn
;
2178 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2183 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2184 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2185 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2187 /* Record the fields for the semantic handler. */
2189 FLD (f_simm16
) = f_simm16
;
2191 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lws", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2199 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2200 CGEN_INSN_WORD insn
= entire_insn
;
2201 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2206 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2207 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2208 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2210 /* Record the fields for the semantic handler. */
2212 FLD (f_simm16
) = f_simm16
;
2214 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lwa", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2222 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2223 CGEN_INSN_WORD insn
= entire_insn
;
2224 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2229 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2230 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2231 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2233 /* Record the fields for the semantic handler. */
2235 FLD (f_simm16
) = f_simm16
;
2237 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lbz", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2245 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2246 CGEN_INSN_WORD insn
= entire_insn
;
2247 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2252 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2253 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2254 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2256 /* Record the fields for the semantic handler. */
2258 FLD (f_simm16
) = f_simm16
;
2260 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lbs", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2268 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2269 CGEN_INSN_WORD insn
= entire_insn
;
2270 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2275 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2276 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2277 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2279 /* Record the fields for the semantic handler. */
2281 FLD (f_simm16
) = f_simm16
;
2283 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lhz", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2291 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2292 CGEN_INSN_WORD insn
= entire_insn
;
2293 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2298 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2299 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2300 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2302 /* Record the fields for the semantic handler. */
2304 FLD (f_simm16
) = f_simm16
;
2306 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_lhs", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2314 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2315 CGEN_INSN_WORD insn
= entire_insn
;
2316 #define FLD(f) abuf->fields.sfmt_l_sw.f
2323 f_imm16_25_5
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2324 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2325 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2326 f_imm16_10_11
= EXTRACT_LSB0_UINT (insn
, 32, 10, 11);
2327 f_simm16_split
= ((HI
) (UINT
) (((((f_imm16_25_5
) << (11))) | (f_imm16_10_11
))));
2329 /* Record the fields for the semantic handler. */
2332 FLD (f_simm16_split
) = f_simm16_split
;
2333 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_sw", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_simm16_split 0x%x", 'x', f_simm16_split
, (char *) 0));
2341 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2342 CGEN_INSN_WORD insn
= entire_insn
;
2343 #define FLD(f) abuf->fields.sfmt_l_sw.f
2350 f_imm16_25_5
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2351 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2352 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2353 f_imm16_10_11
= EXTRACT_LSB0_UINT (insn
, 32, 10, 11);
2354 f_simm16_split
= ((HI
) (UINT
) (((((f_imm16_25_5
) << (11))) | (f_imm16_10_11
))));
2356 /* Record the fields for the semantic handler. */
2359 FLD (f_simm16_split
) = f_simm16_split
;
2360 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_sb", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_simm16_split 0x%x", 'x', f_simm16_split
, (char *) 0));
2368 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2369 CGEN_INSN_WORD insn
= entire_insn
;
2370 #define FLD(f) abuf->fields.sfmt_l_sw.f
2377 f_imm16_25_5
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2378 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2379 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2380 f_imm16_10_11
= EXTRACT_LSB0_UINT (insn
, 32, 10, 11);
2381 f_simm16_split
= ((HI
) (UINT
) (((((f_imm16_25_5
) << (11))) | (f_imm16_10_11
))));
2383 /* Record the fields for the semantic handler. */
2386 FLD (f_simm16_split
) = f_simm16_split
;
2387 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_sh", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_simm16_split 0x%x", 'x', f_simm16_split
, (char *) 0));
2395 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2396 CGEN_INSN_WORD insn
= entire_insn
;
2397 #define FLD(f) abuf->fields.sfmt_l_sw.f
2404 f_imm16_25_5
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2405 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2406 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2407 f_imm16_10_11
= EXTRACT_LSB0_UINT (insn
, 32, 10, 11);
2408 f_simm16_split
= ((HI
) (UINT
) (((((f_imm16_25_5
) << (11))) | (f_imm16_10_11
))));
2410 /* Record the fields for the semantic handler. */
2413 FLD (f_simm16_split
) = f_simm16_split
;
2414 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_swa", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_simm16_split 0x%x", 'x', f_simm16_split
, (char *) 0));
2422 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2423 CGEN_INSN_WORD insn
= entire_insn
;
2424 #define FLD(f) abuf->fields.sfmt_l_sll.f
2429 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2430 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2431 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2433 /* Record the fields for the semantic handler. */
2437 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_sll", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2443 extract_sfmt_l_slli
:
2445 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2446 CGEN_INSN_WORD insn
= entire_insn
;
2447 #define FLD(f) abuf->fields.sfmt_l_slli.f
2452 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2453 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2454 f_uimm6
= EXTRACT_LSB0_UINT (insn
, 32, 5, 6);
2456 /* Record the fields for the semantic handler. */
2458 FLD (f_uimm6
) = f_uimm6
;
2460 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_slli", "f_r2 0x%x", 'x', f_r2
, "f_uimm6 0x%x", 'x', f_uimm6
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2468 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2469 CGEN_INSN_WORD insn
= entire_insn
;
2470 #define FLD(f) abuf->fields.sfmt_l_sll.f
2475 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2476 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2477 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2479 /* Record the fields for the semantic handler. */
2483 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_and", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2491 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2492 CGEN_INSN_WORD insn
= entire_insn
;
2493 #define FLD(f) abuf->fields.sfmt_l_sll.f
2498 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2499 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2500 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2502 /* Record the fields for the semantic handler. */
2506 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_add", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2512 extract_sfmt_l_addc
:
2514 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2515 CGEN_INSN_WORD insn
= entire_insn
;
2516 #define FLD(f) abuf->fields.sfmt_l_sll.f
2521 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2522 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2523 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2525 /* Record the fields for the semantic handler. */
2529 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_addc", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2537 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2538 CGEN_INSN_WORD insn
= entire_insn
;
2539 #define FLD(f) abuf->fields.sfmt_l_sll.f
2544 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2545 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2546 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2548 /* Record the fields for the semantic handler. */
2552 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_mul", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2558 extract_sfmt_l_muld
:
2560 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2561 CGEN_INSN_WORD insn
= entire_insn
;
2562 #define FLD(f) abuf->fields.sfmt_l_sll.f
2566 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2567 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2569 /* Record the fields for the semantic handler. */
2572 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_muld", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, (char *) 0));
2578 extract_sfmt_l_mulu
:
2580 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2581 CGEN_INSN_WORD insn
= entire_insn
;
2582 #define FLD(f) abuf->fields.sfmt_l_sll.f
2587 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2588 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2589 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2591 /* Record the fields for the semantic handler. */
2595 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_mulu", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2603 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2604 CGEN_INSN_WORD insn
= entire_insn
;
2605 #define FLD(f) abuf->fields.sfmt_l_sll.f
2610 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2611 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2612 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2614 /* Record the fields for the semantic handler. */
2618 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_div", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2624 extract_sfmt_l_divu
:
2626 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2627 CGEN_INSN_WORD insn
= entire_insn
;
2628 #define FLD(f) abuf->fields.sfmt_l_sll.f
2633 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2634 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2635 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2637 /* Record the fields for the semantic handler. */
2641 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_divu", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2649 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2650 CGEN_INSN_WORD insn
= entire_insn
;
2651 #define FLD(f) abuf->fields.sfmt_l_slli.f
2655 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2656 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2658 /* Record the fields for the semantic handler. */
2661 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_ff1", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2667 extract_sfmt_l_xori
:
2669 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2670 CGEN_INSN_WORD insn
= entire_insn
;
2671 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2676 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2677 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2678 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2680 /* Record the fields for the semantic handler. */
2682 FLD (f_simm16
) = f_simm16
;
2684 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_xori", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2690 extract_sfmt_l_addi
:
2692 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2693 CGEN_INSN_WORD insn
= entire_insn
;
2694 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2699 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2700 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2701 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2703 /* Record the fields for the semantic handler. */
2705 FLD (f_simm16
) = f_simm16
;
2707 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_addi", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2713 extract_sfmt_l_addic
:
2715 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2716 CGEN_INSN_WORD insn
= entire_insn
;
2717 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2722 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2723 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2724 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2726 /* Record the fields for the semantic handler. */
2728 FLD (f_simm16
) = f_simm16
;
2730 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_addic", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2736 extract_sfmt_l_muli
:
2738 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2739 CGEN_INSN_WORD insn
= entire_insn
;
2740 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2745 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2746 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2747 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2749 /* Record the fields for the semantic handler. */
2751 FLD (f_simm16
) = f_simm16
;
2753 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_muli", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2759 extract_sfmt_l_exths
:
2761 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2762 CGEN_INSN_WORD insn
= entire_insn
;
2763 #define FLD(f) abuf->fields.sfmt_l_slli.f
2767 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2768 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2770 /* Record the fields for the semantic handler. */
2773 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_exths", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2779 extract_sfmt_l_cmov
:
2781 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2782 CGEN_INSN_WORD insn
= entire_insn
;
2783 #define FLD(f) abuf->fields.sfmt_l_sll.f
2788 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2789 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2790 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2792 /* Record the fields for the semantic handler. */
2796 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_cmov", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2802 extract_sfmt_l_sfgts
:
2804 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2805 CGEN_INSN_WORD insn
= entire_insn
;
2806 #define FLD(f) abuf->fields.sfmt_l_sll.f
2810 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2811 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2813 /* Record the fields for the semantic handler. */
2816 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_sfgts", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, (char *) 0));
2822 extract_sfmt_l_sfgtsi
:
2824 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2825 CGEN_INSN_WORD insn
= entire_insn
;
2826 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2830 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2831 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2833 /* Record the fields for the semantic handler. */
2835 FLD (f_simm16
) = f_simm16
;
2836 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_sfgtsi", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, (char *) 0));
2844 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2845 CGEN_INSN_WORD insn
= entire_insn
;
2846 #define FLD(f) abuf->fields.sfmt_l_sll.f
2850 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2851 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2853 /* Record the fields for the semantic handler. */
2856 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_mac", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, (char *) 0));
2862 extract_sfmt_l_maci
:
2864 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2865 CGEN_INSN_WORD insn
= entire_insn
;
2866 #define FLD(f) abuf->fields.sfmt_l_lwz.f
2870 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2871 f_simm16
= EXTRACT_LSB0_SINT (insn
, 32, 15, 16);
2873 /* Record the fields for the semantic handler. */
2875 FLD (f_simm16
) = f_simm16
;
2876 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_maci", "f_r2 0x%x", 'x', f_r2
, "f_simm16 0x%x", 'x', f_simm16
, (char *) 0));
2882 extract_sfmt_l_macu
:
2884 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2885 CGEN_INSN_WORD insn
= entire_insn
;
2886 #define FLD(f) abuf->fields.sfmt_l_sll.f
2890 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2891 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2893 /* Record the fields for the semantic handler. */
2896 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_l_macu", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, (char *) 0));
2902 extract_sfmt_lf_add_s
:
2904 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2905 CGEN_INSN_WORD insn
= entire_insn
;
2906 #define FLD(f) abuf->fields.sfmt_l_sll.f
2911 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2912 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2913 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2915 /* Record the fields for the semantic handler. */
2919 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_add_s", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2925 extract_sfmt_lf_add_d32
:
2927 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2928 CGEN_INSN_WORD insn
= entire_insn
;
2929 #define FLD(f) abuf->fields.sfmt_lf_add_d32.f
2940 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2941 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2942 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
2943 f_rdoff_10_1
= EXTRACT_LSB0_UINT (insn
, 32, 10, 1);
2944 f_raoff_9_1
= EXTRACT_LSB0_UINT (insn
, 32, 9, 1);
2945 f_rboff_8_1
= EXTRACT_LSB0_UINT (insn
, 32, 8, 1);
2946 f_rdd32
= ((f_r1
) | (((f_rdoff_10_1
) << (5))));
2947 f_rad32
= ((f_r2
) | (((f_raoff_9_1
) << (5))));
2948 f_rbd32
= ((f_r3
) | (((f_rboff_8_1
) << (5))));
2950 /* Record the fields for the semantic handler. */
2951 FLD (f_rad32
) = f_rad32
;
2952 FLD (f_rbd32
) = f_rbd32
;
2953 FLD (f_rdd32
) = f_rdd32
;
2954 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_add_d32", "f_rad32 0x%x", 'x', f_rad32
, "f_rbd32 0x%x", 'x', f_rbd32
, "f_rdd32 0x%x", 'x', f_rdd32
, (char *) 0));
2960 extract_sfmt_lf_itof_s
:
2962 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2963 CGEN_INSN_WORD insn
= entire_insn
;
2964 #define FLD(f) abuf->fields.sfmt_l_slli.f
2968 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2969 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2971 /* Record the fields for the semantic handler. */
2974 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_itof_s", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
2980 extract_sfmt_lf_itof_d32
:
2982 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
2983 CGEN_INSN_WORD insn
= entire_insn
;
2984 #define FLD(f) abuf->fields.sfmt_lf_add_d32.f
2992 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
2993 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
2994 f_rdoff_10_1
= EXTRACT_LSB0_UINT (insn
, 32, 10, 1);
2995 f_raoff_9_1
= EXTRACT_LSB0_UINT (insn
, 32, 9, 1);
2996 f_rdd32
= ((f_r1
) | (((f_rdoff_10_1
) << (5))));
2997 f_rad32
= ((f_r2
) | (((f_raoff_9_1
) << (5))));
2999 /* Record the fields for the semantic handler. */
3000 FLD (f_rad32
) = f_rad32
;
3001 FLD (f_rdd32
) = f_rdd32
;
3002 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_itof_d32", "f_rad32 0x%x", 'x', f_rad32
, "f_rdd32 0x%x", 'x', f_rdd32
, (char *) 0));
3008 extract_sfmt_lf_ftoi_s
:
3010 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
3011 CGEN_INSN_WORD insn
= entire_insn
;
3012 #define FLD(f) abuf->fields.sfmt_l_slli.f
3016 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
3017 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
3019 /* Record the fields for the semantic handler. */
3022 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_ftoi_s", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
3028 extract_sfmt_lf_ftoi_d32
:
3030 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
3031 CGEN_INSN_WORD insn
= entire_insn
;
3032 #define FLD(f) abuf->fields.sfmt_lf_add_d32.f
3040 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
3041 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
3042 f_rdoff_10_1
= EXTRACT_LSB0_UINT (insn
, 32, 10, 1);
3043 f_raoff_9_1
= EXTRACT_LSB0_UINT (insn
, 32, 9, 1);
3044 f_rdd32
= ((f_r1
) | (((f_rdoff_10_1
) << (5))));
3045 f_rad32
= ((f_r2
) | (((f_raoff_9_1
) << (5))));
3047 /* Record the fields for the semantic handler. */
3048 FLD (f_rad32
) = f_rad32
;
3049 FLD (f_rdd32
) = f_rdd32
;
3050 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_ftoi_d32", "f_rad32 0x%x", 'x', f_rad32
, "f_rdd32 0x%x", 'x', f_rdd32
, (char *) 0));
3056 extract_sfmt_lf_sfeq_s
:
3058 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
3059 CGEN_INSN_WORD insn
= entire_insn
;
3060 #define FLD(f) abuf->fields.sfmt_l_sll.f
3064 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
3065 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
3067 /* Record the fields for the semantic handler. */
3070 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_sfeq_s", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, (char *) 0));
3076 extract_sfmt_lf_sfeq_d32
:
3078 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
3079 CGEN_INSN_WORD insn
= entire_insn
;
3080 #define FLD(f) abuf->fields.sfmt_lf_add_d32.f
3088 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
3089 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
3090 f_raoff_9_1
= EXTRACT_LSB0_UINT (insn
, 32, 9, 1);
3091 f_rboff_8_1
= EXTRACT_LSB0_UINT (insn
, 32, 8, 1);
3092 f_rad32
= ((f_r2
) | (((f_raoff_9_1
) << (5))));
3093 f_rbd32
= ((f_r3
) | (((f_rboff_8_1
) << (5))));
3095 /* Record the fields for the semantic handler. */
3096 FLD (f_rad32
) = f_rad32
;
3097 FLD (f_rbd32
) = f_rbd32
;
3098 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_sfeq_d32", "f_rad32 0x%x", 'x', f_rad32
, "f_rbd32 0x%x", 'x', f_rbd32
, (char *) 0));
3104 extract_sfmt_lf_madd_s
:
3106 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
3107 CGEN_INSN_WORD insn
= entire_insn
;
3108 #define FLD(f) abuf->fields.sfmt_l_sll.f
3113 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
3114 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
3115 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
3117 /* Record the fields for the semantic handler. */
3121 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_madd_s", "f_r2 0x%x", 'x', f_r2
, "f_r3 0x%x", 'x', f_r3
, "f_r1 0x%x", 'x', f_r1
, (char *) 0));
3127 extract_sfmt_lf_madd_d32
:
3129 const IDESC
*idesc
= &or1k32bf_insn_data
[itype
];
3130 CGEN_INSN_WORD insn
= entire_insn
;
3131 #define FLD(f) abuf->fields.sfmt_lf_add_d32.f
3142 f_r1
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
3143 f_r2
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
3144 f_r3
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
3145 f_rdoff_10_1
= EXTRACT_LSB0_UINT (insn
, 32, 10, 1);
3146 f_raoff_9_1
= EXTRACT_LSB0_UINT (insn
, 32, 9, 1);
3147 f_rboff_8_1
= EXTRACT_LSB0_UINT (insn
, 32, 8, 1);
3148 f_rdd32
= ((f_r1
) | (((f_rdoff_10_1
) << (5))));
3149 f_rad32
= ((f_r2
) | (((f_raoff_9_1
) << (5))));
3150 f_rbd32
= ((f_r3
) | (((f_rboff_8_1
) << (5))));
3152 /* Record the fields for the semantic handler. */
3153 FLD (f_rad32
) = f_rad32
;
3154 FLD (f_rbd32
) = f_rbd32
;
3155 FLD (f_rdd32
) = f_rdd32
;
3156 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lf_madd_d32", "f_rad32 0x%x", 'x', f_rad32
, "f_rbd32 0x%x", 'x', f_rbd32
, "f_rdd32 0x%x", 'x', f_rdd32
, (char *) 0));