* read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space,
s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or demand_empty_rest_of_line before mri_comment_end. (equals): Check garbage after expression before mri_comment_end in MRI mode. PR16551
This commit is contained in:
parent
c076f1ed1c
commit
98b5b2d6d3
2 changed files with 57 additions and 46 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
1998-08-13 Vladimir N. Makarov <vmakarov@cygnus.com>
|
||||||
|
|
||||||
|
* read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space,
|
||||||
|
s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or
|
||||||
|
demand_empty_rest_of_line before mri_comment_end.
|
||||||
|
(equals): Check garbage after expression before
|
||||||
|
mri_comment_end in MRI mode.
|
||||||
|
|
||||||
Thu Aug 13 15:08:42 1998 Ian Lance Taylor <ian@cygnus.com>
|
Thu Aug 13 15:08:42 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a
|
* config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a
|
||||||
|
|
87
gas/read.c
87
gas/read.c
|
@ -1297,10 +1297,10 @@ s_align (arg, bytes_p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle the .align pseudo-op on machines where ".align 4" means
|
/* Handle the .align pseudo-op on machines where ".align 4" means
|
||||||
|
@ -1347,18 +1347,18 @@ s_comm (ignore)
|
||||||
if (*input_line_pointer != ',')
|
if (*input_line_pointer != ',')
|
||||||
{
|
{
|
||||||
as_bad (_("Expected comma after symbol-name: rest of line ignored."));
|
as_bad (_("Expected comma after symbol-name: rest of line ignored."));
|
||||||
|
ignore_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
ignore_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
input_line_pointer++; /* skip ',' */
|
input_line_pointer++; /* skip ',' */
|
||||||
if ((temp = get_absolute_expression ()) < 0)
|
if ((temp = get_absolute_expression ()) < 0)
|
||||||
{
|
{
|
||||||
as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
|
as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
|
||||||
|
ignore_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
ignore_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
@ -1368,9 +1368,9 @@ s_comm (ignore)
|
||||||
{
|
{
|
||||||
as_bad (_("Ignoring attempt to re-define symbol `%s'."),
|
as_bad (_("Ignoring attempt to re-define symbol `%s'."),
|
||||||
S_GET_NAME (symbolP));
|
S_GET_NAME (symbolP));
|
||||||
|
ignore_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
ignore_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (S_GET_VALUE (symbolP))
|
if (S_GET_VALUE (symbolP))
|
||||||
|
@ -1395,10 +1395,10 @@ s_comm (ignore)
|
||||||
#endif /* not OBJ_VMS */
|
#endif /* not OBJ_VMS */
|
||||||
know (symbolP->sy_frag == &zero_address_frag);
|
know (symbolP->sy_frag == &zero_address_frag);
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
} /* s_comm() */
|
} /* s_comm() */
|
||||||
|
|
||||||
/* The MRI COMMON pseudo-op. We handle this by creating a common
|
/* The MRI COMMON pseudo-op. We handle this by creating a common
|
||||||
|
@ -1466,8 +1466,8 @@ s_mri_common (small)
|
||||||
if (S_IS_DEFINED (sym) && ! S_IS_COMMON (sym))
|
if (S_IS_DEFINED (sym) && ! S_IS_COMMON (sym))
|
||||||
{
|
{
|
||||||
as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym));
|
as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym));
|
||||||
mri_comment_end (stop, stopc);
|
|
||||||
ignore_rest_of_line ();
|
ignore_rest_of_line ();
|
||||||
|
mri_comment_end (stop, stopc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1497,9 +1497,9 @@ s_mri_common (small)
|
||||||
if (*input_line_pointer == ',')
|
if (*input_line_pointer == ',')
|
||||||
input_line_pointer += 2;
|
input_line_pointer += 2;
|
||||||
|
|
||||||
mri_comment_end (stop, stopc);
|
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
|
mri_comment_end (stop, stopc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1647,10 +1647,10 @@ s_fail (ignore)
|
||||||
else
|
else
|
||||||
as_bad (_(".fail %ld encountered"), (long) temp);
|
as_bad (_(".fail %ld encountered"), (long) temp);
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1781,10 +1781,10 @@ s_globl (ignore)
|
||||||
}
|
}
|
||||||
while (c == ',');
|
while (c == ',');
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle the MRI IRP and IRPC pseudo-ops. */
|
/* Handle the MRI IRP and IRPC pseudo-ops. */
|
||||||
|
@ -2895,10 +2895,10 @@ s_space (mult)
|
||||||
if (flag_mri && (bytes & 1) != 0)
|
if (flag_mri && (bytes & 1) != 0)
|
||||||
mri_pending_align = 1;
|
mri_pending_align = 1;
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is like s_space, but the value is a floating point number with
|
/* This is like s_space, but the value is a floating point number with
|
||||||
|
@ -2924,9 +2924,9 @@ s_float_space (float_type)
|
||||||
if (*input_line_pointer != ',')
|
if (*input_line_pointer != ',')
|
||||||
{
|
{
|
||||||
as_bad (_("missing value"));
|
as_bad (_("missing value"));
|
||||||
|
ignore_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
ignore_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2947,9 +2947,9 @@ s_float_space (float_type)
|
||||||
flen = hex_float (float_type, temp);
|
flen = hex_float (float_type, temp);
|
||||||
if (flen < 0)
|
if (flen < 0)
|
||||||
{
|
{
|
||||||
|
ignore_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
ignore_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2963,9 +2963,9 @@ s_float_space (float_type)
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
as_bad (_("Bad floating literal: %s"), err);
|
as_bad (_("Bad floating literal: %s"), err);
|
||||||
|
ignore_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
ignore_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2978,10 +2978,10 @@ s_float_space (float_type)
|
||||||
memcpy (p, temp, (unsigned int) flen);
|
memcpy (p, temp, (unsigned int) flen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle the .struct pseudo-op, as found in MIPS assemblers. */
|
/* Handle the .struct pseudo-op, as found in MIPS assemblers. */
|
||||||
|
@ -2997,9 +2997,9 @@ s_struct (ignore)
|
||||||
stop = mri_comment_field (&stopc);
|
stop = mri_comment_field (&stopc);
|
||||||
abs_section_offset = get_absolute_expression ();
|
abs_section_offset = get_absolute_expression ();
|
||||||
subseg_set (absolute_section, 0);
|
subseg_set (absolute_section, 0);
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3225,9 +3225,9 @@ cons_worker (nbytes, rva)
|
||||||
|
|
||||||
if (is_it_end_of_statement ())
|
if (is_it_end_of_statement ())
|
||||||
{
|
{
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3263,10 +3263,10 @@ cons_worker (nbytes, rva)
|
||||||
|
|
||||||
input_line_pointer--; /* Put terminator back into stream. */
|
input_line_pointer--; /* Put terminator back into stream. */
|
||||||
|
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4789,7 +4789,10 @@ equals (sym_name, reassign)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag_mri)
|
if (flag_mri)
|
||||||
|
{
|
||||||
|
ignore_rest_of_line (); /* check garbage after the expression */
|
||||||
mri_comment_end (stop, stopc);
|
mri_comment_end (stop, stopc);
|
||||||
|
}
|
||||||
} /* equals() */
|
} /* equals() */
|
||||||
|
|
||||||
/* .include -- include a file at this point. */
|
/* .include -- include a file at this point. */
|
||||||
|
@ -4894,30 +4897,30 @@ generate_file_debug ()
|
||||||
static void
|
static void
|
||||||
generate_lineno_debug ()
|
generate_lineno_debug ()
|
||||||
{
|
{
|
||||||
if (debug_type == DEBUG_STABS)
|
|
||||||
stabs_generate_asm_lineno ();
|
|
||||||
|
|
||||||
#ifdef OBJ_GENERATE_ASM_LINENO
|
|
||||||
#ifdef ECOFF_DEBUGGING
|
#ifdef ECOFF_DEBUGGING
|
||||||
/* ECOFF assemblers automatically generate
|
/* ECOFF assemblers automatically generate debugging information.
|
||||||
debugging information. FIXME: This should
|
FIXME: This should probably be handled elsewhere. */
|
||||||
probably be handled elsewhere. */
|
if (debug_type == DEBUG_UNSPECIFIED)
|
||||||
if (debug_type == DEBUG_NONE)
|
|
||||||
{
|
{
|
||||||
if (ecoff_no_current_file ())
|
if (ECOFF_DEBUGGING && ecoff_no_current_file ())
|
||||||
debug_type = DEBUG_ECOFF;
|
debug_type = DEBUG_ECOFF;
|
||||||
|
else
|
||||||
|
debug_type = DEBUG_NONE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (debug_type == DEBUG_ECOFF)
|
switch (debug_type)
|
||||||
{
|
{
|
||||||
unsigned int lineno;
|
case DEBUG_UNSPECIFIED:
|
||||||
char *s;
|
case DEBUG_NONE:
|
||||||
|
break;
|
||||||
as_where (&s, &lineno);
|
case DEBUG_STABS:
|
||||||
OBJ_GENERATE_ASM_LINENO (s, lineno);
|
stabs_generate_asm_lineno ();
|
||||||
|
break;
|
||||||
|
case DEBUG_ECOFF:
|
||||||
|
ecoff_generate_asm_lineno ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output debugging information to mark a function entry point or end point.
|
/* Output debugging information to mark a function entry point or end point.
|
||||||
|
|
Loading…
Reference in a new issue