* read.c (get_line_sb): Accept any eol marker while scanning macros.

This commit is contained in:
Richard Henderson 1997-10-15 03:56:30 +00:00
parent 10b8f7f036
commit 08ce71f5c4
2 changed files with 61 additions and 7 deletions

View File

@ -1,3 +1,7 @@
Tue Oct 14 20:50:58 1997 Richard Henderson <rth@cygnus.com>
* read.c (get_line_sb): Accept any eol marker while scanning macros.
Tue Oct 14 19:12:45 1997 Richard Henderson <rth@cygnus.com>
* config/tc-alpha.h (DIFF_EXPR_OK): Define.

View File

@ -1551,7 +1551,8 @@ s_app_file (appfile)
/* If this is a fake .appfile, a fake newline was inserted into
the buffer. Passing -2 to new_logical_line tells it to
account for it. */
new_logical_line (s, appfile ? -2 : -1);
int may_omit
= (! new_logical_line (s, appfile ? -2 : -1) && appfile);
/* In MRI mode, the preprocessor may have inserted an extraneous
backquote. */
@ -1561,15 +1562,18 @@ s_app_file (appfile)
++input_line_pointer;
demand_empty_rest_of_line ();
if (! may_omit)
{
#ifdef LISTING
if (listing)
listing_source_file (s);
if (listing)
listing_source_file (s);
#endif
register_dependency (s);
}
register_dependency (s);
#ifdef obj_app_file
obj_app_file (s);
obj_app_file (s);
#endif
}
}
}
/* Handle the .appline pseudo-op. This is automatically generated by
@ -2181,7 +2185,8 @@ get_line_sb (line)
}
sb_add_char (line, *input_line_pointer++);
}
while (input_line_pointer < buffer_limit && *input_line_pointer == '\n')
while (input_line_pointer < buffer_limit
&& is_end_of_line[(unsigned char) *input_line_pointer])
{
if (input_line_pointer[-1] == '\n')
bump_line_counters ();
@ -3236,6 +3241,31 @@ emit_expr (exp, nbytes)
if (need_pass_2)
return;
#ifndef NO_LISTING
#ifdef OBJ_ELF
/* When gcc emits DWARF 1 debugging pseudo-ops, a line number will
appear as a four byte positive constant in the .line section,
followed by a 2 byte 0xffff. Look for that case here. */
{
static int dwarf_line = -1;
if (strcmp (segment_name (now_seg), ".line") != 0)
dwarf_line = -1;
else if (dwarf_line >= 0
&& nbytes == 2
&& exp->X_op == O_constant
&& (exp->X_add_number == -1 || exp->X_add_number == 0xffff))
listing_source_line ((unsigned int) dwarf_line);
else if (nbytes == 4
&& exp->X_op == O_constant
&& exp->X_add_number >= 0)
dwarf_line = exp->X_add_number;
else
dwarf_line = -1;
}
#endif
#endif
op = exp->X_op;
/* Allow `.word 0' in the absolute section. */
@ -4254,6 +4284,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
register int append_zero; /* 0: don't append '\0', else 1 */
{
register unsigned int c;
char *start;
#ifdef md_flush_pending_output
md_flush_pending_output ();
@ -4283,6 +4314,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
{
case '\"':
++input_line_pointer; /*->1st char of string. */
start = input_line_pointer;
while (is_a_char (c = next_char_of_string ()))
{
FRAG_APPEND_1_CHAR (c);
@ -4292,6 +4324,24 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
FRAG_APPEND_1_CHAR (0);
}
know (input_line_pointer[-1] == '\"');
#ifndef NO_LISTING
#ifdef OBJ_ELF
/* In ELF, when gcc is emitting DWARF 1 debugging output, it
will emit .string with a filename in the .debug_sfnames
section to indicate a file name. I don't know if this
will work for compilers other than gcc, and I don't know
if it will work for DWARF 2. */
if (strcmp (segment_name (now_seg), ".debug_sfnames") == 0)
{
c = input_line_pointer[-1];
input_line_pointer[-1] = '\0';
listing_source_file (start);
input_line_pointer[-1] = c;
}
#endif
#endif
break;
case '<':
input_line_pointer++;