aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-09-18 21:53:40 +0000
committerIan Lance Taylor <ian@airs.com>1995-09-18 21:53:40 +0000
commitf9680a0598d7a69750094b5efaee971406ceb083 (patch)
tree9f2283bd1d4a765b27de63d770ddc0421f7ce27d
parent3b06beb75730bf894e2a9621ab48023806b05c2e (diff)
downloadgdb-f9680a0598d7a69750094b5efaee971406ceb083.zip
gdb-f9680a0598d7a69750094b5efaee971406ceb083.tar.gz
gdb-f9680a0598d7a69750094b5efaee971406ceb083.tar.bz2
* read.c (mri_comment_field): New function.
(mri_comment_end): New function. (s_align_bytes): Use mri_comment_field. (s_align_ptwo, s_comm, s_mri_common, s_fail, s_globl): Likewise. (s_float_space, s_struct): Likewise. (s_space): Use mri_comment_field rather than doing it by hand. (cons_worker, equals): Likewise. (s_end): Ignore comments starting with '*' or '!'. * read.h (mri_comment_field): Declare. (mri_comment_end): Declare. * cond.c (s_if): Use mri_comment_field. * config/tc-m68k.c (s_chip, s_reg): Likewise.
-rw-r--r--gas/ChangeLog13
-rw-r--r--gas/config/tc-m68k.c18
2 files changed, 26 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fd3cde6..c8df738 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,18 @@
Mon Sep 18 15:22:28 1995 Ian Lance Taylor <ian@cygnus.com>
+ * read.c (mri_comment_field): New function.
+ (mri_comment_end): New function.
+ (s_align_bytes): Use mri_comment_field.
+ (s_align_ptwo, s_comm, s_mri_common, s_fail, s_globl): Likewise.
+ (s_float_space, s_struct): Likewise.
+ (s_space): Use mri_comment_field rather than doing it by hand.
+ (cons_worker, equals): Likewise.
+ (s_end): Ignore comments starting with '*' or '!'.
+ * read.h (mri_comment_field): Declare.
+ (mri_comment_end): Declare.
+ * cond.c (s_if): Use mri_comment_field.
+ * config/tc-m68k.c (s_chip, s_reg): Likewise.
+
* write.c (fixup_segment): Handle ABS-sym in -sym case rather than
sym-sym case.
* config/obj-coff.c (fixup_segment): Likewise. Permit negative
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 0e8fa25..e4a1ff8 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -4232,7 +4232,14 @@ static void
s_chip (ignore)
int ignore;
{
+ char *stop = NULL;
+ char stopc;
+
+ if (flag_mri)
+ stop = mri_comment_field (&stopc);
mri_chip ();
+ if (flag_mri)
+ mri_comment_end (stop, stopc);
demand_empty_rest_of_line ();
}
@@ -4493,6 +4500,8 @@ s_reg (ignore)
int c;
struct m68k_op rop;
unsigned long mask;
+ char *stop = NULL;
+ char stopc;
if (line_label == NULL)
{
@@ -4501,6 +4510,9 @@ s_reg (ignore)
return;
}
+ if (flag_mri)
+ stop = mri_comment_field (&stopc);
+
SKIP_WHITESPACE ();
s = input_line_pointer;
@@ -4556,11 +4568,7 @@ s_reg (ignore)
line_label->sy_frag = &zero_address_frag;
if (flag_mri)
- {
- /* Ignore the comment field. */
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
- ++input_line_pointer;
- }
+ mri_comment_end (stop, stopc);
demand_empty_rest_of_line ();
}