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.
This commit is contained in:
parent
9124fe4822
commit
97c4f2d9c9
5 changed files with 22 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue