* gasp.c (hash_add_to_string_table): Correct misspelling in error

message, and add newline.
	(process_file): Don't process assignments in the label if this is
	a equ or assign pseudo-op.
	(process_pseudo_op): Swap first argument to do_assign for K_ASSIGN
	and K_EQU, to match documentation.
This commit is contained in:
Ian Lance Taylor 1997-02-27 18:30:47 +00:00
parent c4c9112ad8
commit 0f68bf0a91
2 changed files with 44 additions and 11 deletions

View file

@ -1,3 +1,12 @@
Thu Feb 27 13:29:04 1997 Ian Lance Taylor <ian@cygnus.com>
* gasp.c (hash_add_to_string_table): Correct misspelling in error
message, and add newline.
(process_file): Don't process assignments in the label if this is
a equ or assign pseudo-op.
(process_pseudo_op): Swap first argument to do_assign for K_ASSIGN
and K_EQU, to match documentation.
Thu Feb 27 12:00:03 1997 Michael Meissner <meissner@cygnus.com>
* config/obj-coff.c (obj_coff_section): Add 'r' section attribute

View file

@ -1,5 +1,5 @@
/* gasp.c - Gnu assembler preprocessor main program.
Copyright (C) 1994, 95, 1996 Free Software Foundation, Inc.
Copyright (C) 1994, 95, 96, 1997 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@ -470,7 +470,7 @@ hash_add_to_string_table (tab, key, name, again)
if (ptr->value.s.len)
{
if (!again)
ERROR ((stderr, "redefintion not allowed"));
ERROR ((stderr, "redefinition not allowed\n"));
}
ptr->type = hash_string;
@ -1917,19 +1917,43 @@ process_file ()
{
l = grab_label (&line, &label_in);
sb_reset (&label);
if (label_in.len)
{
/* Munge any label */
process_assigns (0, &label_in, &label);
}
if (line.ptr[l] == ':')
l++;
while (ISWHITE (line.ptr[l]) && l < line.len)
l++;
if (label_in.len)
{
int do_assigns;
/* Munge the label, unless this is EQU or ASSIGN. */
do_assigns = 1;
if (l < line.len
&& (line.ptr[l] == '.' || alternate || mri))
{
int lx = l;
if (line.ptr[lx] == '.')
++lx;
if (lx + 3 <= line.len
&& strncasecmp ("EQU", line.ptr + lx, 3) == 0
&& (lx + 3 == line.len
|| ! ISFIRSTCHAR (line.ptr[lx + 3])))
do_assigns = 0;
else if (lx + 6 <= line.len
&& strncasecmp ("ASSIGN", line.ptr + lx, 6) == 0
&& (lx + 6 == line.len
|| ! ISFIRSTCHAR (line.ptr[lx + 6])))
do_assigns = 0;
}
if (do_assigns)
process_assigns (0, &label_in, &label);
else
sb_add_sb (&label, &label_in);
}
if (l < line.len)
{
if (process_pseudo_op (l, &line, &acc))
@ -3308,7 +3332,7 @@ process_pseudo_op (idx, line, acc)
do_sdata (idx, line, 'z');
return 1;
case K_ASSIGN:
do_assign (1, 0, line);
do_assign (0, 0, line);
return 1;
case K_AIF:
do_aif (idx, line);
@ -3326,7 +3350,7 @@ process_pseudo_op (idx, line, acc)
do_aendr ();
return 1;
case K_EQU:
do_assign (0, idx, line);
do_assign (1, idx, line);
return 1;
case K_ALIGN:
do_align (idx, line);