aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2012-03-21 08:58:40 +0000
committerThomas Schwinge <tschwinge@gnu.org>2012-03-21 08:58:40 +0000
commit32b9ff0d14a1ca3a9bc0fbee86d676b3fa08561b (patch)
tree65d5f82543b2a3fcb91791957d50ba514a00a752 /gas/config/tc-sh.c
parentadcadaab4ab9b7dbf1a911188be4f61761cae654 (diff)
downloadgdb-32b9ff0d14a1ca3a9bc0fbee86d676b3fa08561b.zip
gdb-32b9ff0d14a1ca3a9bc0fbee86d676b3fa08561b.tar.gz
gdb-32b9ff0d14a1ca3a9bc0fbee86d676b3fa08561b.tar.bz2
gas/
[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.
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r--gas/config/tc-sh.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 15a4128..4db1a09 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -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,
- 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.
@@ -789,11 +789,9 @@ sh_cons_fix_new (fragS *frag, int off, int size, expressionS *exp)
r_type = BFD_RELOC_32;
break;
-#ifdef HAVE_SH64
case 8:
r_type = BFD_RELOC_64;
break;
-#endif
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)
{
+#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:
@@ -4166,6 +4169,12 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
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);