Handle correctly passing a bad interpreter name to new-ui
[deliverable/binutils-gdb.git] / sim / ppc / ld-decode.c
index e83445f527c0be4a858088c8a9f02f1b6d3b90a2..3b2e1a05c28089b8fa7011eceb6de54c348dc020 100644 (file)
@@ -1,10 +1,10 @@
 /*  This file is part of the program psim.
 
 /*  This file is part of the program psim.
 
-    Copyright (C) 1994,1995,1996, 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
 
     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,
     (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
     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/>.
  
     */
 
  
     */
 
@@ -64,6 +63,15 @@ static const name_map decode_slash_map[] = {
 };
 
 
 };
 
 
+static decode_gen_type overriding_gen_type = invalid_gen;
+
+void
+force_decode_gen_type(const char *type)
+{
+  overriding_gen_type = name2i(type, decode_gen_map);
+}
+
+
 decode_table *
 load_decode_table(char *file_name,
                  int hi_bit_nr)
 decode_table *
 load_decode_table(char *file_name,
                  int hi_bit_nr)
@@ -75,7 +83,9 @@ load_decode_table(char *file_name,
   while ((entry = table_entry_read(file)) != NULL) {
     decode_table *new_rule = ZALLOC(decode_table);
     new_rule->type = name2i(entry->fields[op_options], decode_type_map);
   while ((entry = table_entry_read(file)) != NULL) {
     decode_table *new_rule = ZALLOC(decode_table);
     new_rule->type = name2i(entry->fields[op_options], decode_type_map);
-    new_rule->gen = name2i(entry->fields[op_options], decode_gen_map);
+    new_rule->gen = (overriding_gen_type != invalid_gen
+                    ? overriding_gen_type
+                    : name2i(entry->fields[op_options], decode_gen_map));
     new_rule->force_slash = name2i(entry->fields[op_options], decode_slash_map);
     new_rule->first = target_a2i(hi_bit_nr, entry->fields[op_first]);
     new_rule->last = target_a2i(hi_bit_nr, entry->fields[op_last]);
     new_rule->force_slash = name2i(entry->fields[op_options], decode_slash_map);
     new_rule->first = target_a2i(hi_bit_nr, entry->fields[op_first]);
     new_rule->last = target_a2i(hi_bit_nr, entry->fields[op_last]);
This page took 0.024838 seconds and 4 git commands to generate.