gas/ acinclude.m4 aclocal.m4 app.c app.o as.c as.h as.h.cvs asintl.h as-new as.o atof-generic.c atof-generic.o atof-ieee.o autom4te.cache bignum.h bit_fix.h cgen.c cgen.h ChangeLog ChangeLog-0001 ChangeLog-0203 ChangeLog.~1.2755.~ ChangeLog-9295 ChangeLog-9697 ChangeLog-9899 cond.c cond.o config config.cache config.h config.in config.log config.status configure configure.in configure.tgt CONTRIBUTORS COPYING CVS debug.c DEP2 DEPDIR depend.c depend.o dep-in.sed DEPOBJ dep.sed DEPTC doc dw2gencfi.c dw2gencfi.h dw2gencfi.o dwarf2dbg.c dwarf2dbg.h dwarf2dbg.o ecoff.c ecoff.h ecoff.o ehopt.c ehopt.o emul.h emul-target.h expr.c expr.c.cvs expr.h expr.o flonum-copy.c flonum-copy.o flonum.h flonum-konst.c flonum-konst.o flonum-mult.c flonum-mult.o frags.c frags.h frags.o gdbinit.in hash.c hash.h hash.o input-file.c input-file.h input-file.o input-scrub.c input-scrub.o itbl-cpu.h itbl-lex.h itbl-lex.l itbl-ops.c itbl-ops.h itbl-parse.y libtool listing.c listing.h listing.o literal.c literal.o long.s macro.c macro.c.bak macro.h macro.o MAINTAINERS Makefile Makefile.am Makefile.in messages.c messages.o NEWS obj-coff.o obj-format.h obj.h output-file.c output-file.h output-file.o po read.c read.h README read.o sb.c sb.h sb.o site.bak site.exp stabs.c stabs.o stamp-h1 stamp-h.in struc-symbol.h subsegs.c subsegs.h subsegs.o symbols.c symbols.h symbols.o targ-cpu.h targ-env.h tc.h tc-z80.o testsuite write.c write.h write.o config/tc-z80.c (z80_start_line_hook): issue an error when redefining a symbol with equ acinclude.m4 aclocal.m4 app.c app.o as.c as.h as.h.cvs asintl.h as-new as.o atof-generic.c atof-generic.o atof-ieee.o autom4te.cache bignum.h bit_fix.h cgen.c cgen.h ChangeLog ChangeLog-0001 ChangeLog-0203 ChangeLog.~1.2755.~ ChangeLog-9295 ChangeLog-9697 ChangeLog-9899 cond.c cond.o config config.cache config.h config.in config.log config.status configure configure.in configure.tgt CONTRIBUTORS COPYING CVS debug.c DEP2 DEPDIR depend.c depend.o dep-in.sed DEPOBJ dep.sed DEPTC doc dw2gencfi.c dw2gencfi.h dw2gencfi.o dwarf2dbg.c dwarf2dbg.h dwarf2dbg.o ecoff.c ecoff.h ecoff.o ehopt.c ehopt.o emul.h emul-target.h expr.c expr.c.cvs expr.h expr.o flonum-copy.c flonum-copy.o flonum.h flonum-konst.c flonum-konst.o flonum-mult.c flonum-mult.o frags.c frags.h frags.o gdbinit.in hash.c hash.h hash.o input-file.c input-file.h input-file.o input-scrub.c input-scrub.o itbl-cpu.h itbl-lex.h itbl-lex.l itbl-ops.c itbl-ops.h itbl-parse.y libtool listing.c listing.h listing.o literal.c literal.o long.s macro.c macro.c.bak macro.h macro.o MAINTAINERS Makefile Makefile.am Makefile.in messages.c messages.o NEWS obj-coff.o obj-format.h obj.h output-file.c output-file.h output-file.o po read.c read.h README read.o sb.c sb.h sb.o site.bak site.exp stabs.c stabs.o stamp-h1 stamp-h.in struc-symbol.h subsegs.c subsegs.h subsegs.o symbols.c symbols.h symbols.o targ-cpu.h targ-env.h tc.h tc-z80.o testsuite write.c write.h write.o doc/as.texinfo(equ<z80>): mention difference with .equiv acinclude.m4 aclocal.m4 app.c app.o as.c as.h as.h.cvs asintl.h as-new as.o atof-generic.c atof-generic.o atof-ieee.o autom4te.cache bignum.h bit_fix.h cgen.c cgen.h ChangeLog ChangeLog-0001 ChangeLog-0203 ChangeLog.~1.2755.~ ChangeLog-9295 ChangeLog-9697 ChangeLog-9899 cond.c cond.o config config.cache config.h config.in config.log config.status configure configure.in configure.tgt CONTRIBUTORS COPYING CVS debug.c DEP2 DEPDIR depend.c depend.o dep-in.sed DEPOBJ dep.sed DEPTC doc dw2gencfi.c dw2gencfi.h dw2gencfi.o dwarf2dbg.c dwarf2dbg.h dwarf2dbg.o ecoff.c ecoff.h ecoff.o ehopt.c ehopt.o emul.h emul-target.h expr.c expr.c.cvs expr.h expr.o flonum-copy.c flonum-copy.o flonum.h flonum-konst.c flonum-konst.o flonum-mult.c flonum-mult.o frags.c frags.h frags.o gdbinit.in hash.c hash.h hash.o input-file.c input-file.h input-file.o input-scrub.c input-scrub.o itbl-cpu.h itbl-lex.h itbl-lex.l itbl-ops.c itbl-ops.h itbl-parse.y libtool listing.c listing.h listing.o literal.c literal.o long.s macro.c macro.c.bak macro.h macro.o MAINTAINERS Makefile Makefile.am Makefile.in messages.c messages.o NEWS obj-coff.o obj-format.h obj.h output-file.c output-file.h output-file.o po read.c read.h README read.o sb.c sb.h sb.o site.bak site.exp stabs.c stabs.o stamp-h1 stamp-h.in struc-symbol.h subsegs.c subsegs.h subsegs.o symbols.c symbols.h symbols.o targ-cpu.h targ-env.h tc.h tc-z80.o testsuite write.c write.h write.o doc/as.texinfo(err): fix typo acinclude.m4 aclocal.m4 app.c app.o as.c as.h as.h.cvs asintl.h as-new as.o atof-generic.c atof-generic.o atof-ieee.o autom4te.cache bignum.h bit_fix.h cgen.c cgen.h ChangeLog ChangeLog-0001 ChangeLog-0203 ChangeLog.~1.2755.~ ChangeLog-9295 ChangeLog-9697 ChangeLog-9899 cond.c cond.o config config.cache config.h config.in config.log config.status configure configure.in configure.tgt CONTRIBUTORS COPYING CVS debug.c DEP2 DEPDIR depend.c depend.o dep-in.sed DEPOBJ dep.sed DEPTC doc dw2gencfi.c dw2gencfi.h dw2gencfi.o dwarf2dbg.c dwarf2dbg.h dwarf2dbg.o ecoff.c ecoff.h ecoff.o ehopt.c ehopt.o emul.h emul-target.h expr.c expr.c.cvs expr.h expr.o flonum-copy.c flonum-copy.o flonum.h flonum-konst.c flonum-konst.o flonum-mult.c flonum-mult.o frags.c frags.h frags.o gdbinit.in hash.c hash.h hash.o input-file.c input-file.h input-file.o input-scrub.c input-scrub.o itbl-cpu.h itbl-lex.h itbl-lex.l itbl-ops.c itbl-ops.h itbl-parse.y libtool listing.c listing.h listing.o literal.c literal.o long.s macro.c macro.c.bak macro.h macro.o MAINTAINERS Makefile Makefile.am Makefile.in messages.c messages.o NEWS obj-coff.o obj-format.h obj.h output-file.c output-file.h output-file.o po read.c read.h README read.o sb.c sb.h sb.o site.bak site.exp stabs.c stabs.o stamp-h1 stamp-h.in struc-symbol.h subsegs.c subsegs.h subsegs.o symbols.c symbols.h symbols.o targ-cpu.h targ-env.h tc.h tc-z80.o testsuite write.c write.h write.o doc/c-z80.texi(equ): redefining a symbol with equ is no longer allowed
This commit is contained in:
parent
55f6ca0f15
commit
f9eb6721c3
|
@ -1,3 +1,12 @@
|
||||||
|
2005-11-26 Arnold Metselaar <arnoldm@sourceware.org>
|
||||||
|
|
||||||
|
* config/tc-z80.c (z80_start_line_hook): issue an error when
|
||||||
|
redefining a symbol with equ
|
||||||
|
* doc/as.texinfo(equ<z80>): mention difference with .equiv
|
||||||
|
* doc/as.texinfo(err): fix typo
|
||||||
|
* doc/c-z80.texi(equ): redefining a symbol with equ is no longer
|
||||||
|
allowed
|
||||||
|
|
||||||
2005-11-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
2005-11-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||||
|
|
||||||
Bug gas/1896
|
Bug gas/1896
|
||||||
|
|
|
@ -267,6 +267,7 @@ z80_start_line_hook (void)
|
||||||
{
|
{
|
||||||
char c, *rest, *line_start;
|
char c, *rest, *line_start;
|
||||||
int len;
|
int len;
|
||||||
|
symbolS * symbolP;
|
||||||
|
|
||||||
line_start = input_line_pointer;
|
line_start = input_line_pointer;
|
||||||
LISTING_NEWLINE ();
|
LISTING_NEWLINE ();
|
||||||
|
@ -293,10 +294,14 @@ z80_start_line_hook (void)
|
||||||
if (line_start[-1] == '\n')
|
if (line_start[-1] == '\n')
|
||||||
bump_line_counters ();
|
bump_line_counters ();
|
||||||
/* Most Z80 assemblers require the first definition of a
|
/* Most Z80 assemblers require the first definition of a
|
||||||
label to use "EQU" and redefinitions to have "DEFL".
|
label to use "EQU" and redefinitions to have "DEFL". */
|
||||||
That does not fit the way GNU as deals with labels, so
|
if (len == 3 && (symbolP = symbol_find (line_start)) != NULL)
|
||||||
GNU as is more permissive. */
|
{
|
||||||
equals (line_start, TRUE);
|
if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
|
||||||
|
as_bad (_("symbol `%s' is already defined"), line_start);
|
||||||
|
}
|
||||||
|
/* All symbols may be redefined. */
|
||||||
|
equals (line_start, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -4324,6 +4324,7 @@ The syntax for @code{equ} on the HPPA is
|
||||||
The syntax for @code{equ} on the Z80 is
|
The syntax for @code{equ} on the Z80 is
|
||||||
@samp{@var{symbol} equ @var{expression}}.
|
@samp{@var{symbol} equ @var{expression}}.
|
||||||
On the Z80 it is an eror if @var{symbol} is already defined,
|
On the Z80 it is an eror if @var{symbol} is already defined,
|
||||||
|
but the symbol is not protected from later redefinition,
|
||||||
compare @xref{Equiv}.
|
compare @xref{Equiv}.
|
||||||
@end ifset
|
@end ifset
|
||||||
|
|
||||||
|
@ -4357,7 +4358,7 @@ value is taken.
|
||||||
@cindex @code{err} directive
|
@cindex @code{err} directive
|
||||||
If @command{@value{AS}} assembles a @code{.err} directive, it will print an error
|
If @command{@value{AS}} assembles a @code{.err} directive, it will print an error
|
||||||
message and, unless the @option{-Z} option was used, it will not generate an
|
message and, unless the @option{-Z} option was used, it will not generate an
|
||||||
object file. This can be used to signal error an conditionally compiled code.
|
object file. This can be used to signal an error in conditionally compiled code.
|
||||||
|
|
||||||
@node Error
|
@node Error
|
||||||
@section @code{.error "@var{string}"}
|
@section @code{.error "@var{string}"}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
@chapter Z80 Dependent Features
|
@chapter Z80 Dependent Features
|
||||||
@end ifset
|
@end ifset
|
||||||
|
|
||||||
@c DO-NOT-COMMIT
|
|
||||||
|
|
||||||
@ifclear GENERIC
|
@ifclear GENERIC
|
||||||
@node Machine Dependencies
|
@node Machine Dependencies
|
||||||
|
@ -168,9 +167,9 @@ Fill @var{count} bytes in the object file with @var{value}, if
|
||||||
|
|
||||||
@item @var{symbol} equ @var{expression}
|
@item @var{symbol} equ @var{expression}
|
||||||
@itemx @var{symbol} defl @var{expression}
|
@itemx @var{symbol} defl @var{expression}
|
||||||
These directives set the value of @var{symbol} to @var{expression}. To
|
These directives set the value of @var{symbol} to @var{expression}. If
|
||||||
keep code portable to other assemblers it is best to use @samp{equ} for
|
@code{equ} is used, it is an error if @var{symbol} is already defined.
|
||||||
the first definition and @samp{defl} for redefinitions.
|
Symbols defined with @code{equ} are not protected from redefinition.
|
||||||
|
|
||||||
@item set
|
@item set
|
||||||
This is a normal instruction on Z80, and not an assembler directive.
|
This is a normal instruction on Z80, and not an assembler directive.
|
||||||
|
|
Loading…
Reference in New Issue