This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Disable hint in B unit for Montecito
On Thu, 2005-02-17 at 14:26, H. J. Lu wrote:
> This patch makes dv-srlz.o much larger and fails
We failed to correctly set user_template when manually inserting
serialization instructions. This is trivial to fix. We just need to
set user_template to -1 after clearing CURR_SLOT.
The following patch passes the testsuite, and has been checked in.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
2005-02-17 James E Wilson <wilson@specifixinc.com>
* config/tc-ia64.c (emit_one_bundle): Stop filling a bundle if we
see an instruction that specifies a template.
Index: tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.144
diff -p -p -r1.144 tc-ia64.c
*** tc-ia64.c 17 Feb 2005 07:43:11 -0000 1.144
--- tc-ia64.c 18 Feb 2005 01:46:57 -0000
***************
*** 1,5 ****
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
! Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
--- 1,5 ----
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
! Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
*************** emit_one_bundle ()
*** 6564,6569 ****
--- 6564,6574 ----
break; /* Need to start a new bundle. */
}
+ /* If this instruction specifies a template, then it must be the first
+ instruction of a bundle. */
+ if (curr != first && md.slot[curr].user_template >= 0)
+ break;
+
if (idesc->flags & IA64_OPCODE_SLOT2)
{
if (manual_bundling && !manual_bundling_off)
*************** remove_marked_resource (rs)
*** 10103,10108 ****
--- 10108,10114 ----
struct slot oldslot = CURR_SLOT;
/* Manually jam a srlz.i insn into the stream */
memset (&CURR_SLOT, 0, sizeof (CURR_SLOT));
+ CURR_SLOT.user_template = -1;
CURR_SLOT.idesc = ia64_find_opcode ("srlz.i");
instruction_serialization ();
md.curr_slot = (md.curr_slot + 1) % NUM_SLOTS;
*************** remove_marked_resource (rs)
*** 10124,10129 ****
--- 10130,10136 ----
struct slot oldslot = CURR_SLOT;
/* Manually jam a srlz.d insn into the stream */
memset (&CURR_SLOT, 0, sizeof (CURR_SLOT));
+ CURR_SLOT.user_template = -1;
CURR_SLOT.idesc = ia64_find_opcode ("srlz.d");
data_serialization ();
md.curr_slot = (md.curr_slot + 1) % NUM_SLOTS;