mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
* gasp.c (include_print_where_line): Always subtract 1 from
linecount before printing it. (process_file): In MRI mode, lines beginning with '*' or '!' are comments. (do_reg): In MRI mode, don't require parentheses. (do_include): In MRI mode, don't requires quotes. If the file can not be found in the include path, try opening it in the current directory. Print the file name correctly in the error message. (chartype_init): In MRI mode, set FIRSTBIT for '.'. (main): Set comment_char to ';' when entering MRI mode.
This commit is contained in:
parent
b4ec75e09f
commit
f8d6e6cd08
@ -1,5 +1,16 @@
|
||||
Fri Aug 18 10:58:09 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* gasp.c (include_print_where_line): Always subtract 1 from
|
||||
linecount before printing it.
|
||||
(process_file): In MRI mode, lines beginning with '*' or '!' are
|
||||
comments.
|
||||
(do_reg): In MRI mode, don't require parentheses.
|
||||
(do_include): In MRI mode, don't requires quotes. If the file can
|
||||
not be found in the include path, try opening it in the current
|
||||
directory. Print the file name correctly in the error message.
|
||||
(chartype_init): In MRI mode, set FIRSTBIT for '.'.
|
||||
(main): Set comment_char to ';' when entering MRI mode.
|
||||
|
||||
* config/tc-m68k.c: Include subsegs.h.
|
||||
(m68k_ip): Pass 64 rather than -1 to add_Fix in 'B' 'B' case.
|
||||
(md_pcrel_from): If fx_pcrel_adjust is 64, use -1 instead.
|
||||
|
40
gas/gasp.c
40
gas/gasp.c
@ -1276,7 +1276,7 @@ include_print_where_line (file)
|
||||
|
||||
while (p <= sp)
|
||||
{
|
||||
fprintf (file, "%s:%d ", sb_name (&p->name), p->linecount - ((p == sp) ? 1 : 0));
|
||||
fprintf (file, "%s:%d ", sb_name (&p->name), p->linecount - 1);
|
||||
p++;
|
||||
}
|
||||
}
|
||||
@ -2177,6 +2177,13 @@ process_file ()
|
||||
if (condass_on ())
|
||||
fprintf (outfile, "\n");
|
||||
}
|
||||
else if (mri
|
||||
&& (line.ptr[0] == '*'
|
||||
|| line.ptr[0] == '!'))
|
||||
{
|
||||
/* MRI line comment. */
|
||||
fprintf (outfile, sb_name (&line));
|
||||
}
|
||||
else
|
||||
{
|
||||
l = grab_label (&line, &label_in);
|
||||
@ -2325,9 +2332,15 @@ do_reg (idx, in)
|
||||
{
|
||||
/* remove reg stuff from inside parens */
|
||||
sb what;
|
||||
idx = skip_openp (idx, in);
|
||||
if (!mri)
|
||||
idx = skip_openp (idx, in);
|
||||
else
|
||||
idx = sb_skip_white (idx, in);
|
||||
sb_new (&what);
|
||||
while (idx < in->len && in->ptr[idx] != ')')
|
||||
while (idx < in->len
|
||||
&& (mri
|
||||
? ! eol (idx, in)
|
||||
: in->ptr[idx] != ')'))
|
||||
{
|
||||
sb_add_char (&what, in->ptr[idx]);
|
||||
idx++;
|
||||
@ -3836,12 +3849,22 @@ do_include (idx, in)
|
||||
{
|
||||
sb t;
|
||||
sb cat;
|
||||
char *text;
|
||||
include_path *includes;
|
||||
|
||||
sb_new (&t);
|
||||
sb_new (&cat);
|
||||
|
||||
idx = getstring (idx, in, &t);
|
||||
if (! mri)
|
||||
idx = getstring (idx, in, &t);
|
||||
else
|
||||
{
|
||||
idx = sb_skip_white (idx, in);
|
||||
while (idx < in->len && ! ISWHITE (in->ptr[idx]))
|
||||
{
|
||||
sb_add_char (&t, in->ptr[idx]);
|
||||
++idx;
|
||||
}
|
||||
}
|
||||
|
||||
for (includes = paths_head; includes; includes = includes->next)
|
||||
{
|
||||
@ -3856,7 +3879,8 @@ do_include (idx, in)
|
||||
}
|
||||
if (!includes)
|
||||
{
|
||||
FATAL ((stderr, "Can't open include file `%s'.\n", text));
|
||||
if (! new_file (sb_name (&t)))
|
||||
FATAL ((stderr, "Can't open include file `%s'.\n", sb_name (&t)));
|
||||
}
|
||||
sb_kill (&cat);
|
||||
sb_kill (&t);
|
||||
@ -3946,6 +3970,9 @@ chartype_init ()
|
||||
if (isalpha (x) || x == '_' || x == '$')
|
||||
chartype[x] |= FIRSTBIT;
|
||||
|
||||
if (mri && x == '.')
|
||||
chartype[x] |= FIRSTBIT;
|
||||
|
||||
if (isdigit (x) || isalpha (x) || x == '_' || x == '$')
|
||||
chartype[x] |= NEXTBIT;
|
||||
|
||||
@ -4567,6 +4594,7 @@ main (argc, argv)
|
||||
break;
|
||||
case 'M':
|
||||
mri = 1;
|
||||
comment_char = ';';
|
||||
break;
|
||||
case 'h':
|
||||
show_help ();
|
||||
|
Loading…
Reference in New Issue
Block a user