aboutsummaryrefslogtreecommitdiff
path: root/sim/igen/gen-semantics.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1997-05-05 18:16:10 +0000
committerMichael Meissner <gnu@the-meissners.org>1997-05-05 18:16:10 +0000
commitd23af88239c61cea5114495e36dc8884d8b05117 (patch)
tree1fb6bc9ce710260f65ad868cd520ccbc141edb53 /sim/igen/gen-semantics.c
parent23b04e791d8abbf69a05b23632cbf22022ec0533 (diff)
downloadgdb-d23af88239c61cea5114495e36dc8884d8b05117.zip
gdb-d23af88239c61cea5114495e36dc8884d8b05117.tar.gz
gdb-d23af88239c61cea5114495e36dc8884d8b05117.tar.bz2
Fix problems -Wall found
Diffstat (limited to 'sim/igen/gen-semantics.c')
-rw-r--r--sim/igen/gen-semantics.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sim/igen/gen-semantics.c b/sim/igen/gen-semantics.c
index 57363c9..0ffcf78 100644
--- a/sim/igen/gen-semantics.c
+++ b/sim/igen/gen-semantics.c
@@ -98,6 +98,7 @@ print_idecode_invalid(lf *file,
{
const char *name;
switch (type) {
+ default: name = "unknown"; break;
case invalid_illegal: name = "illegal"; break;
case invalid_fp_unavailable: name = "fp_unavailable"; break;
case invalid_wrong_slot: name = "wrong_slot"; break;
@@ -155,7 +156,7 @@ print_semantic_body(lf *file,
lf_printf(file, "nia = -1;\n");
else if ((code & generate_with_semantic_delayed_branch)) {
lf_printf(file, "nia.ip = cia.dp; /* instruction pointer */\n");
- lf_printf(file, "nia.dp = cia.dp + %d; /* delayed-slot pointer\n",
+ lf_printf(file, "nia.dp = cia.dp + %d; /* delayed-slot pointer */\n",
insn_bit_size / 8);
}
else
@@ -191,10 +192,14 @@ print_semantic_body(lf *file,
else {
/* abort so it is implemented now */
table_entry_print_cpp_line_nr(file, instruction->file_entry);
- lf_printf(file, "engine_error(system, \"%s:%d:0x%%08lx:%%s unimplemented\\n\",\n",
+ 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);
- lf_printf(file, " (long)cia, itable[MY_INDEX].name);\n");
+ 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);
}
@@ -230,7 +235,7 @@ print_c_semantic(lf *file,
? get_values_from_icache
: do_not_use_icache));
- lf_printf(file, "instruction_address nia;\n");
+ lf_printf(file, "%sinstruction_address nia;\n", global_name_prefix);
print_semantic_body(file,
instruction,
expanded_bits,