/* This is the Assembler Pre-Processor
- Copyright (C) 1987, 1990, 1991, 1992, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 1996
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
lex[';'] = LEX_IS_LINE_SEPARATOR;
lex[':'] = LEX_IS_COLON;
- if (! flag_mri)
+ if (! flag_m68k_mri)
{
lex['"'] = LEX_IS_STRINGQUOTE;
lex['*'] = LEX_IS_TWOCHAR_COMMENT_2ND;
}
- if (flag_mri)
+ if (flag_m68k_mri)
{
lex['\''] = LEX_IS_STRINGQUOTE;
lex[';'] = LEX_IS_COMMENT_START;
if (ch == '"')
{
UNGET (ch);
- out_string = "\n\t.appfile ";
+ if (flag_m68k_mri)
+ out_string = "\n\tappfile ";
+ else
+ out_string = "\n\t.appfile ";
old_state = 7;
state = -1;
PUT (*out_string++);
PUT (ch);
}
#endif
- else if (flag_mri && ch == '\n')
+ else if (flag_m68k_mri && ch == '\n')
{
/* Just quietly terminate the string. This permits lines like
bne label loop if we haven't reach end yet
switch (lex[ch])
{
case LEX_IS_WHITESPACE:
- if (state == 0)
- {
- /* Preserve a single whitespace character at the
- beginning of a line. */
- state = 1;
- PUT (ch);
- break;
- }
do
{
ch = GET ();
if (ch == EOF)
goto fromeof;
+ if (state == 0)
+ {
+ /* Preserve a single whitespace character at the
+ beginning of a line. */
+ state = 1;
+ UNGET (ch);
+ PUT (' ');
+ break;
+ }
+
if (IS_COMMENT (ch)
- || (state == 0 && IS_LINE_COMMENT (ch))
|| ch == '/'
|| IS_LINE_SEPARATOR (ch))
{
/* cpp never outputs a leading space before the #, so
try to avoid being confused. */
not_cpp_line = 1;
- if (flag_mri)
+ if (flag_m68k_mri)
{
/* In MRI mode, we keep these spaces. */
UNGET (ch);
not permitted between the label and the colon. */
if ((state == 2 || state == 11)
&& lex[ch] == LEX_IS_COLON
- && ! flag_mri)
+ && ! flag_m68k_mri)
{
state = 1;
PUT (ch);
PUT (' ');
break;
case 3:
- if (flag_mri)
+ if (flag_m68k_mri)
{
/* In MRI mode, we keep these spaces. */
UNGET (ch);
goto recycle; /* Sp in operands */
case 9:
case 10:
- if (flag_mri)
+ if (flag_m68k_mri)
{
/* In MRI mode, we keep these spaces. */
state = 3;
UNGET (ch);
old_state = 4;
state = -1;
- out_string = "\t.appline ";
+ if (flag_m68k_mri)
+ out_string = "\tappline ";
+ else
+ out_string = "\t.appline ";
PUT (*out_string++);
break;
}
character, fall through. Otherwise treat it as a default
character. */
if (strchr (comment_chars, ch) == NULL
- && (! flag_mri
+ && (! flag_m68k_mri
|| (ch != '!' && ch != '*')))
goto de_fault;
- if (flag_mri
+ if (flag_m68k_mri
&& (ch == '!' || ch == '*')
&& state != 1
&& state != 10)
/* read.c - read a source file -
- Copyright (C) 1986, 1987, 1990, 1991, 1993, 1994
+ Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 1996
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
{"lsym", s_lsym, 0},
{"macro", s_macro, 0},
{"mexit", s_mexit, 0},
+ {"name", s_ignore, 0},
{"noformat", s_ignore, 0},
{"nolist", listing_list, 0}, /* Turn listing off */
{"nopage", listing_nopage, 0},
line_label = NULL;
- if (flag_mri
+ if (flag_m68k_mri
#ifdef LABELS_WITHOUT_COLONS
|| 1
#endif
/* In MRI mode, the EQU pseudoop must be
handled specially. */
- if (flag_mri)
+ if (flag_m68k_mri)
{
char *rest = input_line_pointer + 1;
*/
if (TC_START_LABEL(c, input_line_pointer))
{
- if (flag_mri)
+ if (flag_m68k_mri)
{
char *rest = input_line_pointer + 1;
}
#endif
-#ifndef MRI_MODE_NEEDS_PSEUDO_DOT
-#define MRI_MODE_NEEDS_PSEUDO_DOT 0
-#endif
-
- if ((flag_mri && ! MRI_MODE_NEEDS_PSEUDO_DOT)
+ if (flag_m68k_mri
#ifdef NO_PSEUDO_DOT
|| 1
#endif
}
if (pop != NULL
- || ((! flag_mri || MRI_MODE_NEEDS_PSEUDO_DOT)
- && *s == '.'))
+ || (! flag_m68k_mri && *s == '.'))
{
/*
* PSEUDO - OP.
#endif
)
{
- if (flag_mri && *input_line_pointer == '\'')
+ if (flag_m68k_mri && *input_line_pointer == '\'')
inquote = ! inquote;
input_line_pointer++;
}
HANDLE_CONDITIONAL_ASSEMBLY ();
+#ifdef tc_unrecognized_line
+ if (tc_unrecognized_line (c))
+ continue;
+#endif
+
/* as_warn("Junk character %d.",c); Now done by ignore_rest */
input_line_pointer--; /* Report unknown char as ignored. */
ignore_rest_of_line ();
char *s;
int inquote = 0;
- know (flag_mri);
+ know (flag_m68k_mri);
for (s = input_line_pointer;
((! is_end_of_line[(unsigned char) *s] && *s != ' ' && *s != '\t')
the buffer. Passing -2 to new_logical_line tells it to
account for it. */
new_logical_line (s, appfile ? -2 : -1);
+
+ /* In MRI mode, the preprocessor may have inserted an extraneous
+ backquote. */
+ if (flag_m68k_mri
+ && *input_line_pointer == '\''
+ && is_end_of_line[(unsigned char) input_line_pointer[1]])
+ ++input_line_pointer;
+
demand_empty_rest_of_line ();
#ifdef LISTING
if (listing)
S_SET_STORAGE_CLASS (symbolP, C_STAT);
}
#endif /* OBJ_COFF */
+
+#ifdef S_SET_SIZE
+ S_SET_SIZE (symbolP, temp);
+#endif
}
else
as_bad ("Ignoring attempt to re-define symbol `%s'.",
expressionS exp;
register long temp_fill;
-#ifdef TC_M68K
/* The m68k MRI assembler has a different meaning for .org. It
means to create an absolute section at a given address. We can't
support that--use a linker script instead. */
- if (flag_mri)
+ if (flag_m68k_mri)
{
as_bad ("MRI style ORG pseudo-op not supported");
ignore_rest_of_line ();
return;
}
-#endif
/* Don't believe the documentation of BSD 4.2 AS. There is no such
thing as a sub-segment-relative origin. Any absolute origin is
if (is_it_end_of_statement ())
{
- mri_comment_end (stop, stopc);
+ if (flag_mri)
+ mri_comment_end (stop, stopc);
demand_empty_rest_of_line ();
return;
}
c = 0;
do
{
- if (flag_mri)
+ if (flag_m68k_mri)
parse_mri_cons (&exp, (unsigned int) nbytes);
else
TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
FILE *try;
char *path;
- if (! flag_mri)
+ if (! flag_m68k_mri)
filename = demand_copy_string (&i);
else
{