gen-icache.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* This file is part of the program psim.
  2. Copyright (C) 1994-1997 Andrew Cagney <cagney@highland.com.au>
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, see <http://www.gnu.org/licenses/>.
  13. */
  14. /* Output code to manipulate the instruction cache: either create it
  15. or reference it */
  16. typedef enum {
  17. declare_variables,
  18. define_variables,
  19. undef_variables,
  20. } icache_decl_type;
  21. typedef enum {
  22. do_not_use_icache = 0,
  23. get_values_from_icache = 0x1,
  24. put_values_in_icache = 0x2,
  25. both_values_and_icache = 0x3,
  26. } icache_body_type;
  27. extern void print_icache_body
  28. (lf *file,
  29. insn *instruction,
  30. insn_bits *expanded_bits,
  31. cache_table *cache_rules,
  32. icache_decl_type what_to_declare,
  33. icache_body_type what_to_do);
  34. /* Output an instruction cache decode function */
  35. extern insn_handler print_icache_declaration;
  36. extern insn_handler print_icache_definition;
  37. /* Output an instruction cache support function */
  38. extern function_handler print_icache_internal_function_declaration;
  39. extern function_handler print_icache_internal_function_definition;
  40. /* Output the instruction cache table data structure */
  41. extern void print_icache_struct
  42. (insn_table *instructions,
  43. cache_table *cache_rules,
  44. lf *file);
  45. /* Output a single instructions decoder */