aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-10-07 14:21:59 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-10-07 14:21:59 +0000
commit97c4f2d9c95f8a9dcf3941010277428b3c0baf79 (patch)
tree6887c56bdb11855be8329174fe05c19961c899f2 /gas/read.c
parent9124fe4822e9f9bf1b746dcf987541ebb31bd67a (diff)
downloadgdb-97c4f2d9c95f8a9dcf3941010277428b3c0baf79.zip
gdb-97c4f2d9c95f8a9dcf3941010277428b3c0baf79.tar.gz
gdb-97c4f2d9c95f8a9dcf3941010277428b3c0baf79.tar.bz2
2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
* read.c (pseudo_set): Don't allow global register symbol only if TC_GLOBAL_REGISTER_SYMBOL_OK is undefined. * symbols.c (S_SET_EXTERNAL): Likewise. * config/tc-mmix.h (TC_GLOBAL_REGISTER_SYMBOL_OK): Defined. * doc/internals.texi: Document TC_GLOBAL_REGISTER_SYMBOL_OK.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gas/read.c b/gas/read.c
index db801bc..121c97a 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -3621,12 +3621,14 @@ pseudo_set (symbolS *symbolP)
break;
case O_register:
+#ifndef TC_GLOBAL_REGISTER_SYMBOL_OK
if (S_IS_EXTERNAL (symbolP))
{
as_bad ("can't equate global symbol `%s' with register name",
S_GET_NAME (symbolP));
return;
}
+#endif
S_SET_SEGMENT (symbolP, reg_section);
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
set_zero_frag (symbolP);