Mention PR ld/4701.
[deliverable/binutils-gdb.git] / sim / ppc / gen-semantics.c
index 5fda23a995abe37f59080f4260f55fa89663cb43..68682dcaac66a0bb2de639419bd66d72432fac44 100644 (file)
@@ -1,6 +1,6 @@
 /*  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
@@ -44,7 +44,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 +144,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 +164,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 +185,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.023869 seconds and 4 git commands to generate.