+2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * as.h (flag_m68k_mri): Move declaration after target include, and
+ only declare when TC_M68K defined. Define as zero otherwise.
+ (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0.
+ * app.c (scrub_m68k_mri): Declare only when TC_M68K defined.
+ Define as zero otherwise.
+ (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined.
+ (struct app_save): Declare scrub_m68k_mri only when TC_M68K.
+ (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K.
+ (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than
+ testing whether defined.
+ * cond.c (ignore_input): Use NO_PSEUDO_DOT directly.
+ * expr.c (operand): #ifdef unused case labels when TC_M68K undefined.
+ * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly
+ rather than testing whether defined.
+ (s_mri): Set flag_m68k_mri only when TC_M68K defined.
+ (parse_mri_cons): Declare and use only when TC_M68K.
+ * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1.
+ * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1.
+ * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1.
+
+ * NEWS: Mention IBM 370 support.
+
2000-02-23 Richard Henderson <rth@cygnus.com>
* config/tc-i386.c (md_assemble): When swapping operands for
/* This is the Assembler Pre-Processor
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#endif
#endif
+#ifdef TC_M68K
/* Whether we are scrubbing in m68k MRI mode. This is different from
flag_m68k_mri, because the two flags will be affected by the .mri
pseudo-op at different times. */
static int scrub_m68k_mri;
+#else
+#define scrub_m68k_mri 0
+#endif
/* The pseudo-op which switches in and out of MRI mode. See the
comment in do_scrub_chars. */
const char *p;
int c;
- scrub_m68k_mri = m68k_mri;
-
lex[' '] = LEX_IS_WHITESPACE;
lex['\t'] = LEX_IS_WHITESPACE;
lex['\r'] = LEX_IS_WHITESPACE;
lex[';'] = LEX_IS_LINE_SEPARATOR;
lex[':'] = LEX_IS_COLON;
+#ifdef TC_M68K
+ scrub_m68k_mri = m68k_mri;
+
if (! m68k_mri)
+#endif
{
lex['"'] = LEX_IS_STRINGQUOTE;
lex['/'] = LEX_IS_TWOCHAR_COMMENT_1ST;
}
+#ifdef TC_M68K
if (m68k_mri)
{
lex['\''] = LEX_IS_STRINGQUOTE;
then it can't be used in an expression. */
lex['!'] = LEX_IS_LINE_COMMENT_START;
}
+#endif
#ifdef TC_V850
lex['-'] = LEX_IS_DOUBLEDASH_1ST;
int add_newlines;
char * saved_input;
int saved_input_len;
+#ifdef TC_M68K
int scrub_m68k_mri;
+#endif
const char * mri_state;
char mri_last_ch;
#if defined TC_ARM && defined OBJ_ELF
memcpy (saved->saved_input, saved_input, saved_input_len);
saved->saved_input_len = saved_input_len;
}
+#ifdef TC_M68K
saved->scrub_m68k_mri = scrub_m68k_mri;
+#endif
saved->mri_state = mri_state;
saved->mri_last_ch = mri_last_ch;
#if defined TC_ARM && defined OBJ_ELF
saved_input_len = saved->saved_input_len;
free (saved->saved_input);
}
+#ifdef TC_M68K
scrub_m68k_mri = saved->scrub_m68k_mri;
+#endif
mri_state = saved->mri_state;
mri_last_ch = saved->mri_last_ch;
#if defined TC_ARM && defined OBJ_ELF
state = 10; /* Sp after symbol char */
goto recycle;
case 11:
- if (flag_m68k_mri
-#ifdef LABELS_WITHOUT_COLONS
- || 1
-#endif
- )
+ if (LABELS_WITHOUT_COLONS || flag_m68k_mri)
state = 1;
else
{
/* as.h - global header file
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* True if we are assembling in MRI mode. */
COMMON int flag_mri;
-/* True if we are assembling in m68k MRI mode. */
-COMMON int flag_m68k_mri;
-
/* Should the data section be made read-only and appended to the text
section? */
COMMON unsigned char flag_readonly_data_in_text; /* -R */
#endif
#include "listing.h"
+#ifdef TC_M68K
+/* True if we are assembling in m68k MRI mode. */
+COMMON int flag_m68k_mri;
+#else
+#define flag_m68k_mri 0
+#endif
+
#ifndef NUMBERS_WITH_SUFFIX
#define NUMBERS_WITH_SUFFIX 0
#endif
#define LOCAL_LABELS_FB 0
#endif
+#ifndef LABELS_WITHOUT_COLONS
+#define LABELS_WITHOUT_COLONS 0
+#endif
+
+#ifndef NO_PSEUDO_DOT
+#define NO_PSEUDO_DOT 0
+#endif
+
#ifndef TEXT_SECTION_NAME
#define TEXT_SECTION_NAME ".text"
#define DATA_SECTION_NAME ".data"
/* cond.c - conditional assembly pseudo-ops, and .include
- Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 98, 1999
+ Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
s = input_line_pointer;
- if (flag_m68k_mri
-#ifdef NO_PSEUDO_DOT
- || 1
-#endif
- )
+ if (NO_PSEUDO_DOT || flag_m68k_mri)
{
if (s[-1] != '.')
--s;
/* tc-hppa.h -- Header file for the PA
- Copyright (C) 1989, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1989, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define ASEC_NULL (asection *)0
/* Labels are not required to have a colon for a suffix. */
-#define LABELS_WITHOUT_COLONS
+#define LABELS_WITHOUT_COLONS 1
/* FIXME. This should be static and declared in tc-hppa.c, but
pa_define_label gets used outside of tc-hppa.c via tc_frob_label.
/* This file is tc-m68k.h
- Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define LEX_TILDE LEX_BEGIN_NAME
#define tc_canonicalize_symbol_name(s) ((*(s) == '~' ? *(s) = '.' : '.'), s)
/* On the Delta, dots are not required before pseudo-ops. */
-#define NO_PSEUDO_DOT
+#define NO_PSEUDO_DOT 1
#ifndef BFD_ASSEMBLER
#undef LOCAL_LABEL
#define LOCAL_LABEL(name) \
/* m88k.h -- Assembler for the Motorola 88000
Contributed by Devon Bowen of Buffalo University
and Torbjorn Granlund of the Swedish Institute of Computer Science.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#endif
/* The m88k uses pseudo-ops with no leading period. */
-#define NO_PSEUDO_DOT
+#define NO_PSEUDO_DOT 1
/* Don't warn on word overflow; it happens on %hi relocs. */
#undef WARN_SIGNED_OVERFLOW_WORD
/* expr.c -operands, expressions-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* here with input_line_pointer->char after "(...)" */
return segment;
+#ifdef TC_M68K
case 'E':
if (! flag_m68k_mri || *input_line_pointer != '\'')
goto de_fault;
goto de_fault;
++input_line_pointer;
/* Fall through. */
+#endif
case '\'':
if (! flag_m68k_mri)
{
(void) operand (expressionP);
break;
+#ifdef TC_M68K
case '"':
/* Double quote is the bitwise not operator in MRI mode. */
if (! flag_m68k_mri)
goto de_fault;
/* Fall through. */
+#endif
case '~':
/* ~ is permitted to start a label on the Delta. */
if (is_name_beginner (c))
}
break;
+#if defined (DOLLAR_DOT) || defined (TC_M68K)
case '$':
/* $ is the program counter when in MRI mode, or when DOLLAR_DOT
is defined. */
current_location (expressionP);
break;
+#endif
case '.':
if (!is_part_of_name (*input_line_pointer))
input_line_pointer--;
break;
+#ifdef TC_M68K
case '%':
if (! flag_m68k_mri)
goto de_fault;
current_location (expressionP);
break;
+#endif
default:
+#ifdef TC_M68K
de_fault:
+#endif
if (is_end_of_line[(unsigned char) c])
goto eol;
if (is_name_beginner (c)) /* here if did not begin with a digit */
line_label = NULL;
- if (flag_m68k_mri
-#ifdef LABELS_WITHOUT_COLONS
- || 1
-#endif
- )
+ if (LABELS_WITHOUT_COLONS || flag_m68k_mri)
{
/* Text at the start of a line must be a label, we
run down and stick a colon in. */
}
#endif
- if (flag_m68k_mri
-#ifdef NO_PSEUDO_DOT
- || 1
-#endif
- )
+ if (NO_PSEUDO_DOT || flag_m68k_mri)
{
/* The MRI assembler and the m88k use pseudo-ops
without a period. */
symbol_set_frag (line_label, &zero_address_frag);
}
- if (((flag_m68k_mri
-#ifdef NO_PSEUDO_DOT
- || 1
-#endif
- )
+ if (((NO_PSEUDO_DOT || flag_m68k_mri)
&& hash_find (po_hash, name) != NULL)
|| (! flag_m68k_mri
&& *name == '.'
else
{
flag_mri = 0;
+#ifdef TC_M68K
flag_m68k_mri = 0;
+#endif
macro_mri_mode (0);
}
are defined, which is the normal case, then only simple expressions
are permitted. */
+#ifdef TC_M68K
static void
parse_mri_cons PARAMS ((expressionS *exp, unsigned int nbytes));
+#endif
#ifndef TC_PARSE_CONS_EXPRESSION
#ifdef BITFIELD_CONS_EXPRESSIONS
c = 0;
do
{
+#ifdef TC_M68K
if (flag_m68k_mri)
parse_mri_cons (&exp, (unsigned int) nbytes);
else
+#endif
TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
if (rva)
\f
/* Handle an MRI style string expression. */
+#ifdef TC_M68K
static void
parse_mri_cons (exp, nbytes)
expressionS *exp;
input_line_pointer++;
}
}
+#endif /* TC_M68K */
\f
#ifdef REPEAT_CONS_EXPRESSIONS