1 /* ISA definitions header for compact.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 This file is part of the GNU Simulators.
9 This program 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 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public 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 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifndef DEFS_SH64_COMPACT_H
26 #define DEFS_SH64_COMPACT_H
28 /* Instruction argument buffer. */
31 struct { /* no operands */
36 } sfmt_fcnvds_compact
;
46 } sfmt_movw11_compact
;
50 } sfmt_movw10_compact
;
58 } sfmt_movl10_compact
;
77 /* Writeback handler. */
79 /* Pointer to argbuf entry for insn whose results need writing back. */
80 const struct argbuf
*abuf
;
82 /* x-before handler */
84 /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
91 /* This entry is used to terminate each pbb. */
93 /* Number of insns in pbb. */
95 /* Next pbb to execute. */
97 SCACHE
*branch_target
;
102 /* The ARGBUF struct. */
104 /* These are the baseclass definitions. */
109 /* ??? Temporary hack for skip insns. */
112 /* cpu specific data follows */
115 union sem_fields fields
;
120 ??? SCACHE used to contain more than just argbuf. We could delete the
121 type entirely and always just use ARGBUF, but for future concerns and as
122 a level of abstraction it is left in. */
125 struct argbuf argbuf
;
128 /* Macros to simplify extraction, reading and semantic code.
129 These define and assign the local vars that contain the insn's fields. */
131 #define EXTRACT_IFMT_EMPTY_VARS \
133 #define EXTRACT_IFMT_EMPTY_CODE \
136 #define EXTRACT_IFMT_ADD_COMPACT_VARS \
142 #define EXTRACT_IFMT_ADD_COMPACT_CODE \
144 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
145 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
146 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
147 f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
149 #define EXTRACT_IFMT_ADDI_COMPACT_VARS \
154 #define EXTRACT_IFMT_ADDI_COMPACT_CODE \
156 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
157 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
158 f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
160 #define EXTRACT_IFMT_AND_COMPACT_VARS \
166 #define EXTRACT_IFMT_AND_COMPACT_CODE \
168 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
169 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
170 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
171 f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
173 #define EXTRACT_IFMT_ANDI_COMPACT_VARS \
177 #define EXTRACT_IFMT_ANDI_COMPACT_CODE \
179 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
180 f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
182 #define EXTRACT_IFMT_ANDB_COMPACT_VARS \
186 #define EXTRACT_IFMT_ANDB_COMPACT_CODE \
188 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
189 f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
191 #define EXTRACT_IFMT_BF_COMPACT_VARS \
195 #define EXTRACT_IFMT_BF_COMPACT_CODE \
197 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
198 f_disp8 = ((((EXTRACT_LSB0_INT (insn, 16, 7, 8)) << (1))) + (((pc) + (4)))); \
200 #define EXTRACT_IFMT_BRA_COMPACT_VARS \
204 #define EXTRACT_IFMT_BRA_COMPACT_CODE \
206 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
207 f_disp12 = ((((EXTRACT_LSB0_INT (insn, 16, 11, 12)) << (1))) + (((pc) + (4)))); \
209 #define EXTRACT_IFMT_BRAF_COMPACT_VARS \
214 #define EXTRACT_IFMT_BRAF_COMPACT_CODE \
216 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
217 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
218 f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
220 #define EXTRACT_IFMT_BRK_COMPACT_VARS \
223 #define EXTRACT_IFMT_BRK_COMPACT_CODE \
225 f_op16 = EXTRACT_LSB0_UINT (insn, 16, 15, 16); \
227 #define EXTRACT_IFMT_FABS_COMPACT_VARS \
232 #define EXTRACT_IFMT_FABS_COMPACT_CODE \
234 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
235 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
236 f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
238 #define EXTRACT_IFMT_FADD_COMPACT_VARS \
244 #define EXTRACT_IFMT_FADD_COMPACT_CODE \
246 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
247 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
248 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
249 f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
251 #define EXTRACT_IFMT_FCNVDS_COMPACT_VARS \
257 #define EXTRACT_IFMT_FCNVDS_COMPACT_CODE \
259 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
260 f_dn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 3)) << (1)); \
261 f_8_1 = EXTRACT_LSB0_UINT (insn, 16, 8, 1); \
262 f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
264 #define EXTRACT_IFMT_FIPR_COMPACT_VARS \
270 #define EXTRACT_IFMT_FIPR_COMPACT_CODE \
272 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
273 f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2)); \
274 f_vm = ((EXTRACT_LSB0_UINT (insn, 16, 9, 2)) << (2)); \
275 f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
277 #define EXTRACT_IFMT_FLDS_COMPACT_VARS \
282 #define EXTRACT_IFMT_FLDS_COMPACT_CODE \
284 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
285 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
286 f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
288 #define EXTRACT_IFMT_FMAC_COMPACT_VARS \
294 #define EXTRACT_IFMT_FMAC_COMPACT_CODE \
296 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
297 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
298 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
299 f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
301 #define EXTRACT_IFMT_FMOV2_COMPACT_VARS \
307 #define EXTRACT_IFMT_FMOV2_COMPACT_CODE \
309 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
310 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
311 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
312 f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
314 #define EXTRACT_IFMT_FMOV5_COMPACT_VARS \
320 #define EXTRACT_IFMT_FMOV5_COMPACT_CODE \
322 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
323 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
324 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
325 f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
327 #define EXTRACT_IFMT_FTRV_COMPACT_VARS \
332 #define EXTRACT_IFMT_FTRV_COMPACT_CODE \
334 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
335 f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2)); \
336 f_sub10 = EXTRACT_LSB0_UINT (insn, 16, 9, 10); \
338 #define EXTRACT_IFMT_MOVB5_COMPACT_VARS \
343 #define EXTRACT_IFMT_MOVB5_COMPACT_CODE \
345 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
346 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
347 f_imm4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
349 #define EXTRACT_IFMT_MOVL4_COMPACT_VARS \
353 #define EXTRACT_IFMT_MOVL4_COMPACT_CODE \
355 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
356 f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2)); \
358 #define EXTRACT_IFMT_MOVL5_COMPACT_VARS \
364 #define EXTRACT_IFMT_MOVL5_COMPACT_CODE \
366 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
367 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
368 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
369 f_imm4x4 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (2)); \
371 #define EXTRACT_IFMT_MOVL10_COMPACT_VARS \
376 #define EXTRACT_IFMT_MOVL10_COMPACT_CODE \
378 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
379 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
380 f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2)); \
382 #define EXTRACT_IFMT_MOVW4_COMPACT_VARS \
386 #define EXTRACT_IFMT_MOVW4_COMPACT_CODE \
388 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
389 f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1)); \
391 #define EXTRACT_IFMT_MOVW5_COMPACT_VARS \
396 #define EXTRACT_IFMT_MOVW5_COMPACT_CODE \
398 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
399 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
400 f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1)); \
402 #define EXTRACT_IFMT_MOVW10_COMPACT_VARS \
407 #define EXTRACT_IFMT_MOVW10_COMPACT_CODE \
409 f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
410 f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
411 f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1)); \
413 #define EXTRACT_IFMT_MOVW11_COMPACT_VARS \
418 #define EXTRACT_IFMT_MOVW11_COMPACT_CODE \
420 f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
421 f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
422 f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1)); \
424 #endif /* DEFS_SH64_COMPACT_H */
This page took 0.038488 seconds and 4 git commands to generate.