update copyright year range in GDB files
[deliverable/binutils-gdb.git] / sim / ppc / gen-semantics.c
index 5fda23a995abe37f59080f4260f55fa89663cb43..b0646fa83871f9848ea3924c4507029481b521e6 100644 (file)
@@ -1,10 +1,10 @@
 /*  This file is part of the program psim.
 
-    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
+    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
 
     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 2 of the License, or
+    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,
@@ -13,8 +13,7 @@
     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, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+    along with this program; if not, see <http://www.gnu.org/licenses/>.
  
     */
 
@@ -44,7 +43,7 @@ print_semantic_function_header(lf *file,
 {
   int indent;
   lf_printf(file, "\n");
-  lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "EXTERN_SEMANTICS",
+  lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "PSIM_EXTERN_SEMANTICS",
                         (is_function_definition ? "\n" : " "));
   indent = print_function_name(file,
                               basename,
@@ -144,13 +143,6 @@ print_semantic_body(lf *file,
   else if (it_is("nop", instruction->file_entry->fields[insn_flags])) {
     lf_print__internal_reference(file);
   }
-  else if (it_is("f", instruction->file_entry->fields[insn_flags])) {
-    /* unimplemented floating point instruction - call for assistance */
-    lf_printf(file, "/* unimplemented floating point instruction - call for assistance */\n");
-    table_entry_print_cpp_line_nr(file, instruction->file_entry);
-    lf_putstr(file, "floating_point_assist_interrupt(processor, cia);\n");
-    lf_print__internal_reference(file);
-  }
   else {
     /* abort so it is implemented now */
     table_entry_print_cpp_line_nr(file, instruction->file_entry);
@@ -171,15 +163,18 @@ print_c_semantic(lf *file,
   lf_printf(file, "{\n");
   lf_indent(file, +2);
 
-  print_define_my_index(file, instruction->file_entry);
+  print_my_defines(file, expanded_bits, instruction->file_entry);
   lf_printf(file, "\n");
   print_icache_body(file,
                    instruction,
                    expanded_bits,
                    cache_rules,
-                   (code & generate_with_direct_access_icache),
-                   (code & generate_with_icache)/*get_value_from_cache*/,
-                   0/*put_value_in_cache*/);
+                   ((code & generate_with_direct_access)
+                    ? define_variables
+                    : declare_variables),
+                   ((code & generate_with_icache)
+                    ? get_values_from_icache
+                    : do_not_use_icache));
 
   lf_printf(file, "unsigned_word nia;\n");
   print_semantic_body(file,
@@ -189,14 +184,15 @@ print_c_semantic(lf *file,
   lf_printf(file, "return nia;\n");
 
   /* generate something to clean up any #defines created for the cache */
-  if ((code & generate_with_direct_access_icache))
+  if (code & generate_with_direct_access)
     print_icache_body(file,
                      instruction,
                      expanded_bits,
                      cache_rules,
-                     1/*use_defines*/,
-                     0/*get_value_from_cache*/,
-                     1/*put_value_in_cache*/);
+                     undef_variables,
+                     ((code & generate_with_icache)
+                      ? get_values_from_icache
+                      : do_not_use_icache));
 
   lf_indent(file, -2);
   lf_printf(file, "}\n");
This page took 0.025716 seconds and 4 git commands to generate.