- lf_printf(file, "\n");
- lf_printf(file, "/* semantics: */\n");
- if (instruction->file_entry->annex != NULL) {
- /* true code */
- table_entry_print_cpp_line_nr(file, instruction->file_entry);
- lf_printf(file, "{\n");
- lf_indent(file, +2);
- lf_print__c_code(file, instruction->file_entry->annex);
- lf_indent(file, -2);
- lf_printf(file, "}\n");
- lf_print__internal_reference(file);
- }
- else if (it_is("nop", instruction->file_entry->fields[insn_flags])) {
- 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, "engine_error (SD, CPU, cia, \"%s:%d:0x%%08lx:%%s unimplemented\\n\",\n",
- filter_filename(instruction->file_entry->file_name),
- instruction->file_entry->line_nr);
- if ((code & generate_with_semantic_delayed_branch))
- lf_printf(file, " (long)cia.ip,\n");
- else
- lf_printf(file, " (long)cia,\n");
- lf_printf(file, " itable[MY_INDEX].name);\n");
- lf_print__internal_reference(file);
- }
+ lf_printf (file, "\n");
+ lf_printf (file, "/* semantics: */\n");
+ if (instruction->code != NULL)
+ {
+ /* true code */
+ lf_printf (file, "{\n");
+ lf_indent (file, +2);
+ lf_print__line_ref (file, instruction->code->line);
+ table_print_code (file, instruction->code);
+ lf_indent (file, -2);
+ lf_printf (file, "}\n");
+ lf_print__internal_ref (file);
+ }
+ else if (filter_is_member (instruction->options, "nop"))
+ {
+ lf_print__internal_ref (file);
+ }
+ else
+ {
+ const char *prefix = "sim_engine_abort (";
+ int indent = strlen (prefix);
+ /* abort so it is implemented now */
+ lf_print__line_ref (file, instruction->line);
+ lf_printf (file, "%sSD, CPU, cia, \\\n", prefix);
+ lf_indent (file, +indent);
+ lf_printf (file, "\"%s:%d:0x%%08lx:%%s unimplemented\\n\", \\\n",
+ filter_filename (instruction->line->file_name),
+ instruction->line->line_nr);
+ lf_printf (file, "(long) CIA, \\\n");
+ lf_printf (file, "%sitable[MY_INDEX].name);\n",
+ options.module.itable.prefix.l);
+ lf_indent (file, -indent);
+ lf_print__internal_ref (file);
+ }