1 /* This file is part of the program psim.
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 /* Creates the files semantics.[hc].
24 The generated file semantics contains functions that implement the
25 operations required to model a single target processor instruction.
27 Several different variations on the semantics file can be created:
31 No instruction cache exists. The semantic function
32 needs to generate any required values locally.
34 o cached - separate cracker and semantic
36 Two independant functions are created. Firstly the
37 function that cracks an instruction entering it into a
38 cache and secondly the semantic function propper that
41 o cached - semantic + cracking semantic
43 The function that cracks the instruction and enters
44 all values into the cache also contains a copy of the
45 semantic code (avoiding the need to call both the
46 cracker and the semantic function when there is a
49 For each of these general forms, several refinements can occure:
51 o do/don't duplicate/expand semantic functions
53 As a consequence of decoding an instruction, the
54 decoder, as part of its table may have effectivly made
55 certain of the variable fields in an instruction
56 constant. Separate functions for each of the
57 alternative values for what would have been treated as
58 a variable part can be created.
60 o use cache struct directly.
62 When a cracking cache is present, the semantic
63 functions can be generated to either hold intermediate
64 cache values in local variables or always refer to the
65 contents of the cache directly. */
69 extern insn_handler print_semantic_declaration
;
70 extern insn_handler print_semantic_definition
;
72 extern void print_idecode_illegal
76 extern void print_semantic_body
79 insn_bits
*expanded_bits
,
80 opcode_field
*opcodes
);