aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-10-16 21:36:01 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-10-16 21:36:01 +0000
commit5b0d3b14901b206e38fc8a7dd8d98326ec58661c (patch)
tree0d3aba32bd92d1910f4734085ab7a0289e50b321
parent54e3c946981aad4e4dc99256607bccda209042c2 (diff)
downloadgdb-5b0d3b14901b206e38fc8a7dd8d98326ec58661c.zip
gdb-5b0d3b14901b206e38fc8a7dd8d98326ec58661c.tar.gz
gdb-5b0d3b14901b206e38fc8a7dd8d98326ec58661c.tar.bz2
Move counting of instructions into the semantic routines.
-rw-r--r--sim/ppc/ChangeLog6
-rw-r--r--sim/ppc/gen.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 2ad375d..66d6abf 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,9 @@
+Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * gen.c (lf_print_c_semantic_function): Move counting # of
+ instructions here so it works with caching.
+ (gen_idecode_c): Move from here.
+
Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
* gen.c, ppc-instructions, psim.c: Fix code for generating
diff --git a/sim/ppc/gen.c b/sim/ppc/gen.c
index ced6e41..76f1bcb 100644
--- a/sim/ppc/gen.c
+++ b/sim/ppc/gen.c
@@ -2452,11 +2452,17 @@ lf_print_c_semantic_function(lf *file,
lf_print_c_semantic_function_header(file,
instruction->file_entry->fields[insn_name],
expanded_bits);
+ lf_printf(file, "{\n");
+ lf_indent(file, +2);
+ lf_printf(file, "cpu_increment_number_of_insns (processor);\n");
+
lf_print_c_semantic(file,
instruction,
expanded_bits,
opcodes);
+ lf_indent(file, -2);
+ lf_printf(file, "}\n");
}
@@ -3002,8 +3008,6 @@ gen_idecode_c(insn_table *table, lf *file)
insn_formal);
lf_printf(file, "{\n");
lf_indent(file, +2);
- if (!idecode_cache)
- lf_printf(file, "cpu_increment_number_of_insns (processor);\n");
if (table->opcode_rule->use_switch)
lf_print_idecode_switch(file, table);
else