2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 7 Oct 2008 14:21:59 +0000 (14:21 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 7 Oct 2008 14:21:59 +0000 (14:21 +0000)
* 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.

gas/ChangeLog
gas/config/tc-mmix.h
gas/doc/internals.texi
gas/read.c
gas/symbols.c

index 000667f917ee4e02155ddc535be81d1a176a19cd..14811cf91f5330028c758635c63594f9e59eed95 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
 2008-10-06  Bob Wilson  <bob.wilson@acm.org>
 
        * doc/as.texinfo (Local): New description of ELF .local directive.
index 0e72d98f057f49b41a433681bd158ce25281f1bb..1fa34636faf2b037de8a2aac0252707c40b1353a 100644 (file)
@@ -224,3 +224,6 @@ extern void mmix_md_do_align (int, char *, int, int);
 
 /* This target is buggy, and sets fix size too large.  */
 #define TC_FX_SIZE_SLACK(FIX) 6
+
+/* MMIX has global register symbols.  */
+#define TC_GLOBAL_REGISTER_SYMBOL_OK
index 7c6172c5f840fc67fb342ee33b12c8ff1055911a..89e91980aeb2deceb616988528c357586c8d919f 100644 (file)
@@ -1325,6 +1325,11 @@ This macro is evaluated for any fixup with a @code{fx_subsy} that
 @code{fixup_segment} cannot reduce to a number.  If the macro returns
 @code{false} an error will be reported.
 
+@item TC_GLOBAL_REGISTER_SYMBOL_OK
+@cindex TC_GLOBAL_REGISTER_SYMBOL_OK
+Define this macro if global register symbols are supported. The default
+is to disallow global register symbols.
+
 @item MD_APPLY_SYM_VALUE (@var{fix})
 @cindex MD_APPLY_SYM_VALUE
 This macro controls whether the symbol value becomes part of the value passed
index db801bcf6b7042d7cf0f4c984f3bb68ba8b26d40..121c97ad1c574bab75c8c98aca693cb888f097b1 100644 (file)
@@ -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);
index 84f394cd09e1f1a5998a30b2cd5a466658e313af..7e4f982f388dc2529550374975e25142ebf49f4c 100644 (file)
@@ -2191,12 +2191,14 @@ S_SET_EXTERNAL (symbolS *s)
                     _("section symbols are already global"));
       return;
     }
+#ifndef TC_GLOBAL_REGISTER_SYMBOL_OK
   if (S_GET_SEGMENT (s) == reg_section)
     {
       as_bad ("can't make register symbol `%s' global",
              S_GET_NAME (s));
       return;
     }
+#endif
   s->bsym->flags |= BSF_GLOBAL;
   s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
 
This page took 0.030538 seconds and 4 git commands to generate.