/* 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
};
+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)
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]);