aboutsummaryrefslogtreecommitdiff
path: root/sim/igen
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-16 03:27:40 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-16 03:27:40 +0000
commit37a684b84d5c722848ebdc7203052d65c6b35e30 (patch)
tree3d7fa5b15efab746e9b8cc87449fa8664b6ed359 /sim/igen
parent77bd8dfa1f3678ea3c3d05f40de29a36802d21f5 (diff)
downloadgdb-37a684b84d5c722848ebdc7203052d65c6b35e30.zip
gdb-37a684b84d5c722848ebdc7203052d65c6b35e30.tar.gz
gdb-37a684b84d5c722848ebdc7203052d65c6b35e30.tar.bz2
o Make tic80 insn file more `cache ready'
o Have igen always zero r0 instead of constantly checking if the designated register is r0.
Diffstat (limited to 'sim/igen')
-rw-r--r--sim/igen/ChangeLog7
-rw-r--r--sim/igen/gen-semantics.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
index df837dc..a9f790a 100644
--- a/sim/igen/ChangeLog
+++ b/sim/igen/ChangeLog
@@ -1,3 +1,10 @@
+Fri May 16 11:48:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gen-semantics.c (print_semantic_body): Add code to clear r0.
+
+ * igen.c (main): Add new option zero-r0, which adds code to clear
+ GPR(0) each cycle.
+
Wed May 7 12:31:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
* igen.c (print_itrace): Fix so line-nr is passed to trace
diff --git a/sim/igen/gen-semantics.c b/sim/igen/gen-semantics.c
index 0ffcf78..35b247f 100644
--- a/sim/igen/gen-semantics.c
+++ b/sim/igen/gen-semantics.c
@@ -173,6 +173,15 @@ print_semantic_body(lf *file,
/* FIXME - need to log a conditional failure */
}
+ /* Architecture expects r0 to be zero. Instead of having to check
+ every read to see if it is refering to r0 just zap the r0
+ register */
+ if ((code & generate_with_semantic_delayed_branch))
+ {
+ lf_printf (file, "\n");
+ lf_printf (file, "GPR(0) = 0;\n");
+ }
+
/* generate the code (or at least something */
lf_printf(file, "\n");
lf_printf(file, "/* semantics: */\n");