From 744b64143704b9c95d9f6058b233d26bd895ea38 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Fri, 18 Feb 2005 01:59:08 +0000 Subject: [PATCH] Respect bundle directives. * config/tc-ia64.c (emit_one_bundle): Stop filling a bundle if we see an instruction that specifies a template. --- gas/ChangeLog | 5 +++++ gas/config/tc-ia64.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 101e1e5..83c1682 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-02-17 James E Wilson + + * config/tc-ia64.c (emit_one_bundle): Stop filling a bundle if we + see an instruction that specifies a template. + 2005-02-18 Alan Modra * config/tc-openrisc.c (openrisc_relax_frag): Delete unused function. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 251185f..5b7f3ee 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -1,5 +1,5 @@ /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture. - Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by David Mosberger-Tang @@ -6572,6 +6572,11 @@ emit_one_bundle () 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) @@ -10151,6 +10156,7 @@ remove_marked_resource (rs) 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; @@ -10172,6 +10178,7 @@ remove_marked_resource (rs) 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; -- 2.7.4