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.
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++;
}
}
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);
{
/* 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++;
{
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)
{
}
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);
if (isalpha (x) || x == '_' || x == '$')
chartype[x] |= FIRSTBIT;
+ if (mri && x == '.')
+ chartype[x] |= FIRSTBIT;
+
if (isdigit (x) || isalpha (x) || x == '_' || x == '$')
chartype[x] |= NEXTBIT;
break;
case 'M':
mri = 1;
+ comment_char = ';';
break;
case 'h':
show_help ();