aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-02-27 18:30:47 +0000
committerIan Lance Taylor <ian@airs.com>1997-02-27 18:30:47 +0000
commit0f68bf0a91880b7dab3441f09bc5814f5780e198 (patch)
treebe29bf400d05bc6d1d024cd687c2334edba3d296 /gas
parentc4c9112ad8ae4336726a2399af501dc616cc8e5c (diff)
downloadgdb-0f68bf0a91880b7dab3441f09bc5814f5780e198.zip
gdb-0f68bf0a91880b7dab3441f09bc5814f5780e198.tar.gz
gdb-0f68bf0a91880b7dab3441f09bc5814f5780e198.tar.bz2
* 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/gasp.c46
2 files changed, 44 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 546ec5e..ecd6ef7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/gasp.c b/gas/gasp.c
index db624f5..27efb05 100644
--- a/gas/gasp.c
+++ b/gas/gasp.c
@@ -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);