]>
Commit | Line | Data |
---|---|---|
feaee4bd | 1 | /* The IGEN simulator generator for GDB, the GNU Debugger. |
c906108c | 2 | |
1d506c26 | 3 | Copyright 2002-2024 Free Software Foundation, Inc. |
feaee4bd AC |
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 | |
4744ac1b | 11 | the Free Software Foundation; either version 3 of the License, or |
feaee4bd AC |
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 | |
4744ac1b | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c906108c | 21 | |
339e44f8 MF |
22 | #ifndef IGEN_GEN_ICACHE_H |
23 | #define IGEN_GEN_ICACHE_H | |
c906108c SS |
24 | |
25 | /* Output code to manipulate the instruction cache: either create it | |
26 | or reference it */ | |
27 | ||
4e0bf4c4 AC |
28 | typedef enum |
29 | { | |
c906108c SS |
30 | declare_variables, |
31 | define_variables, | |
32 | undef_variables, | |
4e0bf4c4 AC |
33 | } |
34 | icache_decl_type; | |
c906108c | 35 | |
4e0bf4c4 AC |
36 | typedef enum |
37 | { | |
c906108c SS |
38 | do_not_use_icache = 0, |
39 | get_values_from_icache = 0x1, | |
40 | put_values_in_icache = 0x2, | |
41 | both_values_and_icache = 0x3, | |
4e0bf4c4 AC |
42 | } |
43 | icache_body_type; | |
c906108c SS |
44 | |
45 | extern void print_icache_body | |
4e0bf4c4 | 46 | (lf *file, |
fa654e74 MF |
47 | const insn_entry *instruction, |
48 | const opcode_bits *expanded_bits, | |
4e0bf4c4 AC |
49 | cache_entry *cache_rules, |
50 | icache_decl_type what_to_declare, | |
51 | icache_body_type what_to_do, int nr_prefetched_words); | |
c906108c SS |
52 | |
53 | ||
54 | /* Output an instruction cache decode function */ | |
55 | ||
56 | extern void print_icache_declaration | |
4e0bf4c4 | 57 | (lf *file, |
fa654e74 MF |
58 | const insn_entry *insn, |
59 | const opcode_bits *expanded_bits, | |
60 | const insn_opcodes *opcodes, | |
61 | int nr_prefetched_words); | |
4e0bf4c4 | 62 | |
c906108c | 63 | extern void print_icache_definition |
4e0bf4c4 | 64 | (lf *file, |
fa654e74 MF |
65 | const insn_entry *insn, |
66 | const opcode_bits *expanded_bits, | |
67 | const insn_opcodes *opcodes, | |
68 | cache_entry *cache_rules, int nr_prefetched_words); | |
c906108c SS |
69 | |
70 | ||
71 | /* Output an instruction cache support function */ | |
72 | ||
73 | extern function_entry_handler print_icache_internal_function_declaration; | |
74 | extern function_entry_handler print_icache_internal_function_definition; | |
75 | ||
76 | ||
77 | /* Output the instruction cache table data structure */ | |
78 | ||
79 | extern void print_icache_struct | |
fa654e74 | 80 | (lf *file, const insn_table *instructions, cache_entry *cache_rules); |
c906108c SS |
81 | |
82 | ||
83 | /* Output a single instructions decoder */ | |
339e44f8 MF |
84 | |
85 | #endif /* IGEN_GEN_ICACHE_H */ |