Commit | Line | Data |
---|---|---|
feaee4bd | 1 | /* The IGEN simulator generator for GDB, the GNU Debugger. |
c906108c | 2 | |
feaee4bd AC |
3 | Copyright 2002 Free Software Foundation, Inc. |
4 | ||
5 | Contributed by Andrew Cagney. | |
6 | ||
7 | This file is part of GDB. | |
8 | ||
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 of the License, or | |
12 | (at your option) any later version. | |
13 | ||
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. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with this program; if not, write to the Free Software | |
21 | Foundation, Inc., 59 Temple Place - Suite 330, | |
22 | Boston, MA 02111-1307, USA. */ | |
c906108c SS |
23 | |
24 | ||
25 | /* Output code to manipulate the instruction cache: either create it | |
26 | or reference it */ | |
27 | ||
28 | typedef enum { | |
29 | declare_variables, | |
30 | define_variables, | |
31 | undef_variables, | |
32 | } icache_decl_type; | |
33 | ||
34 | typedef enum { | |
35 | do_not_use_icache = 0, | |
36 | get_values_from_icache = 0x1, | |
37 | put_values_in_icache = 0x2, | |
38 | both_values_and_icache = 0x3, | |
39 | } icache_body_type; | |
40 | ||
41 | extern void print_icache_body | |
42 | (lf *file, | |
43 | insn_entry *instruction, | |
44 | opcode_bits *expanded_bits, | |
45 | cache_entry *cache_rules, | |
46 | icache_decl_type what_to_declare, | |
47 | icache_body_type what_to_do, | |
48 | int nr_prefetched_words); | |
49 | ||
50 | ||
51 | /* Output an instruction cache decode function */ | |
52 | ||
53 | extern void print_icache_declaration | |
54 | (lf *file, | |
55 | insn_entry *insn, | |
56 | opcode_bits *expanded_bits, | |
57 | insn_opcodes *opcodes, | |
58 | int nr_prefetched_words); | |
59 | ||
60 | extern void print_icache_definition | |
61 | (lf *file, | |
62 | insn_entry *insn, | |
63 | opcode_bits *expanded_bits, | |
64 | insn_opcodes *opcodes, | |
65 | cache_entry *cache_rules, | |
66 | int nr_prefetched_words); | |
67 | ||
68 | ||
69 | /* Output an instruction cache support function */ | |
70 | ||
71 | extern function_entry_handler print_icache_internal_function_declaration; | |
72 | extern function_entry_handler print_icache_internal_function_definition; | |
73 | ||
74 | ||
75 | /* Output the instruction cache table data structure */ | |
76 | ||
77 | extern void print_icache_struct | |
78 | (lf *file, | |
79 | insn_table *instructions, | |
80 | cache_entry *cache_rules); | |
81 | ||
82 | ||
83 | /* Output a single instructions decoder */ |