* as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already defined, define

them to zero.
* config/tc-*.h, config/te-*.h: If defining them, define them to be 1 instead
of empty.
* expr.c (integer_constant, operand): Test them at run time instead of compile
time.
* read.c (read_a_source_file): Ditto.
* symbols.c (colon): Ditto.
(dollar_*, define_dollar_label, fb_*): Define unconditionally.
* symbols.h (dollar_*, define_dollar_label, fb_*): Declare unconditionally.
This commit is contained in:
Ken Raeburn
1995-05-04 01:56:40 +00:00
parent 774e5d7f64
commit 9777b772c8
8 changed files with 60 additions and 36 deletions

View File

@ -1,3 +1,17 @@
Wed May 3 21:38:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
* as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already
defined, define them to zero.
* config/tc-*.h, config/te-*.h: If defining them, define them to
be 1 instead of empty.
* expr.c (integer_constant, operand): Test them at run time
instead of compile time.
* read.c (read_a_source_file): Ditto.
* symbols.c (colon): Ditto.
(dollar_*, define_dollar_label, fb_*): Define unconditionally.
* symbols.h (dollar_*, define_dollar_label, fb_*): Declare
unconditionally.
Wed May 3 13:08:53 1995 Jeff Law (law@snake.cs.utah.edu) Wed May 3 13:08:53 1995 Jeff Law (law@snake.cs.utah.edu)
* config/tc-hppa.c (md_apply_fix): Do nothing for an out of range * config/tc-hppa.c (md_apply_fix): Do nothing for an out of range

View File

@ -105,6 +105,7 @@ extern char *strdup (/* const char * */);
#define __PRETTY_FUNCTION__ ((char*)0) #define __PRETTY_FUNCTION__ ((char*)0)
#endif #endif
#if 0 #if 0
/* Handle lossage with assert.h. */ /* Handle lossage with assert.h. */
#ifndef BROKEN_ASSERT #ifndef BROKEN_ASSERT
#include <assert.h> #include <assert.h>
@ -115,8 +116,13 @@ extern char *strdup (/* const char * */);
#define assert(p) ((p), 0) #define assert(p) ((p), 0)
#endif #endif
#endif /* BROKEN_ASSERT */ #endif /* BROKEN_ASSERT */
#else #else
#define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)) #define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
#undef abort
#define abort() as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
#endif #endif
@ -151,6 +157,11 @@ extern int errno;
#define unlink remove #define unlink remove
#endif #endif
/* Hack to make "gcc -Wall" not complain about obstack macros. */
#if !defined (memcpy) && !defined (bcopy)
#define bcopy(src,dest,size) memcpy(dest,src,size)
#endif
#ifdef BFD_ASSEMBLER #ifdef BFD_ASSEMBLER
/* This one doesn't get declared, but we're using it anyways. This /* This one doesn't get declared, but we're using it anyways. This
should be fixed -- either it's part of the external interface or should be fixed -- either it's part of the external interface or
@ -309,7 +320,7 @@ COMMON segT now_seg;
#ifdef BFD_ASSEMBLER #ifdef BFD_ASSEMBLER
#define segment_name(SEG) bfd_get_section_name (stdoutput, SEG) #define segment_name(SEG) bfd_get_section_name (stdoutput, SEG)
#else #else
extern char *const seg_name[]; extern char const *const seg_name[];
#define segment_name(SEG) seg_name[(int) (SEG)] #define segment_name(SEG) seg_name[(int) (SEG)]
#endif #endif
@ -498,7 +509,7 @@ extern int listing;
struct _pseudo_type struct _pseudo_type
{ {
/* assembler mnemonic, lower case, no '.' */ /* assembler mnemonic, lower case, no '.' */
char *poc_name; const char *poc_name;
/* Do the work */ /* Do the work */
void (*poc_handler) PARAMS ((int)); void (*poc_handler) PARAMS ((int));
/* Value to pass to handler */ /* Value to pass to handler */
@ -546,6 +557,7 @@ PRINTF_LIKE (as_warn);
PRINTF_WHERE_LIKE (as_bad_where); PRINTF_WHERE_LIKE (as_bad_where);
PRINTF_WHERE_LIKE (as_warn_where); PRINTF_WHERE_LIKE (as_warn_where);
void as_assert PARAMS ((const char *, int, const char *)); void as_assert PARAMS ((const char *, int, const char *));
void as_abort PARAMS ((const char *, int, const char *));
void fprint_value PARAMS ((FILE *file, addressT value)); void fprint_value PARAMS ((FILE *file, addressT value));
void sprint_value PARAMS ((char *buf, addressT value)); void sprint_value PARAMS ((char *buf, addressT value));
@ -593,6 +605,7 @@ segT subseg_get PARAMS ((const char *, int));
struct expressionS; struct expressionS;
struct fix; struct fix;
struct symbol; struct symbol;
struct relax_type;
#ifdef BFD_ASSEMBLER #ifdef BFD_ASSEMBLER
/* literal.c */ /* literal.c */
@ -616,21 +629,13 @@ valueT add_to_literal_pool PARAMS ((struct symbol *, valueT, segT, int));
#include "listing.h" #include "listing.h"
#ifdef BFD_ASSEMBLER #ifndef LOCAL_LABELS_DOLLAR
/* Someday perhaps this will be selectable at run-time. */ #define LOCAL_LABELS_DOLLAR 0
#if defined (OBJ_AOUT) || defined (OBJ_BOUT)
#define OUTPUT_FLAVOR bfd_target_aout_flavour
#endif #endif
#ifdef OBJ_COFF
#define OUTPUT_FLAVOR bfd_target_coff_flavour #ifndef LOCAL_LABELS_FB
#define LOCAL_LABELS_FB 0
#endif #endif
#ifdef OBJ_ECOFF
#define OUTPUT_FLAVOR bfd_target_ecoff_flavour
#endif
#ifdef OBJ_ELF
#define OUTPUT_FLAVOR bfd_target_elf_flavour
#endif
#endif /* BFD_ASSEMBLER */
#endif /* GAS */ #endif /* GAS */

View File

@ -31,7 +31,7 @@
#define REPEAT_CONS_EXPRESSIONS #define REPEAT_CONS_EXPRESSIONS
#define RELOC_EXPANSION_POSSIBLE #define RELOC_EXPANSION_POSSIBLE
#define MAX_RELOC_EXPANSION 3 #define MAX_RELOC_EXPANSION 3
#define LOCAL_LABELS_FB #define LOCAL_LABELS_FB 1
/* The MIPS assembler appears to keep all symbols. */ /* The MIPS assembler appears to keep all symbols. */
#define LOCAL_LABEL(name) 0 #define LOCAL_LABEL(name) 0

View File

@ -37,17 +37,19 @@ extern enum bfd_architecture ppc_arch PARAMS ((void));
#endif #endif
/* Permit temporary numeric labels. */ /* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB #define LOCAL_LABELS_FB 1
/* $ is used to refer to the current location. */ /* $ is used to refer to the current location. */
#define DOLLAR_DOT #define DOLLAR_DOT
/* Strings do not use backslash escapes. */ /* Strings do not use backslash escapes under COFF. */
#define NO_STRING_ESCAPES
#ifdef OBJ_COFF #ifdef OBJ_COFF
#define NO_STRING_ESCAPES
#endif
/* When using COFF, we determine whether or not to output a symbol /* When using COFF, we determine whether or not to output a symbol
based on sy_tc.output, not on the name. */ based on sy_tc.output, not on the name. */
#ifdef OBJ_COFF
#define LOCAL_LABEL(name) 0 #define LOCAL_LABEL(name) 0
#endif #endif
#ifdef OBJ_ELF #ifdef OBJ_ELF
@ -55,6 +57,7 @@ extern enum bfd_architecture ppc_arch PARAMS ((void));
#define LOCAL_LABEL(name) (name[0] == '.' \ #define LOCAL_LABEL(name) (name[0] == '.' \
&& (name[1] == 'L' || name[1] == '.')) && (name[1] == 'L' || name[1] == '.'))
#define FAKE_LABEL_NAME ".L0\001" #define FAKE_LABEL_NAME ".L0\001"
#define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */
#endif #endif
/* Set the endianness we are using. Default to big endian. */ /* Set the endianness we are using. Default to big endian. */
@ -154,4 +157,9 @@ extern void ppc_frob_file PARAMS ((void));
#ifndef GLOBAL_OFFSET_TABLE_NAME #ifndef GLOBAL_OFFSET_TABLE_NAME
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
#endif #endif
#endif #endif /* OBJ_ELF */
/* call md_apply_fix3 with segment instead of md_apply_fix */
#define MD_APPLY_FIX3
#define md_operand(x)

View File

@ -9,8 +9,8 @@
/* Added these, because if we don't know what we're targetting we may /* Added these, because if we don't know what we're targetting we may
need an assembler version of libgcc, and that will use local need an assembler version of libgcc, and that will use local
labels. */ labels. */
#define LOCAL_LABELS_DOLLAR #define LOCAL_LABELS_DOLLAR 1
#define LOCAL_LABELS_FB #define LOCAL_LABELS_FB 1
/* these define interfaces */ /* these define interfaces */
#include "obj-format.h" #include "obj-format.h"

View File

@ -17,8 +17,8 @@
along with GAS; see the file COPYING. If not, write to along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define LOCAL_LABELS_DOLLAR #define LOCAL_LABELS_DOLLAR 1
#define LOCAL_LABELS_FB #define LOCAL_LABELS_FB 1
#include "obj-format.h" #include "obj-format.h"

View File

@ -20,8 +20,8 @@
/* Added these, because if we don't know what we're targetting we may /* Added these, because if we don't know what we're targetting we may
need an assembler version of libgcc, and that will use local need an assembler version of libgcc, and that will use local
labels. */ labels. */
#define LOCAL_LABELS_DOLLAR #define LOCAL_LABELS_DOLLAR 1
#define LOCAL_LABELS_FB #define LOCAL_LABELS_FB 1
/* these define interfaces */ /* these define interfaces */
#include "obj-format.h" #include "obj-format.h"

View File

@ -573,8 +573,8 @@ read_a_source_file (name)
if (is_end_of_line[(unsigned char) c]) if (is_end_of_line[(unsigned char) c])
continue; continue;
#if defined(LOCAL_LABELS_DOLLAR) || defined(LOCAL_LABELS_FB) if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB)
if (isdigit (c)) && isdigit (c))
{ {
/* local label ("4:") */ /* local label ("4:") */
char *backup = input_line_pointer; char *backup = input_line_pointer;
@ -589,8 +589,8 @@ read_a_source_file (name)
++input_line_pointer; ++input_line_pointer;
} /* read the whole number */ } /* read the whole number */
#ifdef LOCAL_LABELS_DOLLAR if (LOCAL_LABELS_DOLLAR
if (*input_line_pointer == '$' && *input_line_pointer == '$'
&& *(input_line_pointer + 1) == ':') && *(input_line_pointer + 1) == ':')
{ {
input_line_pointer += 2; input_line_pointer += 2;
@ -604,20 +604,17 @@ read_a_source_file (name)
colon (dollar_label_name (temp, 0)); colon (dollar_label_name (temp, 0));
continue; continue;
} }
#endif /* LOCAL_LABELS_DOLLAR */
#ifdef LOCAL_LABELS_FB if (LOCAL_LABELS_FB
if (*input_line_pointer++ == ':') && *input_line_pointer++ == ':')
{ {
fb_label_instance_inc (temp); fb_label_instance_inc (temp);
colon (fb_label_name (temp, 0)); colon (fb_label_name (temp, 0));
continue; continue;
} }
#endif /* LOCAL_LABELS_FB */
input_line_pointer = backup; input_line_pointer = backup;
} /* local label ("4:") */ } /* local label ("4:") */
#endif /* LOCAL_LABELS_DOLLAR or LOCAL_LABELS_FB */
if (c && strchr (line_comment_chars, c)) if (c && strchr (line_comment_chars, c))
{ /* Its a comment. Better say APP or NO_APP */ { /* Its a comment. Better say APP or NO_APP */