/* as.h - global header file
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef GAS
#define GAS 1
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
#define __PRETTY_FUNCTION__ ((char*)0)
#endif
-#if 0
-
-/* Handle lossage with assert.h. */
-#ifndef BROKEN_ASSERT
-#include <assert.h>
-#else /* BROKEN_ASSERT */
-#ifndef NDEBUG
-#define assert(p) ((p) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
-#else
-#define assert(p) ((p), 0)
-#endif
-#endif /* BROKEN_ASSERT */
-
-#else
-
-#define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
+#define assert(P) \
+ ((void) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))
#undef abort
#define abort() as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
-#endif
-
/* Now GNU header files... */
#include "ansidecl.h"
#ifdef BFD_ASSEMBLER
#endif /* !__MWERKS__ */
/* Other stuff from config.h. */
-#ifdef NEED_DECLARATION_STRSTR
-extern char *strstr ();
+#ifdef NEED_DECLARATION_ENVIRON
+extern char **environ;
#endif
-#ifdef NEED_DECLARATION_MALLOC
-extern PTR malloc ();
-extern PTR realloc ();
+#ifdef NEED_DECLARATION_ERRNO
+extern int errno;
+#endif
+#ifdef NEED_DECLARATION_FFS
+extern int ffs (int);
#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
#endif
-#ifdef NEED_DECLARATION_ERRNO
-extern int errno;
+#ifdef NEED_DECLARATION_MALLOC
+extern PTR malloc ();
+extern PTR realloc ();
#endif
-#ifdef NEED_DECLARATION_ENVIRON
-extern char **environ;
+#ifdef NEED_DECLARATION_STRSTR
+extern char *strstr ();
#endif
/* This is needed for VMS. */
enum _relax_state
{
+ /* Dummy frag used by listing code. */
+ rs_dummy = 0,
+
/* Variable chars to be repeated fr_offset times.
Fr_symbol unused. Used with fr_offset == 0 for a
constant length frag. */
- rs_fill = 1,
+ rs_fill,
/* Align. The fr_offset field holds the power of 2 to which to
align. The fr_var field holds the number of characters in the
/* Enough bits for address, but still an integer type.
Could be a problem, cross-assembling for 64-bit machines. */
typedef addressT relax_addressT;
+
+struct relax_type
+{
+ /* Forward reach. Signed number. > 0. */
+ offsetT rlx_forward;
+ /* Backward reach. Signed number. < 0. */
+ offsetT rlx_backward;
+
+ /* Bytes length of this address. */
+ unsigned char rlx_length;
+
+ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
+ relax_substateT rlx_more;
+};
+
+typedef struct relax_type relax_typeS;
\f
/* main program "as.c" (command arguments etc). */
void as_assert (const char *, int, const char *);
void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
-void fprint_value (FILE *, addressT);
void sprint_value (char *, addressT);
int had_errors (void);
int had_warnings (void);
void cond_exit_macro (int);
int seen_at_least_1_file (void);
void app_pop (char *);
-void as_howmuch (FILE *);
void as_perror (const char *, const char *);
void as_where (char **, unsigned int *);
void bump_line_counters (void);
segT subseg_force_new (const char *, subsegT);
void subseg_set (segT, subsegT);
int subseg_text_p (segT);
+int seg_not_empty_p (segT);
void start_dependencies (char *);
void register_dependency (char *);
void print_dependencies (void);
segT subseg_get (const char *, int);
#endif
-
struct expressionS;
struct fix;
typedef struct symbol symbolS;