aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorArnold Metselaar <arnold.metselaar@planet.nl>2009-10-25 16:15:19 +0000
committerArnold Metselaar <arnold.metselaar@planet.nl>2009-10-25 16:15:19 +0000
commit3c45a255a86c02939babfaf270721cffa9189b26 (patch)
treee04d0bd128c4e6f61b575a5a27ae76e24fe983ed /gas
parent342b5fef2a66389fd88bdf72ad1a722d2c59517a (diff)
downloadgdb-3c45a255a86c02939babfaf270721cffa9189b26.zip
gdb-3c45a255a86c02939babfaf270721cffa9189b26.tar.gz
gdb-3c45a255a86c02939babfaf270721cffa9189b26.tar.bz2
* config/tc-z80.c (z80_start_line_hook): Fix parsing of 'equ' or
'defl' in cases where the space between the keyword and the expression has been scrubbed away. Do not check whether a symbol is redefined with 'equ' here; the function equals takes an argument indicating whether redefinitions are allowed. Only call LISTING_NEWLINE if needed, and then after the call to bump_line_counters.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/config/tc-z80.c17
2 files changed, 17 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c62d4f7..07888e7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,14 @@
+2009-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * config/tc-z80.c (z80_start_line_hook): Fix parsing of 'equ' or
+ 'defl' in cases where the space between the keyword and the
+ expression has been scrubbed away.
+ Do not check whether a symbol is redefined with 'equ' here;
+ the function equals takes an argument indicating whether
+ redefinitions are allowed.
+ Only call LISTING_NEWLINE if needed, and then after the call to
+ bump_line_counters.
+
2009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
* doc/as.texinfo (Overview): Move -mfix7000/-mno-fix7000 to
diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c
index d8bd59f..e2ea462 100644
--- a/gas/config/tc-z80.c
+++ b/gas/config/tc-z80.c
@@ -253,10 +253,8 @@ z80_start_line_hook (void)
{
char c, *rest, *line_start;
int len;
- symbolS * symbolP;
line_start = input_line_pointer;
- LISTING_NEWLINE ();
if (ignore_input ())
return 0;
@@ -275,20 +273,17 @@ z80_start_line_hook (void)
len = 4;
else
len = 0;
- if (len && (rest[len] == ' ' || rest[len] == '\t'))
+ if (len && (!ISALPHA(rest[len]) ) )
{
/* Handle assignment here. */
- input_line_pointer = rest + len;
if (line_start[-1] == '\n')
- bump_line_counters ();
- /* Most Z80 assemblers require the first definition of a
- label to use "EQU" and redefinitions to have "DEFL". */
- if (len == 3 && (symbolP = symbol_find (line_start)) != NULL)
{
- if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
- as_bad (_("symbol `%s' is already defined"), line_start);
+ bump_line_counters ();
+ LISTING_NEWLINE ();
}
- equals (line_start, 1);
+ input_line_pointer = rest + len - 1;
+ /* Allow redefining with "DEFL" (len == 4), but not with "EQU". */
+ equals (line_start, len == 4);
return 1;
}
else