gas/
authorTristan Gingold <gingold@adacore.com>
Tue, 26 Mar 2013 09:13:17 +0000 (09:13 +0000)
committerTristan Gingold <gingold@adacore.com>
Tue, 26 Mar 2013 09:13:17 +0000 (09:13 +0000)
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.

gas/ChangeLog
gas/config/tc-ia64.c
gas/testsuite/ChangeLog
gas/testsuite/gas/ia64/ia64.exp
gas/testsuite/gas/ia64/pcrel.d
gas/testsuite/gas/ia64/reloc-mlx.d [new file with mode: 0644]
gas/testsuite/gas/ia64/reloc-mlx.s [new file with mode: 0644]

index f60fd45f42275ff1043e94e5513cdbaea12f3f11..a9b9104661c43ad399da5ff6c67db62b92ca6b9f 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-26  Douglas B Rupp  <rupp@gnat.com>
+
+       * config/tc-ia64.c (emit_one_bundle): Move last_slot adjustment
+       after fixup.
+
 2013-03-21  Will Newton  <will.newton@linaro.org>
 
        * config/tc-arm.c (encode_thumb32_addr_mode): Emit an error for all
index a4e702f7eb5bb850be6c7e4fada5f22249da92e4..0542410161e892f1cd50aec46691896de89dfef6 100644 (file)
@@ -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]));
index 29fe5cdec7b60f3528a677c1995748cff7e3356a..8f28d3c034a0757d256abb34fce21abaa6eff8f1 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2013-03-21  Will Newton  <will.newton@linaro.org>
 
        * gas/arm/thumb2_relax.d: Strip out invalid pc-relative strs.
index 74d0491574c643741087b90c025c80e54a3d184f..dffd56c217d732f22c2dc9ec5c638f655e6297d7 100644 (file)
@@ -65,6 +65,7 @@ if [istarget "ia64-*"] then {
     run_dump_test "dependency-1"
 
     run_dump_test "reloc"
+    run_dump_test "reloc-mlx"
     run_list_test "reloc-bad" ""
     run_dump_test "pcrel"
 
index a01c006f2ca5981dc22d130f58dfffe384923e64..79617b9d1dd91d4ed12d9e7ef54fcf35ab4b96bb 100644 (file)
@@ -13,10 +13,10 @@ OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
 
 RELOCATION RECORDS FOR \[\.movl\]:
 OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
-0+12[[:space:]]+PCREL64I[[:space:]]+esym
-0+22[[:space:]]+PCREL64I[[:space:]]+esym\+0x0+20
-0+32[[:space:]]+PCREL64I[[:space:]]+esym
-0+42[[:space:]]+PCREL64I[[:space:]]+esym-0x0+20
+0+11[[:space:]]+PCREL64I[[:space:]]+esym
+0+21[[:space:]]+PCREL64I[[:space:]]+esym\+0x0+20
+0+31[[:space:]]+PCREL64I[[:space:]]+esym
+0+41[[:space:]]+PCREL64I[[:space:]]+esym-0x0+20
 
 RELOCATION RECORDS FOR \[\.data8\]:
 OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
diff --git a/gas/testsuite/gas/ia64/reloc-mlx.d b/gas/testsuite/gas/ia64/reloc-mlx.d
new file mode 100644 (file)
index 0000000..cd210f6
--- /dev/null
@@ -0,0 +1,8 @@
+#objdump: -r
+#name: ia64 mlx reloc
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
+0+1[[:space:]]+PCREL60B[[:space:]]+bar
diff --git a/gas/testsuite/gas/ia64/reloc-mlx.s b/gas/testsuite/gas/ia64/reloc-mlx.s
new file mode 100644 (file)
index 0000000..1cab555
--- /dev/null
@@ -0,0 +1,7 @@
+        .text
+        .proc foo#
+foo:
+        .mlx
+        mov r25 = r0
+        brl.call.sptk.many b0 = bar#
+        .endp foo#
This page took 0.032895 seconds and 4 git commands to generate.