aboutsummaryrefslogtreecommitdiff
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
commit9699c8332afe77fdfd906af47dfc505c43f8c927 (patch)
treec99a6b191eb6228f6f3e7b220171aaee21726244 /gas/config/tc-ia64.c
parent99c819eea0b33989b8482c8059a5df28c8fec8f4 (diff)
downloadgdb-9699c8332afe77fdfd906af47dfc505c43f8c927.zip
gdb-9699c8332afe77fdfd906af47dfc505c43f8c927.tar.gz
gdb-9699c8332afe77fdfd906af47dfc505c43f8c927.tar.bz2
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 a4e702f..0542410 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]));