/* 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
{
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,
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);
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,
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");