aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2005-05-26 18:46:12 +0000
committerJim Wilson <wilson@tuliptree.org>2005-05-26 18:46:12 +0000
commit7c06efaa6494dcdb65e8f2bd712041b9d18fd74d (patch)
treeb21b607915fa133262abe501aa8e8795718e9e02
parent75fed80d13ce0f8e3c10e493f552a8fc2b457a44 (diff)
downloadgdb-7c06efaa6494dcdb65e8f2bd712041b9d18fd74d.zip
gdb-7c06efaa6494dcdb65e8f2bd712041b9d18fd74d.tar.gz
gdb-7c06efaa6494dcdb65e8f2bd712041b9d18fd74d.tar.bz2
Fix issues noticed while reviewing Jan Beulich's MLX template bug fix.
* config/tc-ia64.c (extra_goodness): Update comment. (md_begin): Add debugging code to print best_template table.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ia64.c20
2 files changed, 23 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 751a0d0..546792e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-26 James E Wilson <wilson@specifixinc.com>
+
+ * config/tc-ia64.c (extra_goodness): Update comment.
+ (md_begin): Add debugging code to print best_template table.
+
2005-05-25 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (md_begin): Don't try to match slot 2 of an MLX
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 4f2e462..25223a1 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -7141,8 +7141,9 @@ match (int templ, int type, int slot)
return result;
}
-/* Add a bit of extra goodness if a nop of type F or B would fit
- in TEMPL at SLOT. */
+/* For Itanium 1, add a bit of extra goodness if a nop of type F or B would fit
+ in TEMPL at SLOT. For Itanium 2, add a bit of extra goodness if a nop of
+ type M or I would fit in TEMPL at SLOT. */
static inline int
extra_goodness (int templ, int slot)
@@ -7320,6 +7321,21 @@ md_begin ()
}
}
+#ifdef DEBUG_TEMPLATES
+ /* For debugging changes to the best_template calculations. We don't care
+ about combinations with invalid instructions, so start the loops at 1. */
+ for (i = 0; i < IA64_NUM_TYPES; ++i)
+ for (j = 0; j < IA64_NUM_TYPES; ++j)
+ for (k = 0; k < IA64_NUM_TYPES; ++k)
+ {
+ char type_letter[IA64_NUM_TYPES] = { 'n', 'a', 'i', 'm', 'b', 'f',
+ 'x', 'd' };
+ fprintf (stderr, "%c%c%c %s\n", type_letter[i], type_letter[j],
+ type_letter[k],
+ ia64_templ_desc[best_template[i][j][k]].name);
+ }
+#endif
+
for (i = 0; i < NUM_SLOTS; ++i)
md.slot[i].user_template = -1;