Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions | Variables
as.h File Reference
#include "config.h"
#include <stdio.h>
#include "getopt.h"
#include "ansidecl.h"
#include "bfd.h"
#include "libiberty.h"
#include "progress.h"
#include "fopen-same.h"
#include "asintl.h"
#include "flonum.h"
#include "expr.h"
#include "targ-env.h"
#include "write.h"
#include "frags.h"
#include "hash.h"
#include "read.h"
#include "symbols.h"
#include "tc.h"
#include "obj.h"
#include "listing.h"

Go to the source code of this file.

Classes

struct  relax_type
struct  _pseudo_type

Defines

#define va_alist   REST
#define va_dcl
#define va_start(ARGS)   ARGS = &REST
#define va_end(ARGS)
#define OPTION_STD_BASE   150
#define OPTION_MD_BASE   190
#define __PRETTY_FUNCTION__   ((char*)0)
#define assert(P)   ((void) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))
#define abort()   as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
#define inline
#define bcopy(src, dest, size)   memcpy (dest, src, size)
#define __LINE__   "unknown"
#define __FILE__   "unknown"
#define EXIT_SUCCESS   0
#define EXIT_FAILURE   1
#define SEEK_SET   0
#define obstack_chunk_alloc   xmalloc
#define obstack_chunk_free   xfree
#define xfree   free
#define BAD_CASE(val)
#define COMMON   extern /* Our commons live elsewhere. */
#define know(p)   /* know() checks are no-op.ed */
#define SEG_NORMAL(SEG)
#define segment_name(SEG)   bfd_get_section_name (stdoutput, SEG)
#define absolute_section   bfd_abs_section_ptr
#define undefined_section   bfd_und_section_ptr
#define PRINTF_LIKE(FCN)   void FCN ()
#define PRINTF_WHERE_LIKE(FCN)   void FCN ()
#define IS_ELF   0
#define flag_m68k_mri   0
#define DOLLAR_AMBIGU   0
#define NUMBERS_WITH_SUFFIX   0
#define LOCAL_LABELS_DOLLAR   0
#define LOCAL_LABELS_FB   0
#define LABELS_WITHOUT_COLONS   0
#define NO_PSEUDO_DOT   0
#define TEXT_SECTION_NAME   ".text"
#define DATA_SECTION_NAME   ".data"
#define BSS_SECTION_NAME   ".bss"
#define OCTETS_PER_BYTE_POWER   0
#define OCTETS_PER_BYTE   (1<<OCTETS_PER_BYTE_POWER)

Typedefs

typedef intva_list
typedef bfd_vma addressT
typedef bfd_signed_vma offsetT
typedef addressT valueT
typedef asectionsegT
typedef int subsegT
typedef struct relax_type
typedef struct _pseudo_type
typedef struct symbol
typedef struct frag

Enumerations

enum  _relax_state {
  rs_dummy = 0, rs_fill, rs_align, rs_align_code,
  rs_align_test, rs_org, rs_broken_word, rs_machine_dependent,
  rs_space, rs_leb128, rs_cfa, rs_dwarf2dbg
}
enum  debug_info_type {
  DEBUG_UNSPECIFIED, DEBUG_NONE, DEBUG_STABS, DEBUG_ECOFF,
  DEBUG_DWARF, DEBUG_DWARF2
}

Functions

char * alloca ()
int vsnprintf (char *, size_t, const char *, va_list)
 PRINTF_LIKE (as_bad)
 PRINTF_LIKE (as_fatal) ATTRIBUTE_NORETURN
 PRINTF_LIKE (as_tsktsk)
 PRINTF_LIKE (as_warn)
 PRINTF_WHERE_LIKE (as_bad_where)
 PRINTF_WHERE_LIKE (as_warn_where)
void as_assert (const char *, int, const char *)
void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN
void sprint_value (char *, addressT)
int had_errors (void)
int had_warnings (void)
void as_warn_value_out_of_range (char *, offsetT, offsetT, offsetT, char *, unsigned)
void as_bad_value_out_of_range (char *, offsetT, offsetT, offsetT, char *, unsigned)
void print_version_id (void)
char * app_push (void)
char * atof_ieee (char *, int, LITTLENUM_TYPE *)
char * input_scrub_include_file (char *, char *)
void input_scrub_insert_line (const char *)
void input_scrub_insert_file (char *)
char * input_scrub_new_file (char *)
char * input_scrub_next_buffer (char **bufp)
int do_scrub_chars (int(*get)(char *, int), char *, int)
int gen_to_words (LITTLENUM_TYPE *, int, long)
int had_err (void)
int ignore_input (void)
void cond_finish_check (int)
void cond_exit_macro (int)
int seen_at_least_1_file (void)
void app_pop (char *)
void as_where (char **, unsigned int *)
void bump_line_counters (void)
void do_scrub_begin (int)
void input_scrub_begin (void)
void input_scrub_close (void)
void input_scrub_end (void)
int new_logical_line (char *, int)
int new_logical_line_flags (char *, int, int)
void subsegs_begin (void)
void subseg_change (segT, int)
segT subseg_new (const char *, subsegT)
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)
valueT add_to_literal_pool (symbolS *, valueT, segT, int)
int check_eh_frame (struct expressionS *, unsigned int *)
int eh_frame_estimate_size_before_relax (fragS *)
int eh_frame_relax_frag (fragS *)
void eh_frame_convert_frag (fragS *)
int generic_force_reloc (struct fix *)

Variables

bfdstdoutput
COMMON subsegT now_subseg
COMMON segT now_seg
segT reg_section
segT expr_section
segT text_section
segT data_section
segT bss_section
COMMON unsigned char flag_no_comments
COMMON unsigned char flag_debug
COMMON unsigned char flag_signed_overflow_ok
COMMON unsigned char flag_warn_displacement
COMMON int flag_keep_locals
COMMON int flag_mri
COMMON unsigned char flag_readonly_data_in_text
COMMON int flag_no_warnings
COMMON int flag_fatal_warnings
COMMON unsigned char flag_always_generate_output
COMMON unsigned char flag_print_statistics
COMMON int flag_strip_local_absolute
COMMON int flag_traditional_format
COMMON int flag_execstack
COMMON int flag_noexecstack
COMMON char * out_file_name
COMMON char * insttbl_file_name
COMMON int need_pass_2
COMMON int linkrelax
int listing

Class Documentation

struct relax_type

Definition at line 363 of file as.h.

Class Members
offsetT rlx_backward
offsetT rlx_forward
unsigned char rlx_length
relax_substateT rlx_more

Define Documentation

#define __FILE__   "unknown"

Definition at line 208 of file as.h.

#define __LINE__   "unknown"

Definition at line 204 of file as.h.

#define __PRETTY_FUNCTION__   ((char*)0)

Definition at line 138 of file as.h.

#define abort (   void)    as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)

Definition at line 143 of file as.h.

Definition at line 294 of file as.h.

#define assert (   P)    ((void) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))

Definition at line 140 of file as.h.

#define BAD_CASE (   val)
Value:
{                                                                  \
    as_fatal (_("Case value %ld unexpected at line %d of file \"%s\"\n"),   \
             (long) val, __LINE__, __FILE__);                             \
  }

Definition at line 235 of file as.h.

#define bcopy (   src,
  dest,
  size 
)    memcpy (dest, src, size)

Definition at line 192 of file as.h.

#define BSS_SECTION_NAME   ".bss"

Definition at line 651 of file as.h.

#define COMMON   extern /* Our commons live elsewhere. */

Definition at line 256 of file as.h.

#define DATA_SECTION_NAME   ".data"

Definition at line 650 of file as.h.

#define DOLLAR_AMBIGU   0

Definition at line 625 of file as.h.

#define EXIT_FAILURE   1

Definition at line 221 of file as.h.

#define EXIT_SUCCESS   0

Definition at line 220 of file as.h.

#define flag_m68k_mri   0

Definition at line 615 of file as.h.

#define inline

Definition at line 156 of file as.h.

#define IS_ELF   0

Definition at line 592 of file as.h.

#define know (   p)    /* know() checks are no-op.ed */

Definition at line 266 of file as.h.

#define LABELS_WITHOUT_COLONS   0

Definition at line 641 of file as.h.

#define LOCAL_LABELS_DOLLAR   0

Definition at line 633 of file as.h.

#define LOCAL_LABELS_FB   0

Definition at line 637 of file as.h.

#define NO_PSEUDO_DOT   0

Definition at line 645 of file as.h.

#define NUMBERS_WITH_SUFFIX   0

Definition at line 629 of file as.h.

Definition at line 228 of file as.h.

#define obstack_chunk_free   xfree

Definition at line 229 of file as.h.

Definition at line 658 of file as.h.

#define OCTETS_PER_BYTE_POWER   0

Definition at line 655 of file as.h.

#define OPTION_MD_BASE   190

Definition at line 132 of file as.h.

#define OPTION_STD_BASE   150

Definition at line 129 of file as.h.

#define PRINTF_LIKE (   FCN)    void FCN ()

Definition at line 511 of file as.h.

#define PRINTF_WHERE_LIKE (   FCN)    void FCN ()

Definition at line 512 of file as.h.

#define SEEK_SET   0

Definition at line 225 of file as.h.

#define SEG_NORMAL (   SEG)
Value:
(   (SEG) != absolute_section      \
                             && (SEG) != undefined_section     \
                             && (SEG) != reg_section    \
                             && (SEG) != expr_section)

Definition at line 277 of file as.h.

#define segment_name (   SEG)    bfd_get_section_name (stdoutput, SEG)

Definition at line 289 of file as.h.

#define TEXT_SECTION_NAME   ".text"

Definition at line 649 of file as.h.

Definition at line 295 of file as.h.

#define va_alist   REST

Definition at line 119 of file as.h.

#define va_dcl

Definition at line 120 of file as.h.

#define va_end (   ARGS)

Definition at line 123 of file as.h.

#define va_start (   ARGS)    ARGS = &REST

Definition at line 122 of file as.h.

#define xfree   free

Definition at line 231 of file as.h.


Typedef Documentation

Definition at line 480 of file as.h.

typedef bfd_vma addressT

Definition at line 246 of file as.h.

typedef struct frag

Definition at line 570 of file as.h.

Definition at line 247 of file as.h.

typedef struct relax_type

Definition at line 377 of file as.h.

typedef asection* segT

Definition at line 276 of file as.h.

typedef int subsegT

Definition at line 281 of file as.h.

typedef struct symbol

Definition at line 568 of file as.h.

typedef int* va_list

Definition at line 121 of file as.h.

typedef addressT valueT

Definition at line 250 of file as.h.


Enumeration Type Documentation

Enumerator:
rs_dummy 
rs_fill 
rs_align 
rs_align_code 
rs_align_test 
rs_org 
rs_broken_word 
rs_machine_dependent 
rs_space 
rs_leb128 
rs_cfa 
rs_dwarf2dbg 

Definition at line 297 of file as.h.

{
  /* 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,

  /* 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
     fill pattern.  The fr_subtype field holds the maximum number of
     bytes to skip when aligning, or 0 if there is no maximum.  */
  rs_align,

  /* Align code.  The fr_offset field holds the power of 2 to which
     to align.  This type is only generated by machine specific
     code, which is normally responsible for handling the fill
     pattern.  The fr_subtype field holds the maximum number of
     bytes to skip when aligning, or 0 if there is no maximum.  */
  rs_align_code,

  /* Test for alignment.  Like rs_align, but used by several targets
     to warn if data is not properly aligned.  */
  rs_align_test,

  /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
     character.  */
  rs_org,

#ifndef WORKING_DOT_WORD
  /* JF: gunpoint */
  rs_broken_word,
#endif

  /* Machine specific relaxable (or similarly alterable) instruction.  */
  rs_machine_dependent,

  /* .space directive with expression operand that needs to be computed
     later.  Similar to rs_org, but different.
     fr_symbol: operand
     1 variable char: fill character  */
  rs_space,

  /* A DWARF leb128 value; only ELF uses this.  The subtype is 0 for
     unsigned, 1 for signed.  */
  rs_leb128,

  /* Exception frame information which we may be able to optimize.  */
  rs_cfa,

  /* Cross-fragment dwarf2 line number optimization.  */
  rs_dwarf2dbg
};
Enumerator:
DEBUG_UNSPECIFIED 
DEBUG_NONE 
DEBUG_STABS 
DEBUG_ECOFF 
DEBUG_DWARF 
DEBUG_DWARF2 

Definition at line 447 of file as.h.


Function Documentation

valueT add_to_literal_pool ( symbolS *  ,
valueT  ,
segT  ,
int   
)

Here is the caller graph for this function:

char* alloca ( )
void app_pop ( char *  )

Definition at line 268 of file app.c.

{
  register struct app_save *saved = (struct app_save *) arg;

  /* There is no do_scrub_end ().  */
  state = saved->state;
  old_state = saved->old_state;
  out_string = saved->out_string;
  memcpy (out_buf, saved->out_buf, sizeof (out_buf));
  add_newlines = saved->add_newlines;
  if (saved->saved_input == NULL)
    saved_input = NULL;
  else
    {
      assert (saved->saved_input_len <= (int) (sizeof input_buffer));
      memcpy (input_buffer, saved->saved_input, saved->saved_input_len);
      saved_input = input_buffer;
      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
  symver_state = saved->symver_state;
#endif

  free (arg);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* app_push ( void  )

Definition at line 232 of file app.c.

{
  register struct app_save *saved;

  saved = (struct app_save *) xmalloc (sizeof (*saved));
  saved->state = state;
  saved->old_state = old_state;
  saved->out_string = out_string;
  memcpy (saved->out_buf, out_buf, sizeof (out_buf));
  saved->add_newlines = add_newlines;
  if (saved_input == NULL)
    saved->saved_input = NULL;
  else
    {
      saved->saved_input = xmalloc (saved_input_len);
      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->symver_state = symver_state;
#endif

  /* do_scrub_begin() is not useful, just wastes time.  */

  state = 0;
  saved_input = NULL;

  return (char *) saved;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void as_abort ( const char *  ,
int  ,
const char *   
)

Definition at line 411 of file messages.c.

{
  as_show_where ();
  if (fn)
    fprintf (stderr, _("Internal error, aborting at %s line %d in %s\n"),
            file, line, fn);
  else
    fprintf (stderr, _("Internal error, aborting at %s line %d\n"),
            file, line);
  fprintf (stderr, _("Please report this bug.\n"));
  xexit (EXIT_FAILURE);
}

Here is the call graph for this function:

void as_assert ( const char *  ,
int  ,
const char *   
)

Definition at line 394 of file messages.c.

{
  as_show_where ();
  fprintf (stderr, _("Internal error!\n"));
  if (fn)
    fprintf (stderr, _("Assertion failure in %s at %s line %d.\n"),
            fn, file, line);
  else
    fprintf (stderr, _("Assertion failure at %s line %d.\n"), file, line);
  fprintf (stderr, _("Please report this bug.\n"));
  xexit (EXIT_FAILURE);
}

Here is the call graph for this function:

void as_bad_value_out_of_range ( char *  ,
offsetT  ,
offsetT  ,
offsetT  ,
char *  ,
unsigned   
)

Definition at line 511 of file messages.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void as_warn_value_out_of_range ( char *  ,
offsetT  ,
offsetT  ,
offsetT  ,
char *  ,
unsigned   
)

Definition at line 500 of file messages.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void as_where ( char **  ,
unsigned int  
)

Definition at line 490 of file input-scrub.c.

{
  if (logical_input_file != NULL
      && (linep == NULL || logical_input_line >= 0))
    {
      *namep = logical_input_file;
      if (linep != NULL)
       *linep = logical_input_line;
    }
  else if (physical_input_file != NULL)
    {
      *namep = physical_input_file;
      if (linep != NULL)
       *linep = physical_input_line;
    }
  else
    {
      *namep = 0;
      if (linep != NULL)
       *linep = 0;
    }
}

Here is the caller graph for this function:

char* atof_ieee ( char *  ,
int  ,
LITTLENUM_TYPE  
)

Definition at line 162 of file atof-ieee.c.

{
  /* Extra bits for zeroed low-order bits.
     The 1st MAX_PRECISION are zeroed, the last contain flonum bits.  */
  static LITTLENUM_TYPE bits[MAX_PRECISION + MAX_PRECISION + GUARD];
  char *return_value;
  /* Number of 16-bit words in the format.  */
  int precision;
  long exponent_bits;
  FLONUM_TYPE save_gen_flonum;

  /* We have to save the generic_floating_point_number because it
     contains storage allocation about the array of LITTLENUMs where
     the value is actually stored.  We will allocate our own array of
     littlenums below, but have to restore the global one on exit.  */
  save_gen_flonum = generic_floating_point_number;

  return_value = str;
  generic_floating_point_number.low = bits + MAX_PRECISION;
  generic_floating_point_number.high = NULL;
  generic_floating_point_number.leader = NULL;
  generic_floating_point_number.exponent = 0;
  generic_floating_point_number.sign = '\0';

  /* Use more LittleNums than seems necessary: the highest flonum may
     have 15 leading 0 bits, so could be useless.  */

  memset (bits, '\0', sizeof (LITTLENUM_TYPE) * MAX_PRECISION);

  switch (what_kind)
    {
    case 'f':
    case 'F':
    case 's':
    case 'S':
      precision = F_PRECISION;
      exponent_bits = 8;
      break;

    case 'd':
    case 'D':
    case 'r':
    case 'R':
      precision = D_PRECISION;
      exponent_bits = 11;
      break;

    case 'x':
    case 'X':
    case 'e':
    case 'E':
      precision = X_PRECISION;
      exponent_bits = 15;
      break;

    case 'p':
    case 'P':

      precision = P_PRECISION;
      exponent_bits = -1;
      break;

    default:
      make_invalid_floating_point_number (words);
      return (NULL);
    }

  generic_floating_point_number.high
    = generic_floating_point_number.low + precision - 1 + GUARD;

  if (atof_generic (&return_value, ".", EXP_CHARS,
                  &generic_floating_point_number))
    {
      make_invalid_floating_point_number (words);
      return NULL;
    }
  gen_to_words (words, precision, exponent_bits);

  /* Restore the generic_floating_point_number's storage alloc (and
     everything else).  */
  generic_floating_point_number = save_gen_flonum;

  return return_value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void bump_line_counters ( void  )

Definition at line 419 of file input-scrub.c.

Here is the caller graph for this function:

Definition at line 242 of file ehopt.c.

{
  struct frame_data
  {
    enum frame_state
    {
      state_idle,
      state_saw_size,
      state_saw_cie_offset,
      state_saw_pc_begin,
      state_seeing_aug_size,
      state_skipping_aug,
      state_wait_loc4,
      state_saw_loc4,
      state_error,
    } state;

    int cie_info_ok;
    struct cie_info cie_info;

    symbolS *size_end_sym;
    fragS *loc4_frag;
    int loc4_fix;

    int aug_size;
    int aug_shift;
  };

  static struct frame_data eh_frame_data;
  static struct frame_data debug_frame_data;
  struct frame_data *d;

  /* Don't optimize.  */
  if (flag_traditional_format)
    return 0;

  /* Select the proper section data.  */
  if (strcmp (segment_name (now_seg), ".eh_frame") == 0)
    d = &eh_frame_data;
  else if (strcmp (segment_name (now_seg), ".debug_frame") == 0)
    d = &debug_frame_data;
  else
    return 0;

  if (d->state >= state_saw_size && S_IS_DEFINED (d->size_end_sym))
    {
      /* We have come to the end of the CIE or FDE.  See below where
         we set saw_size.  We must check this first because we may now
         be looking at the next size.  */
      d->state = state_idle;
    }

  switch (d->state)
    {
    case state_idle:
      if (*pnbytes == 4)
       {
         /* This might be the size of the CIE or FDE.  We want to know
            the size so that we don't accidentally optimize across an FDE
            boundary.  We recognize the size in one of two forms: a
            symbol which will later be defined as a difference, or a
            subtraction of two symbols.  Either way, we can tell when we
            are at the end of the FDE because the symbol becomes defined
            (in the case of a subtraction, the end symbol, from which the
            start symbol is being subtracted).  Other ways of describing
            the size will not be optimized.  */
         if ((exp->X_op == O_symbol || exp->X_op == O_subtract)
             && ! S_IS_DEFINED (exp->X_add_symbol))
           {
             d->state = state_saw_size;
             d->size_end_sym = exp->X_add_symbol;
           }
       }
      break;

    case state_saw_size:
    case state_saw_cie_offset:
      /* Assume whatever form it appears in, it appears atomically.  */
      d->state += 1;
      break;

    case state_saw_pc_begin:
      /* Decide whether we should see an augmentation.  */
      if (! d->cie_info_ok
         && ! (d->cie_info_ok = get_cie_info (&d->cie_info)))
       d->state = state_error;
      else if (d->cie_info.z_augmentation)
       {
         d->state = state_seeing_aug_size;
         d->aug_size = 0;
         d->aug_shift = 0;
       }
      else
       d->state = state_wait_loc4;
      break;

    case state_seeing_aug_size:
      /* Bytes == -1 means this comes from an leb128 directive.  */
      if ((int)*pnbytes == -1 && exp->X_op == O_constant)
       {
         d->aug_size = exp->X_add_number;
         d->state = state_skipping_aug;
       }
      else if (*pnbytes == 1 && exp->X_op == O_constant)
       {
         unsigned char byte = exp->X_add_number;
         d->aug_size |= (byte & 0x7f) << d->aug_shift;
         d->aug_shift += 7;
         if ((byte & 0x80) == 0)
           d->state = state_skipping_aug;
       }
      else
       d->state = state_error;
      if (d->state == state_skipping_aug && d->aug_size == 0)
       d->state = state_wait_loc4;
      break;

    case state_skipping_aug:
      if ((int)*pnbytes < 0)
       d->state = state_error;
      else
       {
         int left = (d->aug_size -= *pnbytes);
         if (left == 0)
           d->state = state_wait_loc4;
         else if (left < 0)
           d->state = state_error;
       }
      break;

    case state_wait_loc4:
      if (*pnbytes == 1
         && exp->X_op == O_constant
         && exp->X_add_number == DW_CFA_advance_loc4)
       {
         /* This might be a DW_CFA_advance_loc4.  Record the frag and the
            position within the frag, so that we can change it later.  */
         frag_grow (1);
         d->state = state_saw_loc4;
         d->loc4_frag = frag_now;
         d->loc4_fix = frag_now_fix ();
       }
      break;

    case state_saw_loc4:
      d->state = state_wait_loc4;
      if (*pnbytes != 4)
       break;
      if (exp->X_op == O_constant)
       {
         /* This is a case which we can optimize.  The two symbols being
            subtracted were in the same frag and the expression was
            reduced to a constant.  We can do the optimization entirely
            in this function.  */
         if (d->cie_info.code_alignment > 0
             && exp->X_add_number % d->cie_info.code_alignment == 0
             && exp->X_add_number / d->cie_info.code_alignment < 0x40)
           {
             d->loc4_frag->fr_literal[d->loc4_fix]
              = DW_CFA_advance_loc
                | (exp->X_add_number / d->cie_info.code_alignment);
             /* No more bytes needed.  */
             return 1;
           }
         else if (exp->X_add_number < 0x100)
           {
             d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1;
             *pnbytes = 1;
           }
         else if (exp->X_add_number < 0x10000)
           {
             d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2;
             *pnbytes = 2;
           }
       }
      else if (exp->X_op == O_subtract)
       {
         /* This is a case we can optimize.  The expression was not
            reduced, so we can not finish the optimization until the end
            of the assembly.  We set up a variant frag which we handle
            later.  */
         int fr_subtype;

         if (d->cie_info.code_alignment > 0)
           fr_subtype = d->cie_info.code_alignment << 3;
         else
           fr_subtype = 0;

         frag_var (rs_cfa, 4, 0, fr_subtype, make_expr_symbol (exp),
                  d->loc4_fix, (char *) d->loc4_frag);
         return 1;
       }
      break;

    case state_error:
      /* Just skipping everything.  */
      break;
    }

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cond_exit_macro ( int  )

Definition at line 567 of file cond.c.

{
  while (current_cframe != NULL && current_cframe->macro_nest >= nest)
    {
      struct conditional_frame *hold;

      hold = current_cframe;
      current_cframe = current_cframe->previous_cframe;
      obstack_free (&cond_obstack, hold);
    }
}

Here is the caller graph for this function:

void cond_finish_check ( int  )

Definition at line 544 of file cond.c.

{
  if (current_cframe != NULL && current_cframe->macro_nest >= nest)
    {
      if (nest >= 0)
       as_bad (_("end of macro inside conditional"));
      else
       as_bad (_("end of file inside conditional"));
      as_bad_where (current_cframe->if_file_line.file,
                  current_cframe->if_file_line.line,
                  _("here is the start of the unterminated conditional"));
      if (current_cframe->else_seen)
       as_bad_where (current_cframe->else_file_line.file,
                    current_cframe->else_file_line.line,
                    _("here is the \"else\" of the unterminated conditional"));
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void do_scrub_begin ( int  )
int do_scrub_chars ( int(*)(char *, int get,
char *  ,
int   
)

Definition at line 339 of file app.c.

{
  char *to = tostart;
  char *toend = tostart + tolen;
  char *from;
  char *fromend;
  int fromlen;
  register int ch, ch2 = 0;
  /* Character that started the string we're working on.  */
  static char quotechar;

  /*State 0: beginning of normal line
         1: After first whitespace on line (flush more white)
         2: After first non-white (opcode) on line (keep 1white)
         3: after second white on line (into operands) (flush white)
         4: after putting out a .linefile, put out digits
         5: parsing a string, then go to old-state
         6: putting out \ escape in a "d string.
         7: no longer used
         8: no longer used
         9: After seeing symbol char in state 3 (keep 1white after symchar)
        10: After seeing whitespace in state 9 (keep white before symchar)
        11: After seeing a symbol character in state 0 (eg a label definition)
        -1: output string in out_string and go to the state in old_state
        -2: flush text until a '*' '/' is seen, then go to state old_state
#ifdef TC_V850
        12: After seeing a dash, looking for a second dash as a start
            of comment.
#endif
#ifdef DOUBLEBAR_PARALLEL
        13: After seeing a vertical bar, looking for a second
            vertical bar as a parallel expression separator.
#endif
#ifdef TC_IA64
        14: After seeing a `(' at state 0, looking for a `)' as
            predicate.
        15: After seeing a `(' at state 1, looking for a `)' as
            predicate.
#endif
#ifdef TC_Z80
        16: After seeing an 'a' or an 'A' at the start of a symbol
        17: After seeing an 'f' or an 'F' in state 16
#endif
         */

  /* I added states 9 and 10 because the MIPS ECOFF assembler uses
     constructs like ``.loc 1 20''.  This was turning into ``.loc
     120''.  States 9 and 10 ensure that a space is never dropped in
     between characters which could appear in an identifier.  Ian
     Taylor, ian@cygnus.com.

     I added state 11 so that something like "Lfoo add %r25,%r26,%r27" works
     correctly on the PA (and any other target where colons are optional).
     Jeff Law, law@cs.utah.edu.

     I added state 13 so that something like "cmp r1, r2 || trap #1" does not
     get squashed into "cmp r1,r2||trap#1", with the all important space
     between the 'trap' and the '#1' being eliminated.  nickc@cygnus.com  */

  /* This macro gets the next input character.  */

#define GET()                                           \
  (from < fromend                                       \
   ? * (unsigned char *) (from++)                       \
   : (saved_input = NULL,                               \
      fromlen = (*get) (input_buffer, sizeof input_buffer),    \
      from = input_buffer,                              \
      fromend = from + fromlen,                                \
      (fromlen == 0                                     \
       ? EOF                                            \
       : * (unsigned char *) (from++))))

  /* This macro pushes a character back on the input stream.  */

#define UNGET(uch) (*--from = (uch))

  /* This macro puts a character into the output buffer.  If this
     character fills the output buffer, this macro jumps to the label
     TOFULL.  We use this rather ugly approach because we need to
     handle two different termination conditions: EOF on the input
     stream, and a full output buffer.  It would be simpler if we
     always read in the entire input stream before processing it, but
     I don't want to make such a significant change to the assembler's
     memory usage.  */

#define PUT(pch)                          \
  do                                      \
    {                                     \
      *to++ = (pch);                      \
      if (to >= toend)                           \
       goto tofull;                       \
    }                                     \
  while (0)

  if (saved_input != NULL)
    {
      from = saved_input;
      fromend = from + saved_input_len;
    }
  else
    {
      fromlen = (*get) (input_buffer, sizeof input_buffer);
      if (fromlen == 0)
       return 0;
      from = input_buffer;
      fromend = from + fromlen;
    }

  while (1)
    {
      /* The cases in this switch end with continue, in order to
        branch back to the top of this while loop and generate the
        next output character in the appropriate state.  */
      switch (state)
       {
       case -1:
         ch = *out_string++;
         if (*out_string == '\0')
           {
             state = old_state;
             old_state = 3;
           }
         PUT (ch);
         continue;

       case -2:
         for (;;)
           {
             do
              {
                ch = GET ();

                if (ch == EOF)
                  {
                    as_warn (_("end of file in comment"));
                    goto fromeof;
                  }

                if (ch == '\n')
                  PUT ('\n');
              }
             while (ch != '*');

             while ((ch = GET ()) == '*')
              ;

             if (ch == EOF)
              {
                as_warn (_("end of file in comment"));
                goto fromeof;
              }

             if (ch == '/')
              break;

             UNGET (ch);
           }

         state = old_state;
         UNGET (' ');
         continue;

       case 4:
         ch = GET ();
         if (ch == EOF)
           goto fromeof;
         else if (ch >= '0' && ch <= '9')
           PUT (ch);
         else
           {
             while (ch != EOF && IS_WHITESPACE (ch))
              ch = GET ();
             if (ch == '"')
              {
                quotechar = ch;
                state = 5;
                old_state = 3;
                PUT (ch);
              }
             else
              {
                while (ch != EOF && ch != '\n')
                  ch = GET ();
                state = 0;
                PUT (ch);
              }
           }
         continue;

       case 5:
         /* We are going to copy everything up to a quote character,
            with special handling for a backslash.  We try to
            optimize the copying in the simple case without using the
            GET and PUT macros.  */
         {
           char *s;
           int len;

           for (s = from; s < fromend; s++)
             {
              ch = *s;
              if (ch == '\\'
                  || ch == quotechar
                  || ch == '\n')
                break;
             }
           len = s - from;
           if (len > toend - to)
             len = toend - to;
           if (len > 0)
             {
              memcpy (to, from, len);
              to += len;
              from += len;
             }
         }

         ch = GET ();
         if (ch == EOF)
           {
             as_warn (_("end of file in string; '%c' inserted"), quotechar);
             state = old_state;
             UNGET ('\n');
             PUT (quotechar);
           }
         else if (ch == quotechar)
           {
             state = old_state;
             PUT (ch);
           }
#ifndef NO_STRING_ESCAPES
         else if (ch == '\\')
           {
             state = 6;
             PUT (ch);
           }
#endif
         else if (scrub_m68k_mri && ch == '\n')
           {
             /* Just quietly terminate the string.  This permits lines like
                 bne label  loop if we haven't reach end yet.  */
             state = old_state;
             UNGET (ch);
             PUT ('\'');
           }
         else
           {
             PUT (ch);
           }
         continue;

       case 6:
         state = 5;
         ch = GET ();
         switch (ch)
           {
             /* Handle strings broken across lines, by turning '\n' into
               '\\' and 'n'.  */
           case '\n':
             UNGET ('n');
             add_newlines++;
             PUT ('\\');
             continue;

           case EOF:
             as_warn (_("end of file in string; '%c' inserted"), quotechar);
             PUT (quotechar);
             continue;

           case '"':
           case '\\':
           case 'b':
           case 'f':
           case 'n':
           case 'r':
           case 't':
           case 'v':
           case 'x':
           case 'X':
           case '0':
           case '1':
           case '2':
           case '3':
           case '4':
           case '5':
           case '6':
           case '7':
             break;

           default:
#ifdef ONLY_STANDARD_ESCAPES
             as_warn (_("unknown escape '\\%c' in string; ignored"), ch);
#endif
             break;
           }
         PUT (ch);
         continue;

#ifdef DOUBLEBAR_PARALLEL
       case 13:
         ch = GET ();
         if (ch != '|')
           abort ();

         /* Reset back to state 1 and pretend that we are parsing a
            line from just after the first white space.  */
         state = 1;
         PUT ('|');
         continue;
#endif
#ifdef TC_Z80
       case 16:
         /* We have seen an 'a' at the start of a symbol, look for an 'f'.  */
         ch = GET ();
         if (ch == 'f' || ch == 'F') 
           {
             state = 17;
             PUT (ch);
           }
         else
           {
             state = 9;
             break;
           }
       case 17:
         /* We have seen "af" at the start of a symbol,
            a ' here is a part of that symbol.  */
         ch = GET ();
         state = 9;
         if (ch == '\'')
           /* Change to avoid warning about unclosed string.  */
           PUT ('`');
         else
           UNGET (ch);
         break;
#endif
       }

      /* OK, we are somewhere in states 0 through 4 or 9 through 11.  */

      /* flushchar: */
      ch = GET ();

#ifdef TC_IA64
      if (ch == '(' && (state == 0 || state == 1))
       {
         state += 14;
         PUT (ch);
         continue;
       }
      else if (state == 14 || state == 15)
       {
         if (ch == ')')
           {
             state -= 14;
             PUT (ch);
             ch = GET ();
           }
         else
           {
             PUT (ch);
             continue;
           }
       }
#endif

    recycle:

#if defined TC_ARM && defined OBJ_ELF
      /* We need to watch out for .symver directives.  See the comment later
        in this function.  */
      if (symver_state == NULL)
       {
         if ((state == 0 || state == 1) && ch == symver_pseudo[0])
           symver_state = symver_pseudo + 1;
       }
      else
       {
         /* We advance to the next state if we find the right
            character.  */
         if (ch != '\0' && (*symver_state == ch))
           ++symver_state;
         else if (*symver_state != '\0')
           /* We did not get the expected character, or we didn't
              get a valid terminating character after seeing the
              entire pseudo-op, so we must go back to the beginning.  */
           symver_state = NULL;
         else
           {
             /* We've read the entire pseudo-op.  If this is the end
               of the line, go back to the beginning.  */
             if (IS_NEWLINE (ch))
              symver_state = NULL;
           }
       }
#endif /* TC_ARM && OBJ_ELF */

#ifdef TC_M68K
      /* We want to have pseudo-ops which control whether we are in
        MRI mode or not.  Unfortunately, since m68k MRI mode affects
        the scrubber, that means that we need a special purpose
        recognizer here.  */
      if (mri_state == NULL)
       {
         if ((state == 0 || state == 1)
             && ch == mri_pseudo[0])
           mri_state = mri_pseudo + 1;
       }
      else
       {
         /* We advance to the next state if we find the right
            character, or if we need a space character and we get any
            whitespace character, or if we need a '0' and we get a
            '1' (this is so that we only need one state to handle
            ``.mri 0'' and ``.mri 1'').  */
         if (ch != '\0'
             && (*mri_state == ch
                || (*mri_state == ' '
                    && lex[ch] == LEX_IS_WHITESPACE)
                || (*mri_state == '0'
                    && ch == '1')))
           {
             mri_last_ch = ch;
             ++mri_state;
           }
         else if (*mri_state != '\0'
                 || (lex[ch] != LEX_IS_WHITESPACE
                     && lex[ch] != LEX_IS_NEWLINE))
           {
             /* We did not get the expected character, or we didn't
               get a valid terminating character after seeing the
               entire pseudo-op, so we must go back to the
               beginning.  */
             mri_state = NULL;
           }
         else
           {
             /* We've read the entire pseudo-op.  mips_last_ch is
               either '0' or '1' indicating whether to enter or
               leave MRI mode.  */
             do_scrub_begin (mri_last_ch == '1');
             mri_state = NULL;

             /* We continue handling the character as usual.  The
               main gas reader must also handle the .mri pseudo-op
               to control expression parsing and the like.  */
           }
       }
#endif

      if (ch == EOF)
       {
         if (state != 0)
           {
             as_warn (_("end of file not at end of a line; newline inserted"));
             state = 0;
             PUT ('\n');
           }
         goto fromeof;
       }

      switch (lex[ch])
       {
       case LEX_IS_WHITESPACE:
         do
           {
             ch = GET ();
           }
         while (ch != EOF && IS_WHITESPACE (ch));
         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;
           }

#ifdef KEEP_WHITE_AROUND_COLON
         if (lex[ch] == LEX_IS_COLON)
           {
             /* Only keep this white if there's no white *after* the
               colon.  */
             ch2 = GET ();
             UNGET (ch2);
             if (!IS_WHITESPACE (ch2))
              {
                state = 9;
                UNGET (ch);
                PUT (' ');
                break;
              }
           }
#endif
         if (IS_COMMENT (ch)
             || ch == '/'
             || IS_LINE_SEPARATOR (ch)
             || IS_PARALLEL_SEPARATOR (ch))
           {
             if (scrub_m68k_mri)
              {
                /* In MRI mode, we keep these spaces.  */
                UNGET (ch);
                PUT (' ');
                break;
              }
             goto recycle;
           }

         /* If we're in state 2 or 11, we've seen a non-white
            character followed by whitespace.  If the next character
            is ':', this is whitespace after a label name which we
            normally must ignore.  In MRI mode, though, spaces are
            not permitted between the label and the colon.  */
         if ((state == 2 || state == 11)
             && lex[ch] == LEX_IS_COLON
             && ! scrub_m68k_mri)
           {
             state = 1;
             PUT (ch);
             break;
           }

         switch (state)
           {
           case 1:
             /* We can arrive here if we leave a leading whitespace
               character at the beginning of a line.  */
             goto recycle;
           case 2:
             state = 3;
             if (to + 1 < toend)
              {
                /* Optimize common case by skipping UNGET/GET.  */
                PUT (' ');  /* Sp after opco */
                goto recycle;
              }
             UNGET (ch);
             PUT (' ');
             break;
           case 3:
             if (scrub_m68k_mri)
              {
                /* In MRI mode, we keep these spaces.  */
                UNGET (ch);
                PUT (' ');
                break;
              }
             goto recycle;  /* Sp in operands */
           case 9:
           case 10:
             if (scrub_m68k_mri)
              {
                /* In MRI mode, we keep these spaces.  */
                state = 3;
                UNGET (ch);
                PUT (' ');
                break;
              }
             state = 10;    /* Sp after symbol char */
             goto recycle;
           case 11:
             if (LABELS_WITHOUT_COLONS || flag_m68k_mri)
              state = 1;
             else
              {
                /* We know that ch is not ':', since we tested that
                   case above.  Therefore this is not a label, so it
                   must be the opcode, and we've just seen the
                   whitespace after it.  */
                state = 3;
              }
             UNGET (ch);
             PUT (' ');     /* Sp after label definition.  */
             break;
           default:
             BAD_CASE (state);
           }
         break;

       case LEX_IS_TWOCHAR_COMMENT_1ST:
         ch2 = GET ();
         if (ch2 == '*')
           {
             for (;;)
              {
                do
                  {
                    ch2 = GET ();
                    if (ch2 != EOF && IS_NEWLINE (ch2))
                     add_newlines++;
                  }
                while (ch2 != EOF && ch2 != '*');

                while (ch2 == '*')
                  ch2 = GET ();

                if (ch2 == EOF || ch2 == '/')
                  break;

                /* This UNGET will ensure that we count newlines
                   correctly.  */
                UNGET (ch2);
              }

             if (ch2 == EOF)
              as_warn (_("end of file in multiline comment"));

             ch = ' ';
             goto recycle;
           }
#ifdef DOUBLESLASH_LINE_COMMENTS
         else if (ch2 == '/')
           {
             do
              {
                ch = GET ();
              }
             while (ch != EOF && !IS_NEWLINE (ch));
             if (ch == EOF)
              as_warn ("end of file in comment; newline inserted");
             state = 0;
             PUT ('\n');
             break;
           }
#endif
         else
           {
             if (ch2 != EOF)
              UNGET (ch2);
             if (state == 9 || state == 10)
              state = 3;
             PUT (ch);
           }
         break;

       case LEX_IS_STRINGQUOTE:
         quotechar = ch;
         if (state == 10)
           {
             /* Preserve the whitespace in foo "bar".  */
             UNGET (ch);
             state = 3;
             PUT (' ');

             /* PUT didn't jump out.  We could just break, but we
               know what will happen, so optimize a bit.  */
             ch = GET ();
             old_state = 3;
           }
         else if (state == 9)
           old_state = 3;
         else
           old_state = state;
         state = 5;
         PUT (ch);
         break;

#ifndef IEEE_STYLE
       case LEX_IS_ONECHAR_QUOTE:
         if (state == 10)
           {
             /* Preserve the whitespace in foo 'b'.  */
             UNGET (ch);
             state = 3;
             PUT (' ');
             break;
           }
         ch = GET ();
         if (ch == EOF)
           {
             as_warn (_("end of file after a one-character quote; \\0 inserted"));
             ch = 0;
           }
         if (ch == '\\')
           {
             ch = GET ();
             if (ch == EOF)
              {
                as_warn (_("end of file in escape character"));
                ch = '\\';
              }
             else
              ch = process_escape (ch);
           }
         sprintf (out_buf, "%d", (int) (unsigned char) ch);

         /* None of these 'x constants for us.  We want 'x'.  */
         if ((ch = GET ()) != '\'')
           {
#ifdef REQUIRE_CHAR_CLOSE_QUOTE
             as_warn (_("missing close quote; (assumed)"));
#else
             if (ch != EOF)
              UNGET (ch);
#endif
           }
         if (strlen (out_buf) == 1)
           {
             PUT (out_buf[0]);
             break;
           }
         if (state == 9)
           old_state = 3;
         else
           old_state = state;
         state = -1;
         out_string = out_buf;
         PUT (*out_string++);
         break;
#endif

       case LEX_IS_COLON:
#ifdef KEEP_WHITE_AROUND_COLON
         state = 9;
#else
         if (state == 9 || state == 10)
           state = 3;
         else if (state != 3)
           state = 1;
#endif
         PUT (ch);
         break;

       case LEX_IS_NEWLINE:
         /* Roll out a bunch of newlines from inside comments, etc.  */
         if (add_newlines)
           {
             --add_newlines;
             UNGET (ch);
           }
         /* Fall through.  */

       case LEX_IS_LINE_SEPARATOR:
         state = 0;
         PUT (ch);
         break;

       case LEX_IS_PARALLEL_SEPARATOR:
         state = 1;
         PUT (ch);
         break;

#ifdef TC_V850
       case LEX_IS_DOUBLEDASH_1ST:
         ch2 = GET ();
         if (ch2 != '-')
           {
             UNGET (ch2);
             goto de_fault;
           }
         /* Read and skip to end of line.  */
         do
           {
             ch = GET ();
           }
         while (ch != EOF && ch != '\n');

         if (ch == EOF)
           as_warn (_("end of file in comment; newline inserted"));

         state = 0;
         PUT ('\n');
         break;
#endif
#ifdef DOUBLEBAR_PARALLEL
       case LEX_IS_DOUBLEBAR_1ST:
         ch2 = GET ();
         UNGET (ch2);
         if (ch2 != '|')
           goto de_fault;

         /* Handle '||' in two states as invoking PUT twice might
            result in the first one jumping out of this loop.  We'd
            then lose track of the state and one '|' char.  */
         state = 13;
         PUT ('|');
         break;
#endif
       case LEX_IS_LINE_COMMENT_START:
         /* FIXME-someday: The two character comment stuff was badly
            thought out.  On i386, we want '/' as line comment start
            AND we want C style comments.  hence this hack.  The
            whole lexical process should be reworked.  xoxorich.  */
         if (ch == '/')
           {
             ch2 = GET ();
             if (ch2 == '*')
              {
                old_state = 3;
                state = -2;
                break;
              }
             else
              {
                UNGET (ch2);
              }
           }

         if (state == 0 || state == 1)    /* Only comment at start of line.  */
           {
             int startch;

             startch = ch;

             do
              {
                ch = GET ();
              }
             while (ch != EOF && IS_WHITESPACE (ch));

             if (ch == EOF)
              {
                as_warn (_("end of file in comment; newline inserted"));
                PUT ('\n');
                break;
              }

             if (ch < '0' || ch > '9' || state != 0 || startch != '#')
              {
                /* Not a cpp line.  */
                while (ch != EOF && !IS_NEWLINE (ch))
                  ch = GET ();
                if (ch == EOF)
                  as_warn (_("end of file in comment; newline inserted"));
                state = 0;
                PUT ('\n');
                break;
              }
             /* Looks like `# 123 "filename"' from cpp.  */
             UNGET (ch);
             old_state = 4;
             state = -1;
             if (scrub_m68k_mri)
              out_string = "\tlinefile ";
             else
              out_string = "\t.linefile ";
             PUT (*out_string++);
             break;
           }

#ifdef TC_D10V
         /* All insns end in a char for which LEX_IS_SYMBOL_COMPONENT is true.
            Trap is the only short insn that has a first operand that is
            neither register nor label.
            We must prevent exef0f ||trap #1 to degenerate to exef0f ||trap#1 .
            We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is
            already LEX_IS_LINE_COMMENT_START.  However, it is the
            only character in line_comment_chars for d10v, hence we
            can recognize it as such.  */
         /* An alternative approach would be to reset the state to 1 when
            we see '||', '<'- or '->', but that seems to be overkill.  */
         if (state == 10)
           PUT (' ');
#endif
         /* We have a line comment character which is not at the
            start of a line.  If this is also a normal comment
            character, fall through.  Otherwise treat it as a default
            character.  */
         if (strchr (tc_comment_chars, ch) == NULL
             && (! scrub_m68k_mri
                || (ch != '!' && ch != '*')))
           goto de_fault;
         if (scrub_m68k_mri
             && (ch == '!' || ch == '*' || ch == '#')
             && state != 1
             && state != 10)
           goto de_fault;
         /* Fall through.  */
       case LEX_IS_COMMENT_START:
#if defined TC_ARM && defined OBJ_ELF
         /* On the ARM, `@' is the comment character.
            Unfortunately this is also a special character in ELF .symver
            directives (and .type, though we deal with those another way).
            So we check if this line is such a directive, and treat
            the character as default if so.  This is a hack.  */
         if ((symver_state != NULL) && (*symver_state == 0))
           goto de_fault;
#endif
#ifdef WARN_COMMENTS
         if (!found_comment)
           as_where (&found_comment_file, &found_comment);
#endif
         do
           {
             ch = GET ();
           }
         while (ch != EOF && !IS_NEWLINE (ch));
         if (ch == EOF)
           as_warn (_("end of file in comment; newline inserted"));
         state = 0;
         PUT ('\n');
         break;

       case LEX_IS_SYMBOL_COMPONENT:
         if (state == 10)
           {
             /* This is a symbol character following another symbol
               character, with whitespace in between.  We skipped
               the whitespace earlier, so output it now.  */
             UNGET (ch);
             state = 3;
             PUT (' ');
             break;
           }

#ifdef TC_Z80
         /* "af'" is a symbol containing '\''.  */
         if (state == 3 && (ch == 'a' || ch == 'A')) 
           {
             state = 16;
             PUT (ch);
             ch = GET ();
             if (ch == 'f' || ch == 'F') 
              {
                state = 17;
                PUT (ch);
                break;
              }
             else
              {
                state = 9;
                if (!IS_SYMBOL_COMPONENT (ch)) 
                  {
                    UNGET (ch);
                    break;
                  }
              }
           }
#endif
         if (state == 3)
           state = 9;

         /* This is a common case.  Quickly copy CH and all the
            following symbol component or normal characters.  */
         if (to + 1 < toend
             && mri_state == NULL
#if defined TC_ARM && defined OBJ_ELF
             && symver_state == NULL
#endif
             )
           {
             char *s;
             int len;

             for (s = from; s < fromend; s++)
              {
                int type;

                ch2 = *(unsigned char *) s;
                type = lex[ch2];
                if (type != 0
                    && type != LEX_IS_SYMBOL_COMPONENT)
                  break;
              }

             if (s > from)
              /* Handle the last character normally, for
                 simplicity.  */
              --s;

             len = s - from;

             if (len > (toend - to) - 1)
              len = (toend - to) - 1;

             if (len > 0)
              {
                PUT (ch);
                memcpy (to, from, len);
                to += len;
                from += len;
                if (to >= toend)
                  goto tofull;
                ch = GET ();
              }
           }

         /* Fall through.  */
       default:
       de_fault:
         /* Some relatively `normal' character.  */
         if (state == 0)
           {
             state = 11;    /* Now seeing label definition.  */
           }
         else if (state == 1)
           {
             state = 2;     /* Ditto.  */
           }
         else if (state == 9)
           {
             if (!IS_SYMBOL_COMPONENT (ch))
              state = 3;
           }
         else if (state == 10)
           {
             if (ch == '\\')
              {
                /* Special handling for backslash: a backslash may
                   be the beginning of a formal parameter (of a
                   macro) following another symbol character, with
                   whitespace in between.  If that is the case, we
                   output a space before the parameter.  Strictly
                   speaking, correct handling depends upon what the
                   macro parameter expands into; if the parameter
                   expands into something which does not start with
                   an operand character, then we don't want to keep
                   the space.  We don't have enough information to
                   make the right choice, so here we are making the
                   choice which is more likely to be correct.  */
                PUT (' ');
              }

             state = 3;
           }
         PUT (ch);
         break;
       }
    }

  /*NOTREACHED*/

 fromeof:
  /* We have reached the end of the input.  */
  return to - tostart;

 tofull:
  /* The output buffer is full.  Save any input we have not yet
     processed.  */
  if (fromend > from)
    {
      saved_input = from;
      saved_input_len = fromend - from;
    }
  else
    saved_input = NULL;

  return to - tostart;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void eh_frame_convert_frag ( fragS *  )

Definition at line 490 of file ehopt.c.

{
  offsetT diff;
  fragS *loc4_frag;
  int loc4_fix;

  loc4_frag = (fragS *) frag->fr_opcode;
  loc4_fix = (int) frag->fr_offset;

  diff = resolve_symbol_value (frag->fr_symbol);

  switch (frag->fr_subtype & 7)
    {
    case 0:
      {
       int ca = frag->fr_subtype >> 3;
       assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40);
       loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca);
      }
      break;

    case 1:
      assert (diff < 0x100);
      loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1;
      frag->fr_literal[frag->fr_fix] = diff;
      break;

    case 2:
      assert (diff < 0x10000);
      loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2;
      md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 2);
      break;

    default:
      md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 4);
      break;
    }

  frag->fr_fix += frag->fr_subtype & 7;
  frag->fr_type = rs_fill;
  frag->fr_subtype = 0;
  frag->fr_offset = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 449 of file ehopt.c.

{
  offsetT diff;
  int ca = frag->fr_subtype >> 3;
  int ret;

  diff = resolve_symbol_value (frag->fr_symbol);

  if (ca > 0 && diff % ca == 0 && diff / ca < 0x40)
    ret = 0;
  else if (diff < 0x100)
    ret = 1;
  else if (diff < 0x10000)
    ret = 2;
  else
    ret = 4;

  frag->fr_subtype = (frag->fr_subtype & ~7) | ret;

  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int eh_frame_relax_frag ( fragS *  )

Definition at line 476 of file ehopt.c.

{
  int oldsize, newsize;

  oldsize = frag->fr_subtype & 7;
  newsize = eh_frame_estimate_size_before_relax (frag);
  return newsize - oldsize;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int gen_to_words ( LITTLENUM_TYPE ,
int  ,
long   
)

Definition at line 252 of file atof-ieee.c.

{
  int return_value = 0;

  long exponent_1;
  long exponent_2;
  long exponent_3;
  long exponent_4;
  int exponent_skippage;
  LITTLENUM_TYPE word1;
  LITTLENUM_TYPE *lp;
  LITTLENUM_TYPE *words_end;

  words_end = words + precision;
#ifdef TC_M68K
  if (precision == X_PRECISION)
    /* On the m68k the extended precision format has a gap of 16 bits
       between the exponent and the mantissa.  */
    words_end++;
#endif

  if (generic_floating_point_number.low > generic_floating_point_number.leader)
    {
      /* 0.0e0 seen.  */
      if (generic_floating_point_number.sign == '+')
       words[0] = 0x0000;
      else
       words[0] = 0x8000;
      memset (&words[1], '\0',
             (words_end - words - 1) * sizeof (LITTLENUM_TYPE));
      return return_value;
    }

  /* NaN:  Do the right thing.  */
  if (generic_floating_point_number.sign == 0)
    {
      if (TC_LARGEST_EXPONENT_IS_NORMAL (precision))
       as_warn ("NaNs are not supported by this target\n");
      if (precision == F_PRECISION)
       {
         words[0] = 0x7fff;
         words[1] = 0xffff;
       }
      else if (precision == X_PRECISION)
       {
#ifdef TC_M68K
         words[0] = 0x7fff;
         words[1] = 0;
         words[2] = 0xffff;
         words[3] = 0xffff;
         words[4] = 0xffff;
         words[5] = 0xffff;
#else /* ! TC_M68K  */
#ifdef TC_I386
         words[0] = 0xffff;
         words[1] = 0xc000;
         words[2] = 0;
         words[3] = 0;
         words[4] = 0;
#else /* ! TC_I386  */
         abort ();
#endif /* ! TC_I386  */
#endif /* ! TC_M68K  */
       }
      else
       {
         words[0] = 0x7fff;
         words[1] = 0xffff;
         words[2] = 0xffff;
         words[3] = 0xffff;
       }
      return return_value;
    }
  else if (generic_floating_point_number.sign == 'P')
    {
      if (TC_LARGEST_EXPONENT_IS_NORMAL (precision))
       as_warn ("Infinities are not supported by this target\n");

      /* +INF:  Do the right thing.  */
      if (precision == F_PRECISION)
       {
         words[0] = 0x7f80;
         words[1] = 0;
       }
      else if (precision == X_PRECISION)
       {
#ifdef TC_M68K
         words[0] = 0x7fff;
         words[1] = 0;
         words[2] = 0;
         words[3] = 0;
         words[4] = 0;
         words[5] = 0;
#else /* ! TC_M68K  */
#ifdef TC_I386
         words[0] = 0x7fff;
         words[1] = 0x8000;
         words[2] = 0;
         words[3] = 0;
         words[4] = 0;
#else /* ! TC_I386  */
         abort ();
#endif /* ! TC_I386  */
#endif /* ! TC_M68K  */
       }
      else
       {
         words[0] = 0x7ff0;
         words[1] = 0;
         words[2] = 0;
         words[3] = 0;
       }
      return return_value;
    }
  else if (generic_floating_point_number.sign == 'N')
    {
      if (TC_LARGEST_EXPONENT_IS_NORMAL (precision))
       as_warn ("Infinities are not supported by this target\n");

      /* Negative INF.  */
      if (precision == F_PRECISION)
       {
         words[0] = 0xff80;
         words[1] = 0x0;
       }
      else if (precision == X_PRECISION)
       {
#ifdef TC_M68K
         words[0] = 0xffff;
         words[1] = 0;
         words[2] = 0;
         words[3] = 0;
         words[4] = 0;
         words[5] = 0;
#else /* ! TC_M68K  */
#ifdef TC_I386
         words[0] = 0xffff;
         words[1] = 0x8000;
         words[2] = 0;
         words[3] = 0;
         words[4] = 0;
#else /* ! TC_I386  */
         abort ();
#endif /* ! TC_I386  */
#endif /* ! TC_M68K  */
       }
      else
       {
         words[0] = 0xfff0;
         words[1] = 0x0;
         words[2] = 0x0;
         words[3] = 0x0;
       }
      return return_value;
    }

  /* The floating point formats we support have:
     Bit 15 is sign bit.
     Bits 14:n are excess-whatever exponent.
     Bits n-1:0 (if any) are most significant bits of fraction.
     Bits 15:0 of the next word(s) are the next most significant bits.

     So we need: number of bits of exponent, number of bits of
     mantissa.  */
  bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS;
  littlenum_pointer = generic_floating_point_number.leader;
  littlenums_left = (1
                   + generic_floating_point_number.leader
                   - generic_floating_point_number.low);

  /* Seek (and forget) 1st significant bit.  */
  for (exponent_skippage = 0; !next_bits (1); ++exponent_skippage);;
  exponent_1 = (generic_floating_point_number.exponent
              + generic_floating_point_number.leader
              + 1
              - generic_floating_point_number.low);

  /* Radix LITTLENUM_RADIX, point just higher than
     generic_floating_point_number.leader.  */
  exponent_2 = exponent_1 * LITTLENUM_NUMBER_OF_BITS;

  /* Radix 2.  */
  exponent_3 = exponent_2 - exponent_skippage;

  /* Forget leading zeros, forget 1st bit.  */
  exponent_4 = exponent_3 + ((1 << (exponent_bits - 1)) - 2);

  /* Offset exponent.  */
  lp = words;

  /* Word 1.  Sign, exponent and perhaps high bits.  */
  word1 = ((generic_floating_point_number.sign == '+')
          ? 0
          : (1 << (LITTLENUM_NUMBER_OF_BITS - 1)));

  /* Assume 2's complement integers.  */
  if (exponent_4 <= 0)
    {
      int prec_bits;
      int num_bits;

      unget_bits (1);
      num_bits = -exponent_4;
      prec_bits =
       LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits);
#ifdef TC_I386
      if (precision == X_PRECISION && exponent_bits == 15)
       {
         /* On the i386 a denormalized extended precision float is
            shifted down by one, effectively decreasing the exponent
            bias by one.  */
         prec_bits -= 1;
         num_bits += 1;
       }
#endif

      if (num_bits >= LITTLENUM_NUMBER_OF_BITS - exponent_bits)
       {
         /* Bigger than one littlenum.  */
         num_bits -= (LITTLENUM_NUMBER_OF_BITS - 1) - exponent_bits;
         *lp++ = word1;
         if (num_bits + exponent_bits + 1
             > precision * LITTLENUM_NUMBER_OF_BITS)
           {
             /* Exponent overflow.  */
             make_invalid_floating_point_number (words);
             return return_value;
           }
#ifdef TC_M68K
         if (precision == X_PRECISION && exponent_bits == 15)
           *lp++ = 0;
#endif
         while (num_bits >= LITTLENUM_NUMBER_OF_BITS)
           {
             num_bits -= LITTLENUM_NUMBER_OF_BITS;
             *lp++ = 0;
           }
         if (num_bits)
           *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS - (num_bits));
       }
      else
       {
         if (precision == X_PRECISION && exponent_bits == 15)
           {
             *lp++ = word1;
#ifdef TC_M68K
             *lp++ = 0;
#endif
             *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS - num_bits);
           }
         else
           {
             word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1)
                              - (exponent_bits + num_bits));
             *lp++ = word1;
           }
       }
      while (lp < words_end)
       *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS);

      /* Round the mantissa up, but don't change the number.  */
      if (next_bits (1))
       {
         --lp;
         if (prec_bits >= LITTLENUM_NUMBER_OF_BITS)
           {
             int n = 0;
             int tmp_bits;

             n = 0;
             tmp_bits = prec_bits;
             while (tmp_bits > LITTLENUM_NUMBER_OF_BITS)
              {
                if (lp[n] != (LITTLENUM_TYPE) - 1)
                  break;
                --n;
                tmp_bits -= LITTLENUM_NUMBER_OF_BITS;
              }
             if (tmp_bits > LITTLENUM_NUMBER_OF_BITS
                || (lp[n] & mask[tmp_bits]) != mask[tmp_bits]
                || (prec_bits != (precision * LITTLENUM_NUMBER_OF_BITS
                                - exponent_bits - 1)
#ifdef TC_I386
                    /* An extended precision float with only the integer
                      bit set would be invalid.  That must be converted
                      to the smallest normalized number.  */
                    && !(precision == X_PRECISION
                        && prec_bits == (precision * LITTLENUM_NUMBER_OF_BITS
                                       - exponent_bits - 2))
#endif
                    ))
              {
                unsigned long carry;

                for (carry = 1; carry && (lp >= words); lp--)
                  {
                    carry = *lp + carry;
                    *lp = carry;
                    carry >>= LITTLENUM_NUMBER_OF_BITS;
                  }
              }
             else
              {
                /* This is an overflow of the denormal numbers.  We
                     need to forget what we have produced, and instead
                     generate the smallest normalized number.  */
                lp = words;
                word1 = ((generic_floating_point_number.sign == '+')
                        ? 0
                        : (1 << (LITTLENUM_NUMBER_OF_BITS - 1)));
                word1 |= (1
                         << ((LITTLENUM_NUMBER_OF_BITS - 1)
                            - exponent_bits));
                *lp++ = word1;
#ifdef TC_I386
                /* Set the integer bit in the extended precision format.
                   This cannot happen on the m68k where the mantissa
                   just overflows into the integer bit above.  */
                if (precision == X_PRECISION)
                  *lp++ = 1 << (LITTLENUM_NUMBER_OF_BITS - 1);
#endif
                while (lp < words_end)
                  *lp++ = 0;
              }
           }
         else
           *lp += 1;
       }

      return return_value;
    }
  else if ((unsigned long) exponent_4 > mask[exponent_bits]
          || (! TC_LARGEST_EXPONENT_IS_NORMAL (precision)
              && (unsigned long) exponent_4 == mask[exponent_bits]))
    {
      /* Exponent overflow.  Lose immediately.  */

      /* We leave return_value alone: admit we read the
        number, but return a floating exception
        because we can't encode the number.  */
      make_invalid_floating_point_number (words);
      return return_value;
    }
  else
    {
      word1 |= (exponent_4 << ((LITTLENUM_NUMBER_OF_BITS - 1) - exponent_bits))
       | next_bits ((LITTLENUM_NUMBER_OF_BITS - 1) - exponent_bits);
    }

  *lp++ = word1;

  /* X_PRECISION is special: on the 68k, it has 16 bits of zero in the
     middle.  Either way, it is then followed by a 1 bit.  */
  if (exponent_bits == 15 && precision == X_PRECISION)
    {
#ifdef TC_M68K
      *lp++ = 0;
#endif
      *lp++ = (1 << (LITTLENUM_NUMBER_OF_BITS - 1)
              | next_bits (LITTLENUM_NUMBER_OF_BITS - 1));
    }

  /* The rest of the words are just mantissa bits.  */
  while (lp < words_end)
    *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS);

  if (next_bits (1))
    {
      unsigned long carry;
      /* Since the NEXT bit is a 1, round UP the mantissa.
        The cunning design of these hidden-1 floats permits
        us to let the mantissa overflow into the exponent, and
        it 'does the right thing'. However, we lose if the
        highest-order bit of the lowest-order word flips.
        Is that clear?  */

      /* #if (sizeof(carry)) < ((sizeof(bits[0]) * BITS_PER_CHAR) + 2)
        Please allow at least 1 more bit in carry than is in a LITTLENUM.
        We need that extra bit to hold a carry during a LITTLENUM carry
        propagation. Another extra bit (kept 0) will assure us that we
        don't get a sticky sign bit after shifting right, and that
        permits us to propagate the carry without any masking of bits.
        #endif */
      for (carry = 1, lp--; carry; lp--)
       {
         carry = *lp + carry;
         *lp = carry;
         carry >>= LITTLENUM_NUMBER_OF_BITS;
         if (lp == words)
           break;
       }
      if (precision == X_PRECISION && exponent_bits == 15)
       {
         /* Extended precision numbers have an explicit integer bit
            that we may have to restore.  */
         if (lp == words)
           {
#ifdef TC_M68K
             /* On the m68k there is a gap of 16 bits.  We must
               explicitly propagate the carry into the exponent.  */
             words[0] += words[1];
             words[1] = 0;
             lp++;
#endif
             /* Put back the integer bit.  */
             lp[1] |= 1 << (LITTLENUM_NUMBER_OF_BITS - 1);
           }
       }
      if ((word1 ^ *words) & (1 << (LITTLENUM_NUMBER_OF_BITS - 1)))
       {
         /* We leave return_value alone: admit we read the number,
            but return a floating exception because we can't encode
            the number.  */
         *words &= ~(1 << (LITTLENUM_NUMBER_OF_BITS - 1));
       }
    }
  return return_value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

int had_err ( void  )
int had_errors ( void  )

Definition at line 100 of file messages.c.

{
  return error_count;
}

Here is the caller graph for this function:

int had_warnings ( void  )

Definition at line 89 of file messages.c.

{
  return warning_count;
}

Here is the caller graph for this function:

int ignore_input ( void  )

Definition at line 494 of file cond.c.

{
  char *s;

  s = input_line_pointer;

  if (NO_PSEUDO_DOT || flag_m68k_mri)
    {
      if (s[-1] != '.')
       --s;
    }
  else
    {
      if (s[-1] != '.')
       return (current_cframe != NULL) && (current_cframe->ignoring);
    }

  /* We cannot ignore certain pseudo ops.  */
  if (((s[0] == 'i'
       || s[0] == 'I')
       && (!strncasecmp (s, "if", 2)
          || !strncasecmp (s, "ifdef", 5)
          || !strncasecmp (s, "ifndef", 6)))
      || ((s[0] == 'e'
          || s[0] == 'E')
         && (!strncasecmp (s, "else", 4)
             || !strncasecmp (s, "endif", 5)
             || !strncasecmp (s, "endc", 4))))
    return 0;

  return (current_cframe != NULL) && (current_cframe->ignoring);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void input_scrub_begin ( void  )

Definition at line 202 of file input-scrub.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void input_scrub_close ( void  )

Definition at line 295 of file input-scrub.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void input_scrub_end ( void  )

Definition at line 224 of file input-scrub.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* input_scrub_include_file ( char *  ,
char *   
)

Definition at line 253 of file input-scrub.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void input_scrub_insert_file ( char *  )

Definition at line 5588 of file read.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void input_scrub_insert_line ( const char *  )

Definition at line 5574 of file read.c.

Here is the call graph for this function:

char* input_scrub_new_file ( char *  )

Definition at line 238 of file input-scrub.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* input_scrub_next_buffer ( char **  bufp)

Definition at line 301 of file input-scrub.c.

{
  register char *limit;            /*->just after last char of buffer.  */

  if (sb_index >= 0)
    {
      if (sb_index >= from_sb.len)
       {
         sb_kill (&from_sb);
         if (from_sb_is_expansion
             )
           {
             cond_finish_check (macro_nest);
#ifdef md_macro_end
             /* Allow the target to clean up per-macro expansion
                data.  */
             md_macro_end ();
#endif
           }
         --macro_nest;
         partial_where = NULL;
         if (next_saved_file != NULL)
           *bufp = input_scrub_pop (next_saved_file);
         return partial_where;
       }

      partial_where = from_sb.ptr + from_sb.len;
      partial_size = 0;
      *bufp = from_sb.ptr + sb_index;
      sb_index = from_sb.len;
      return partial_where;
    }

  *bufp = buffer_start + BEFORE_SIZE;

  if (partial_size)
    {
      memcpy (buffer_start + BEFORE_SIZE, partial_where,
             (unsigned int) partial_size);
      memcpy (buffer_start + BEFORE_SIZE, save_source, AFTER_SIZE);
    }
  limit = input_file_give_next_buffer (buffer_start
                                   + BEFORE_SIZE
                                   + partial_size);
  if (limit)
    {
      register char *p;            /* Find last newline.  */
      /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN.  */
      *limit = '\0';
      for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
       ;
      ++p;

      while (p <= buffer_start + BEFORE_SIZE)
       {
         int limoff;

         limoff = limit - buffer_start;
         buffer_length += input_file_buffer_size ();
         buffer_start = xrealloc (buffer_start,
                               (BEFORE_SIZE
                                + 2 * buffer_length
                                + AFTER_SIZE));
         *bufp = buffer_start + BEFORE_SIZE;
         limit = input_file_give_next_buffer (buffer_start + limoff);

         if (limit == NULL)
           {
             as_warn (_("partial line at end of file ignored"));
             partial_where = NULL;
             if (next_saved_file)
              *bufp = input_scrub_pop (next_saved_file);
             return NULL;
           }

         /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN.  */
         *limit = '\0';
         for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
           ;
         ++p;
       }

      partial_where = p;
      partial_size = limit - p;
      memcpy (save_source, partial_where, (int) AFTER_SIZE);
      memcpy (partial_where, AFTER_STRING, (int) AFTER_SIZE);
    }
  else
    {
      partial_where = 0;
      if (partial_size > 0)
       {
         as_warn (_("partial line at end of file ignored"));
       }

      /* Tell the listing we've finished the file.  */
      LISTING_EOF ();

      /* If we should pop to another file at EOF, do it.  */
      if (next_saved_file)
       {
         *bufp = input_scrub_pop (next_saved_file);     /* Pop state */
         /* partial_where is now correct to return, since we popped it.  */
       }
    }
  return (partial_where);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int new_logical_line ( char *  ,
int   
)

Definition at line 479 of file input-scrub.c.

{
  return new_logical_line_flags (fname, line_number, 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int new_logical_line_flags ( char *  ,
int  ,
int   
)

Definition at line 438 of file input-scrub.c.

{
  switch (flags)
    {
    case 0:
      break;
    case 1:
      if (line_number != -1)
       abort ();
      break;
    case 1 << 1:
    case 1 << 2:
      /* FIXME: we could check that include nesting is correct.  */
      break;
    default:
      abort ();
    }

  if (line_number >= 0)
    logical_input_line = line_number;
  else if (line_number == -1 && fname && !*fname && (flags & (1 << 2)))
    {
      logical_input_file = physical_input_file;
      logical_input_line = physical_input_line;
      fname = NULL;
    }

  if (fname
      && (logical_input_file == NULL
         || strcmp (logical_input_file, fname)))
    {
      logical_input_file = fname;
      return 1;
    }
  else
    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void print_dependencies ( void  )

Definition at line 182 of file depend.c.

{
  FILE *f;
  struct dependency *dep;

  if (dep_file == NULL)
    return;

  f = fopen (dep_file, FOPEN_WT);
  if (f == NULL)
    {
      as_warn (_("can't open `%s' for writing"), dep_file);
      return;
    }

  column = 0;
  wrap_output (f, out_file_name, ':');
  for (dep = dep_chain; dep != NULL; dep = dep->next)
    wrap_output (f, dep->file, ' ');

  putc ('\n', f);

  if (fclose (f))
    as_warn (_("can't close `%s'"), dep_file);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void print_version_id ( void  )

Definition at line 212 of file as.c.

{
  static int printed;

  if (printed)
    return;
  printed = 1;

  fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s\n"),
          VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void register_dependency ( char *  )

Definition at line 56 of file depend.c.

{
  struct dependency *dep;

  if (dep_file == NULL)
    return;

  for (dep = dep_chain; dep != NULL; dep = dep->next)
    {
      if (!strcmp (filename, dep->file))
       return;
    }

  dep = (struct dependency *) xmalloc (sizeof (struct dependency));
  dep->file = xstrdup (filename);
  dep->next = dep_chain;
  dep_chain = dep;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 413 of file input-scrub.c.

{
  return (physical_input_file != NULL);
}

Here is the caller graph for this function:

Here is the caller graph for this function:

void sprint_value ( char *  ,
addressT   
)

Definition at line 427 of file messages.c.

{
  if (sizeof (val) <= sizeof (long))
    {
      sprintf (buf, "%ld", (long) val);
      return;
    }
  if (sizeof (val) <= sizeof (bfd_vma))
    {
      sprintf_vma (buf, val);
      return;
    }
  abort ();
}

Here is the caller graph for this function:

void start_dependencies ( char *  )

Definition at line 48 of file depend.c.

Here is the caller graph for this function:

void subseg_change ( segT  ,
int   
)

Here is the caller graph for this function:

segT subseg_force_new ( const char *  ,
subsegT   
)

Definition at line 190 of file subsegs.c.

{
  segT secptr;

  secptr = subseg_get (segname, 1);
  subseg_set_rest (secptr, subseg);
  return secptr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

segT subseg_get ( const char *  ,
int   
)

Definition at line 147 of file subsegs.c.

{
  segT secptr;
  segment_info_type *seginfo;
  const char *now_seg_name = (now_seg
                           ? bfd_get_section_name (stdoutput, now_seg)
                           : 0);

  if (!force_new
      && now_seg_name
      && (now_seg_name == segname
         || !strcmp (now_seg_name, segname)))
    return now_seg;

  if (!force_new)
    secptr = bfd_make_section_old_way (stdoutput, segname);
  else
    secptr = bfd_make_section_anyway (stdoutput, segname);

  seginfo = seg_info (secptr);
  if (! seginfo)
    {
      secptr->output_section = secptr;
      seginfo = xcalloc (1, sizeof (*seginfo));
      seginfo->bfd_section = secptr;
      bfd_set_section_userdata (stdoutput, secptr, seginfo);
    }
  return secptr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

segT subseg_new ( const char *  ,
subsegT   
)

Definition at line 178 of file subsegs.c.

{
  segT secptr;

  secptr = subseg_get (segname, 0);
  subseg_set_rest (secptr, subseg);
  return secptr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void subseg_set ( segT  ,
subsegT   
)

Definition at line 200 of file subsegs.c.

{
  if (! (secptr == now_seg && subseg == now_subseg))
    subseg_set_rest (secptr, subseg);
  mri_common_symbol = NULL;
}

Here is the call graph for this function:

Definition at line 263 of file subsegs.c.

{
  return (bfd_get_section_flags (stdoutput, sec) & SEC_CODE) != 0;
}

Here is the caller graph for this function:

void subsegs_begin ( void  )

Definition at line 38 of file subsegs.c.

{
  obstack_begin (&frchains, chunksize);
#if __GNUC__ >= 2
  obstack_alignment_mask (&frchains) = __alignof__ (frchainS) - 1;
#endif

  frchain_now = NULL;              /* Warn new_subseg() that we are booting.  */
  frag_now = &dummy_frag;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int vsnprintf ( char *  ,
size_t  ,
const char *  ,
va_list   
)

Definition at line 57 of file vsnprintf.c.

{
  char *buf = 0;
  int result = vasprintf (&buf, format, ap);

  if (!buf)
    return -1;
  if (result < 0)
    {
      free (buf);
      return -1;
    }

  result = strlen (buf);
  if (n > 0)
    {
      if ((long) n > result)
       memcpy (s, buf, result+1);
      else
        {
         memcpy (s, buf, n-1);
         s[n - 1] = 0;
       }
    }
  free (buf);
  return result;
}

Variable Documentation

Definition at line 113 of file as.c.

Definition at line 112 of file as.c.

Definition at line 110 of file as.c.

Definition at line 406 of file as.h.

Definition at line 382 of file as.h.

Definition at line 418 of file as.h.

Definition at line 402 of file as.h.

Definition at line 389 of file as.h.

Definition at line 392 of file as.h.

Definition at line 381 of file as.h.

Definition at line 399 of file as.h.

Definition at line 421 of file as.h.

Definition at line 409 of file as.h.

Definition at line 396 of file as.h.

Definition at line 383 of file as.h.

Definition at line 412 of file as.h.

Definition at line 415 of file as.h.

Definition at line 385 of file as.h.

Definition at line 427 of file as.h.

Definition at line 434 of file as.h.

Definition at line 81 of file as.c.

Definition at line 430 of file as.h.

Definition at line 287 of file as.h.

Definition at line 284 of file as.h.

Definition at line 424 of file as.h.

Definition at line 109 of file as.c.

Definition at line 29 of file output-file.c.

Definition at line 111 of file as.c.