* as.h (struct frag): Remove unused align_mask and align_offset
[binutils-gdb.git] / gas / as.h
index 5c9aeed6620991dbaf6d71d11ab10633c95a5a00..7ae19514b6dec07876864cb5704ce2401d79f8ff 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -1,5 +1,6 @@
 /* as.h - global header file
-   Copyright (C) 1987, 1990, 1991, 1992 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.
 
@@ -46,6 +47,7 @@
 /* Added void* version for STDC case.  This is to be compatible with
    the declaration in bison.simple, used for m68k operand parsing.
    --KR 1995.08.08 */
+/* Force void* decl for hpux.  This is what Bison uses.  --KR 1995.08.16 */
 
 /* AIX requires this to be the first thing in the file.  */
 #ifdef __GNUC__
  #pragma alloca
 #  else
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
-#    ifndef __STDC__
+#    if !defined (__STDC__) && !defined (__hpux)
 char *alloca ();
 #    else
 void *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
+#    endif /* __STDC__, __hpux */
+#   endif /* alloca */
+#  endif /* _AIX */
+# endif /* HAVE_ALLOCA_H */
 #endif
 
 /* Now, tend to the rest of the configuration.  */
@@ -90,13 +92,6 @@ void *alloca ();
 #include <sys/types.h>
 #endif
 
-/* Some systems do declare this, but this seems to be the universal
-   declaration, though the parameter type varies.  (It ought to use
-   `const' but many systems prototype it without.)  Include it here
-   for systems that don't declare it.  If conflicts arise, just add
-   another autoconf test...  */
-extern char *strdup (/* const char * */);
-
 #include <getopt.h>
 /* The first getopt value for machine-independent long options.
    150 isn't special; it's just an arbitrary non-ASCII char value.  */
@@ -143,9 +138,11 @@ extern char *strdup (/* const char * */);
 #include <progress.h>
 
 /* This doesn't get taken care of anywhere.  */
+#ifndef __MWERKS__  /* Metrowerks C chokes on the "defined (inline)" */
 #if !defined (__GNUC__) && !defined (inline)
 #define inline
 #endif
+#endif /* !__MWERKS__ */
 
 /* Other stuff from config.h.  */
 #ifdef NEED_DECLARATION_MALLOC
@@ -201,10 +198,6 @@ extern PTR bfd_alloc_by_size_t PARAMS ((bfd *abfd, size_t sz));
 #endif
 #endif /* ! __STDC__ */
 
-#if !defined (__GNUC__) && !defined (inline)
-#define inline
-#endif
-
 #ifndef FOPEN_WB
 #ifdef GO32
 #include "fopen-bin.h"
@@ -281,12 +274,16 @@ typedef addressT valueT;
 
 #ifdef MANY_SEGMENTS
 #include "bfd.h"
-#define N_SEGMENTS 10
-#define SEG_NORMAL(x) ((x) >= SEG_E0 && (x) <= SEG_E9)
-#define SEG_LIST SEG_E0,SEG_E1,SEG_E2,SEG_E3,SEG_E4,SEG_E5,SEG_E6,SEG_E7,SEG_E8,SEG_E9
+#define N_SEGMENTS 40
+#define SEG_NORMAL(x) ((x) >= SEG_E0 && (x) <= SEG_E39)
+#define SEG_LIST SEG_E0,SEG_E1,SEG_E2,SEG_E3,SEG_E4,SEG_E5,SEG_E6,SEG_E7,SEG_E8,SEG_E9,\
+                SEG_E10,SEG_E11,SEG_E12,SEG_E13,SEG_E14,SEG_E15,SEG_E16,SEG_E17,SEG_E18,SEG_E19,\
+                SEG_E20,SEG_E21,SEG_E22,SEG_E23,SEG_E24,SEG_E25,SEG_E26,SEG_E27,SEG_E28,SEG_E29,\
+                SEG_E30,SEG_E31,SEG_E32,SEG_E33,SEG_E34,SEG_E35,SEG_E36,SEG_E37,SEG_E38,SEG_E39
 #define SEG_TEXT SEG_E0
 #define SEG_DATA SEG_E1
 #define SEG_BSS SEG_E2
+#define SEG_LAST SEG_E39
 #else
 #define N_SEGMENTS 3
 #define SEG_NORMAL(x) ((x) == SEG_TEXT || (x) == SEG_DATA || (x) == SEG_BSS)
@@ -440,11 +437,6 @@ struct frag
   relax_stateT fr_type;
   relax_substateT fr_subtype;
 
-  /* Track the alignment and offset of the current frag.  With this,
-     sometimes we can avoid creating new frags for .align directives.  */
-  unsigned short align_mask;
-  unsigned short align_offset;
-
   /* These are needed only on the NS32K machines.  But since we don't
      include targ-cpu.h until after this structure has been defined,
      we can't really conditionalize it.  This code should be
@@ -485,17 +477,20 @@ COMMON unsigned char flag_warn_displacement; /* -K */
 #endif
 
 /* True if local symbols should be retained.  */
-COMMON unsigned char flag_keep_locals; /* -L */
+COMMON int flag_keep_locals; /* -L */
 
-/* True if we are assembling using MRI syntax.  */
+/* 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 */
 
 /* True if warnings should be inhibited.  */
-COMMON unsigned char flag_no_warnings; /* -W */
+COMMON int flag_no_warnings; /* -W */
 
 /* True if we should attempt to generate output even if non-fatal errors
    are detected.  */
@@ -518,6 +513,13 @@ COMMON int linkrelax;
 /* TRUE if we should produce a listing.  */
 extern int listing;
 
+/* Maximum level of macro nesting.  */
+extern int max_macro_nest;
+
+/* Obstack chunk size.  Keep large for efficient space use, make small to
+   increase malloc calls for monitoring memory allocation.  */
+extern int chunksize;
+
 struct _pseudo_type
   {
     /* assembler mnemonic, lower case, no '.' */
@@ -585,26 +587,22 @@ char *input_scrub_new_file PARAMS ((char *filename));
 char *input_scrub_next_buffer PARAMS ((char **bufp));
 PTR xmalloc PARAMS ((unsigned long size));
 PTR xrealloc PARAMS ((PTR ptr, unsigned long n));
-int do_scrub_next_char PARAMS ((int (*get) (void), void (*unget) (int)));
+int do_scrub_chars PARAMS ((int (*get) (char **), char *to, int tolen));
 int gen_to_words PARAMS ((LITTLENUM_TYPE * words, int precision,
                          long exponent_bits));
 int had_err PARAMS ((void));
 int ignore_input PARAMS ((void));
-int scrub_from_file PARAMS ((void));
-int scrub_from_string PARAMS ((void));
 int seen_at_least_1_file PARAMS ((void));
 void app_pop PARAMS ((char *arg));
 void as_howmuch PARAMS ((FILE * stream));
 void as_perror PARAMS ((const char *gripe, const char *filename));
 void as_where PARAMS ((char **namep, unsigned int *linep));
 void bump_line_counters PARAMS ((void));
-void do_scrub_begin PARAMS ((void));
+void do_scrub_begin PARAMS ((int));
 void input_scrub_begin PARAMS ((void));
 void input_scrub_close PARAMS ((void));
 void input_scrub_end PARAMS ((void));
 void new_logical_line PARAMS ((char *fname, int line_number));
-void scrub_to_file PARAMS ((int ch));
-void scrub_to_string PARAMS ((int ch));
 void subsegs_begin PARAMS ((void));
 void subseg_change PARAMS ((segT seg, int subseg));
 segT subseg_new PARAMS ((const char *name, subsegT subseg));