[PATCH] ia64: fix regression from fix for PR/803
James E Wilson
wilson@specifixinc.com
Wed May 25 00:37:00 GMT 2005
On Mon, 2005-05-23 at 06:54, Jan Beulich wrote:
> I additionallly wonder whether M-unit NOPs shouldn't be preferred over I-
> unit ones (by letting extra_goodness return 2 only for an M-unit match, but
> 1 for an I-unit match).
We will get a lot more M nops this way, but that is probably a good
thing since we have 4 M issue slots and only 2 I issue slots. I suspect
this would result in more dual issued bundles. Hard to say without
doing an experiment though.
> * config/tc-ia64.c (md_begin): Don't try to match slot 2 of an MLX
> template.
OK.
While looking at this, I noticed that the comment before extra_goodness
is out-of-date. HJ forgot to update it when he changed the code. Also,
I wanted to double check that the result was OK, so I added some
debugging code to print out the best_template array, so I could make
sure it was OK after this change. I've attached the patch I wrote for
this. I plan to check this in after you check in your patch.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
-------------- next part --------------
2005-05-24 James E Wilson <wilson@specifixinc.com>
* config/tc-ia64.c (extra_goodness): Update comment.
(md_begin): Add debugging code for best_template.
Index: tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.159
diff -p -p -r1.159 tc-ia64.c
*** tc-ia64.c 7 May 2005 22:19:36 -0000 1.159
--- tc-ia64.c 24 May 2005 22:15:32 -0000
*************** match (int templ, int type, int slot)
*** 7147,7154 ****
return result;
}
! /* Add a bit of extra goodness if a nop of type F or B would fit
! in TEMPL at SLOT. */
static inline int
extra_goodness (int templ, int slot)
--- 7147,7155 ----
return result;
}
! /* 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)
*************** md_begin ()
*** 7326,7331 ****
--- 7327,7347 ----
}
}
+ #if 0
+ /* 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 = 1; i < IA64_NUM_TYPES; ++i)
+ for (j = 1; j < IA64_NUM_TYPES; ++j)
+ for (k = 1; 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;
More information about the Binutils
mailing list