gas/
authorThomas Schwinge <tschwinge@gnu.org>
Wed, 21 Mar 2012 08:58:40 +0000 (08:58 +0000)
committerThomas Schwinge <tschwinge@gnu.org>
Wed, 21 Mar 2012 08:58:40 +0000 (08:58 +0000)
[SH] Support the .uaquad and .8byte directives also for non-sh64
configurations.

* config/tc-sh.c (sh_cons_fix_new, md_apply_fix) [!HAVE_SH64]: Handle
BFD_RELOC_64.
* doc/c-sh64.texi (SH64 Machine Directives): Move .uaquad
description...
* doc/c-sh.texi (SH Machine Directives): ... here.

gas/ChangeLog
gas/config/tc-sh.c
gas/doc/c-sh.texi
gas/doc/c-sh64.texi

index b6fe7e3f871969c815f5c55c5457cead81c3d9e1..8402be4a7ff5fae273e8cd93a3343ac4c82f62d4 100644 (file)
@@ -1,3 +1,14 @@
+2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
+
+       [SH] Support the .uaquad and .8byte directives also for non-sh64
+       configurations.
+
+       * config/tc-sh.c (sh_cons_fix_new, md_apply_fix) [!HAVE_SH64]: Handle
+       BFD_RELOC_64.
+       * doc/c-sh64.texi (SH64 Machine Directives): Move .uaquad
+       description...
+       * doc/c-sh.texi (SH Machine Directives): ... here.
+
 2012-03-20  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-arm.c (do_vmrs): Accept priviledged mode VFP system
 2012-03-20  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-arm.c (do_vmrs): Accept priviledged mode VFP system
index 15a41283800ef86f7ed1c495f7ab98dc0f024141..4db1a0913602aaf18d1390cc315f6db0fbdef649 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-sh.c -- Assemble code for the Renesas / SuperH SH
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 /* tc-sh.c -- Assemble code for the Renesas / SuperH SH
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -789,11 +789,9 @@ sh_cons_fix_new (fragS *frag, int off, int size, expressionS *exp)
        r_type = BFD_RELOC_32;
        break;
 
        r_type = BFD_RELOC_32;
        break;
 
-#ifdef HAVE_SH64
       case 8:
        r_type = BFD_RELOC_64;
        break;
       case 8:
        r_type = BFD_RELOC_64;
        break;
-#endif
 
       default:
        goto error;
 
       default:
        goto error;
@@ -3968,6 +3966,11 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
      the other symbol.  We have to adjust the relocation type here.  */
   if (fixP->fx_pcrel)
     {
      the other symbol.  We have to adjust the relocation type here.  */
   if (fixP->fx_pcrel)
     {
+#ifndef HAVE_SH64
+      /* Safeguard; this must not occur for non-sh64 configurations.  */
+      gas_assert (fixP->fx_r_type != BFD_RELOC_64);
+#endif
+
       switch (fixP->fx_r_type)
        {
        default:
       switch (fixP->fx_r_type)
        {
        default:
@@ -4166,6 +4169,12 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
       buf[highbyte] |= (val >> 8) & 0xf;
       break;
 
       buf[highbyte] |= (val >> 8) & 0xf;
       break;
 
+#ifndef HAVE_SH64
+    case BFD_RELOC_64:
+      apply_full_field_fix (fixP, buf, *valP, 8);
+      break;
+#endif
+
     case BFD_RELOC_32:
     case BFD_RELOC_32_PCREL:
       apply_full_field_fix (fixP, buf, val, 4);
     case BFD_RELOC_32:
     case BFD_RELOC_32_PCREL:
       apply_full_field_fix (fixP, buf, val, 4);
index 438ac5fd5ee3052af2f0b1e1036010dc25b4c3e6..aff68307c336ecdfe8cd881a481dd9f57797fcd4 100644 (file)
@@ -1,5 +1,5 @@
 @c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2001, 2003, 2004,
 @c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2001, 2003, 2004,
-@c 2005, 2008, 2010, 2011  Free Software Foundation, Inc.
+@c 2005, 2008, 2010, 2011, 2012  Free Software Foundation, Inc.
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 @page
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 @page
@@ -210,13 +210,16 @@ conventional architectures at the same frequency.
 @cindex machine directives, SH
 @cindex @code{uaword} directive, SH
 @cindex @code{ualong} directive, SH
 @cindex machine directives, SH
 @cindex @code{uaword} directive, SH
 @cindex @code{ualong} directive, SH
+@cindex @code{uaquad} directive, SH
 
 @table @code
 @item uaword
 @itemx ualong
 
 @table @code
 @item uaword
 @itemx ualong
-@code{@value{AS}} will issue a warning when a misaligned @code{.word} or
-@code{.long} directive is used.  You may use @code{.uaword} or
-@code{.ualong} to indicate that the value is intentionally misaligned.
+@itemx uaquad
+@code{@value{AS}} will issue a warning when a misaligned @code{.word},
+@code{.long}, or @code{.quad} directive is used.  You may use
+@code{.uaword}, @code{.ualong}, or @code{.uaquad} to indicate that the
+value is intentionally misaligned.
 @end table
 
 @node SH Opcodes
 @end table
 
 @node SH Opcodes
index 8138c1ffa1b858f533e7ba9c8208f2aa3c6eda1c..cc52cbc6ed6b77cea1d9216516c8eae1eee8c061 100644 (file)
@@ -1,4 +1,4 @@
-@c Copyright (C) 2002, 2003, 2008, 2011 Free Software Foundation, Inc.
+@c Copyright (C) 2002, 2003, 2008, 2011, 2012 Free Software Foundation, Inc.
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 @page
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 @page
@@ -188,10 +188,6 @@ Specify the ABI for the following instructions.  Note that you cannot use
 this directive unless you specified an ABI on the command line, and the 
 ABIs specified must match.
 
 this directive unless you specified an ABI on the command line, and the 
 ABIs specified must match.
 
-@item .uaquad
-Like .uaword and .ualong, this allows you to specify an intentionally
-unaligned quadword (64 bit word).
-
 @end table
 
 @node SH64 Opcodes
 @end table
 
 @node SH64 Opcodes