summaryrefslogtreecommitdiff
path: root/gas/config/tc-ia64.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2013-03-26 09:13:17 +0000
committerTristan Gingold <gingold@adacore.com>2013-03-26 09:13:17 +0000
commite3886546b288cc567977fdd78a289a0826013f74 (patch)
treec2054a46b2899fddafb001c963e130187eee7d09 /gas/config/tc-ia64.c
parentce96de247d8aa5d3a301f4bf0562ea43327f7e1d (diff)
downloadbinutils-redhat-e3886546b288cc567977fdd78a289a0826013f74.tar.gz
gas/
2013-03-26 Douglas B Rupp <rupp@gnat.com> * config/tc-ia64.c (emit_one_bundle): Move last_slot adjustment after fixup. gas/testsuite/ 2013-03-26 Douglas B Rupp <rupp@adacore.com * gas/ia64/ia64.exp: Add new test reloc-mlx * gas/ia64/reloc-mlx.[sd]: New test for X-unit reloc. * gas/ia64/pcrel.d: Fix output for X-unit reloc.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r--gas/config/tc-ia64.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index a4e702f7eb..0542410161 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -1,6 +1,6 @@
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -6934,15 +6934,6 @@ emit_one_bundle (void)
md.slot[curr].unwind_record = NULL;
}
- if (required_unit == IA64_UNIT_L)
- {
- know (i == 1);
- /* skip one slot for long/X-unit instructions */
- ++i;
- }
- --md.num_slots_in_use;
- last_slot = i;
-
for (j = 0; j < md.slot[curr].num_fixups; ++j)
{
ifix = md.slot[curr].fixup + j;
@@ -6955,6 +6946,17 @@ emit_one_bundle (void)
end_of_insn_group = md.slot[curr].end_of_insn_group;
+ /* This adjustment to "i" must occur after the fix, otherwise the fix
+ is assigned to the wrong slot, and the VMS linker complains. */
+ if (required_unit == IA64_UNIT_L)
+ {
+ know (i == 1);
+ /* skip one slot for long/X-unit instructions */
+ ++i;
+ }
+ --md.num_slots_in_use;
+ last_slot = i;
+
/* clear slot: */
ia64_free_opcode (md.slot[curr].idesc);
memset (md.slot + curr, 0, sizeof (md.slot[curr]));