binutils-gdb/sim/igen/gen-semantics.h
Andrew Burgess 1d506c26d9 Update copyright year range in header of all files managed by GDB
This commit is the result of the following actions:

  - Running gdb/copyright.py to update all of the copyright headers to
    include 2024,

  - Manually updating a few files the copyright.py script told me to
    update, these files had copyright headers embedded within the
    file,

  - Regenerating gdbsupport/Makefile.in to refresh it's copyright
    date,

  - Using grep to find other files that still mentioned 2023.  If
    these files were updated last year from 2022 to 2023 then I've
    updated them this year to 2024.

I'm sure I've probably missed some dates.  Feel free to fix them up as
you spot them.
2024-01-12 15:49:57 +00:00

109 lines
3.1 KiB
C

/* The IGEN simulator generator for GDB, the GNU Debugger.
Copyright 2002-2024 Free Software Foundation, Inc.
Contributed by Andrew Cagney.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef IGEN_GEN_SEMANTICS_H
#define IGEN_GEN_SEMANTICS_H
/* Creates the files semantics.[hc].
The generated file semantics contains functions that implement the
operations required to model a single target processor instruction.
Several different variations on the semantics file can be created:
o uncached
No instruction cache exists. The semantic function
needs to generate any required values locally.
o cached - separate cracker and semantic
Two independant functions are created. Firstly the
function that cracks an instruction entering it into a
cache and secondly the semantic function propper that
uses the cache.
o cached - semantic + cracking semantic
The function that cracks the instruction and enters
all values into the cache also contains a copy of the
semantic code (avoiding the need to call both the
cracker and the semantic function when there is a
cache miss).
For each of these general forms, several refinements can occure:
o do/don't duplicate/expand semantic functions
As a consequence of decoding an instruction, the
decoder, as part of its table may have effectivly made
certain of the variable fields in an instruction
constant. Separate functions for each of the
alternative values for what would have been treated as
a variable part can be created.
o use cache struct directly.
When a cracking cache is present, the semantic
functions can be generated to either hold intermediate
cache values in local variables or always refer to the
contents of the cache directly. */
extern void print_semantic_declaration
(lf *file,
const insn_entry *insn,
const opcode_bits *bits,
const insn_opcodes *opcodes,
int nr_prefetched_words);
extern void print_semantic_definition
(lf *file,
const insn_entry *insn,
const opcode_bits *bits,
const insn_opcodes *opcodes,
cache_entry *cache_rules,
int nr_prefetched_words);
typedef enum
{
invalid_illegal,
invalid_fp_unavailable,
invalid_wrong_slot,
}
invalid_type;
extern void print_idecode_invalid
(lf *file, const char *result, invalid_type type);
extern void print_semantic_body
(lf *file,
const insn_entry *instruction,
const opcode_bits *expanded_bits,
const insn_opcodes *opcodes);
#endif /* IGEN_GEN_SEMANTICS_H */