OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gas/] [config/] [tc-alpha.c] - Diff between revs 16 and 160

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 16 Rev 160
Line 291... Line 291...
#define AXP_REG_FP     29
#define AXP_REG_FP     29
 
 
#undef AXP_REG_GP
#undef AXP_REG_GP
#define AXP_REG_GP AXP_REG_PV
#define AXP_REG_GP AXP_REG_PV
 
 
static struct hash_control *alpha_evax_proc_hash;
 
 
 
#endif /* OBJ_EVAX  */
#endif /* OBJ_EVAX  */
 
 
/* The cpu for which we are generating code.  */
/* The cpu for which we are generating code.  */
static unsigned alpha_target = AXP_OPCODE_BASE;
static unsigned alpha_target = AXP_OPCODE_BASE;
static const char *alpha_target_name = "<all>";
static const char *alpha_target_name = "<all>";
Line 427... Line 425...
struct alpha_linkage_fixups *alpha_linkage_fixup_root;
struct alpha_linkage_fixups *alpha_linkage_fixup_root;
static struct alpha_linkage_fixups *alpha_linkage_fixup_tail;
static struct alpha_linkage_fixups *alpha_linkage_fixup_tail;
 
 
/* Current procedure descriptor.  */
/* Current procedure descriptor.  */
static struct alpha_evax_procs *alpha_evax_proc;
static struct alpha_evax_procs *alpha_evax_proc;
 
static struct alpha_evax_procs alpha_evax_proc_data;
 
 
static int alpha_flag_hash_long_names = 0;               /* -+ */
static int alpha_flag_hash_long_names = 0;               /* -+ */
static int alpha_flag_show_after_trunc = 0;              /* -H */
static int alpha_flag_show_after_trunc = 0;              /* -H */
 
 
/* If the -+ switch is given, then a hash is appended to any name that is
/* If the -+ switch is given, then a hash is appended to any name that is
Line 580... Line 579...
static void assemble_insn (const struct alpha_opcode *, const expressionS *, int, struct alpha_insn *, extended_bfd_reloc_code_real_type);
static void assemble_insn (const struct alpha_opcode *, const expressionS *, int, struct alpha_insn *, extended_bfd_reloc_code_real_type);
static void emit_insn (struct alpha_insn *);
static void emit_insn (struct alpha_insn *);
static void assemble_tokens (const char *, const expressionS *, int, int);
static void assemble_tokens (const char *, const expressionS *, int, int);
#ifdef OBJ_EVAX
#ifdef OBJ_EVAX
static char *s_alpha_section_name (void);
static char *s_alpha_section_name (void);
static symbolS *add_to_link_pool (symbolS *, symbolS *, offsetT);
static symbolS *add_to_link_pool (symbolS *, offsetT);
#endif
#endif


static struct alpha_reloc_tag *
static struct alpha_reloc_tag *
get_alpha_reloc_tag (long sequence)
get_alpha_reloc_tag (long sequence)
{
{
Line 1386... Line 1385...
 
 
                    /* Build the entry name as 'NAME..en'.  */
                    /* Build the entry name as 'NAME..en'.  */
                    ptr1 = strstr (symname, "..") + 2;
                    ptr1 = strstr (symname, "..") + 2;
                    if (ptr1 > ptr2)
                    if (ptr1 > ptr2)
                      ptr1 = symname;
                      ptr1 = symname;
                    ensymname = (char *) xmalloc (ptr2 - ptr1 + 5);
                    ensymname = (char *) alloca (ptr2 - ptr1 + 5);
                    memcpy (ensymname, ptr1, ptr2 - ptr1);
                    memcpy (ensymname, ptr1, ptr2 - ptr1);
                    memcpy (ensymname + (ptr2 - ptr1), "..en", 5);
                    memcpy (ensymname + (ptr2 - ptr1), "..en", 5);
 
 
                    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
                    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
                    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_NOP;
                    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_NOP;
Line 1418... Line 1417...
 
 
                    /* Extract NAME.  */
                    /* Extract NAME.  */
                    ptr1 = strstr (symname, "..") + 2;
                    ptr1 = strstr (symname, "..") + 2;
                    if (ptr1 > ptr2)
                    if (ptr1 > ptr2)
                      ptr1 = symname;
                      ptr1 = symname;
                    psymname = (char *) xmalloc (ptr2 - ptr1 + 1);
                    psymname = (char *) alloca (ptr2 - ptr1 + 1);
                    memcpy (psymname, ptr1, ptr2 - ptr1);
                    memcpy (psymname, ptr1, ptr2 - ptr1);
                    psymname [ptr2 - ptr1] = 0;
                    psymname [ptr2 - ptr1] = 0;
 
 
                    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
                    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
                    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_LDA;
                    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_LDA;
Line 1446... Line 1445...
                   section.  */
                   section.  */
                symbolS *linkexp;
                symbolS *linkexp;
 
 
                if (!range_signed_32 (addend))
                if (!range_signed_32 (addend))
                  addend = sign_extend_32 (addend);
                  addend = sign_extend_32 (addend);
                linkexp = add_to_link_pool (alpha_evax_proc->symbol,
                linkexp = add_to_link_pool (exp->X_add_symbol, 0);
                                            exp->X_add_symbol, 0);
 
                set_tok_reg (newtok[0], targreg);
                set_tok_reg (newtok[0], targreg);
                set_tok_sym (newtok[1], linkexp, 0);
                set_tok_sym (newtok[1], linkexp, 0);
                set_tok_preg (newtok[2], basereg);
                set_tok_preg (newtok[2], basereg);
                assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
                assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
              }
              }
Line 1514... Line 1512...
#endif
#endif
 
 
      /* For 64-bit addends, just put it in the literal pool.  */
      /* For 64-bit addends, just put it in the literal pool.  */
#ifdef OBJ_EVAX
#ifdef OBJ_EVAX
      /* Emit "ldq targreg, lit(basereg)".  */
      /* Emit "ldq targreg, lit(basereg)".  */
      litexp = add_to_link_pool (alpha_evax_proc->symbol,
      litexp = add_to_link_pool (section_symbol (absolute_section), addend);
                                 section_symbol (absolute_section), addend);
 
      set_tok_reg (newtok[0], targreg);
      set_tok_reg (newtok[0], targreg);
      set_tok_sym (newtok[1], litexp, 0);
      set_tok_sym (newtok[1], litexp, 0);
      set_tok_preg (newtok[2], alpha_gp_register);
      set_tok_preg (newtok[2], alpha_gp_register);
      assemble_tokens ("ldq", newtok, 3, 0);
      assemble_tokens ("ldq", newtok, 3, 0);
#else
#else
Line 2885... Line 2882...
      const char *symname = S_GET_NAME (tok[tokidx].X_add_symbol);
      const char *symname = S_GET_NAME (tok[tokidx].X_add_symbol);
      int symlen = strlen (symname);
      int symlen = strlen (symname);
      char *ensymname;
      char *ensymname;
 
 
      /* Build the entry name as 'NAME..en'.  */
      /* Build the entry name as 'NAME..en'.  */
      ensymname = (char *) xmalloc (symlen + 5);
      ensymname = (char *) alloca (symlen + 5);
      memcpy (ensymname, symname, symlen);
      memcpy (ensymname, symname, symlen);
      memcpy (ensymname + symlen, "..en", 5);
      memcpy (ensymname + symlen, "..en", 5);
 
 
      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
      if (insn.nfixups > 0)
      if (insn.nfixups > 0)
Line 3370... Line 3367...
    as_bad (_("unknown opcode `%s'"), opname);
    as_bad (_("unknown opcode `%s'"), opname);
}
}


#ifdef OBJ_EVAX
#ifdef OBJ_EVAX
 
 
/* Add symbol+addend to link pool.
/* Add sym+addend to link pool.
   Return offset from basesym to entry in link pool.
   Return offset from curent procedure value (pv) to entry in link pool.
 
 
   Add new fixup only if offset isn't 16bit.  */
   Add new fixup only if offset isn't 16bit.  */
 
 
static symbolS *
static symbolS *
add_to_link_pool (symbolS *basesym,
add_to_link_pool (symbolS *sym, offsetT addend)
                  symbolS *sym,
 
                  offsetT addend)
 
{
{
 
  symbolS *basesym;
  segT current_section = now_seg;
  segT current_section = now_seg;
  int current_subsec = now_subseg;
  int current_subsec = now_subseg;
  valueT offset;
 
  char *p;
  char *p;
  segment_info_type *seginfo = seg_info (alpha_link_section);
  segment_info_type *seginfo = seg_info (alpha_link_section);
  fixS *fixp;
  fixS *fixp;
  symbolS *linksym, *expsym;
  symbolS *linksym, *expsym;
  expressionS e;
  expressionS e;
 
 
  offset = 0; /* ??? DBR */
  basesym = alpha_evax_proc->symbol;
 
 
  /* @@ This assumes all entries in a given section will be of the same
  /* @@ This assumes all entries in a given section will be of the same
     size...  Probably correct, but unwise to rely on.  */
     size...  Probably correct, but unwise to rely on.  */
  /* This must always be called with the same subsegment.  */
  /* This must always be called with the same subsegment.  */
 
 
  if (seginfo->frchainP)
  if (seginfo->frchainP)
    for (fixp = seginfo->frchainP->fix_root;
    for (fixp = seginfo->frchainP->fix_root;
         fixp != (fixS *) NULL;
         fixp != (fixS *) NULL;
         fixp = fixp->fx_next)
         fixp = fixp->fx_next)
      {
      {
        if (fixp->tc_fix_data.info
 
            && fixp->tc_fix_data.info->sym
 
            && fixp->tc_fix_data.info->sym->sy_value.X_op_symbol == basesym)
 
          offset += 8;
 
 
 
        if (fixp->fx_addsy == sym
        if (fixp->fx_addsy == sym
            && fixp->fx_offset == (valueT)addend
            && fixp->fx_offset == (valueT)addend
            && fixp->tc_fix_data.info
            && fixp->tc_fix_data.info
            && fixp->tc_fix_data.info->sym
            && fixp->tc_fix_data.info->sym
            && fixp->tc_fix_data.info->sym->sy_value.X_op_symbol == basesym)
            && fixp->tc_fix_data.info->sym->sy_value.X_op_symbol == basesym)
          return fixp->tc_fix_data.info->sym;
          return fixp->tc_fix_data.info->sym;
      }
      }
 
 
  /* Not found in 16bit signed range.  */
  /* Not found, add a new entry.  */
 
 
  subseg_set (alpha_link_section, 0);
  subseg_set (alpha_link_section, 0);
  linksym = symbol_new
  linksym = symbol_new
    (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
    (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
  p = frag_more (8);
  p = frag_more (8);
  memset (p, 0, 8);
  memset (p, 0, 8);
 
 
 
  /* Create a symbol for 'basesym - linksym' (offset of the added entry).  */
  e.X_op = O_subtract;
  e.X_op = O_subtract;
  e.X_add_symbol = linksym;
  e.X_add_symbol = linksym;
  e.X_op_symbol = basesym;
  e.X_op_symbol = basesym;
  e.X_add_number = 0;
  e.X_add_number = 0;
  expsym = make_expr_symbol (&e);
  expsym = make_expr_symbol (&e);
 
 
 
  /* Create a fixup for the entry.  */
  fixp = fix_new
  fixp = fix_new
    (frag_now, p-frag_now->fr_literal, 8, sym, addend, 0, BFD_RELOC_64);
    (frag_now, p-frag_now->fr_literal, 8, sym, addend, 0, BFD_RELOC_64);
  fixp->tc_fix_data.info = get_alpha_reloc_tag (next_sequence_num--);
  fixp->tc_fix_data.info = get_alpha_reloc_tag (next_sequence_num--);
  fixp->tc_fix_data.info->sym = expsym;
  fixp->tc_fix_data.info->sym = expsym;
 
 
  subseg_set (current_section, current_subsec);
  subseg_set (current_section, current_subsec);
  seginfo->literal_pool_size += 8;
 
 
  /* Return the symbol.  */
  return expsym;
  return expsym;
}
}
#endif /* OBJ_EVAX */
#endif /* OBJ_EVAX */


/* Assembler directives.  */
/* Assembler directives.  */
Line 4051... Line 4043...
 
 
  /* If someone has generated the unwind info themselves, great.  */
  /* If someone has generated the unwind info themselves, great.  */
  if (bfd_get_section_by_name (stdoutput, ".eh_frame") != NULL)
  if (bfd_get_section_by_name (stdoutput, ".eh_frame") != NULL)
    return;
    return;
 
 
 
  /* ??? In theory we could look for functions for which we have
 
     generated unwind info via CFI directives, and those we have not.
 
     Those we have not could still get their unwind info from here.
 
     For now, do nothing if we've seen any CFI directives.  Note that
 
     the above test will not trigger, as we've not emitted data yet.  */
 
  if (all_fde_data != NULL)
 
    return;
 
 
  /* Generate .eh_frame data for the unwind directives specified.  */
  /* Generate .eh_frame data for the unwind directives specified.  */
  for (p = all_frame_data; p ; p = p->next)
  for (p = all_frame_data; p ; p = p->next)
    if (p->prologue_sym)
    if (p->prologue_sym)
      {
      {
        /* Create a temporary symbol at the same location as our
        /* Create a temporary symbol at the same location as our
Line 4364... Line 4364...
s_alpha_ent (int ignore ATTRIBUTE_UNUSED)
s_alpha_ent (int ignore ATTRIBUTE_UNUSED)
{
{
  symbolS *symbol;
  symbolS *symbol;
  expressionS symexpr;
  expressionS symexpr;
 
 
  alpha_evax_proc
  if (alpha_evax_proc != NULL)
    = (struct alpha_evax_procs *) xmalloc (sizeof (struct alpha_evax_procs));
    as_bad (_("previous .ent not closed by a .end"));
 
 
 
  alpha_evax_proc = &alpha_evax_proc_data;
 
 
  alpha_evax_proc->pdsckind = 0;
  alpha_evax_proc->pdsckind = 0;
  alpha_evax_proc->framereg = -1;
  alpha_evax_proc->framereg = -1;
  alpha_evax_proc->framesize = 0;
  alpha_evax_proc->framesize = 0;
  alpha_evax_proc->rsa_offset = 0;
  alpha_evax_proc->rsa_offset = 0;
Line 4393... Line 4395...
 
 
  symbol = make_expr_symbol (&symexpr);
  symbol = make_expr_symbol (&symexpr);
  symbol_get_bfdsym (symbol)->flags |= BSF_FUNCTION;
  symbol_get_bfdsym (symbol)->flags |= BSF_FUNCTION;
  alpha_evax_proc->symbol = symbol;
  alpha_evax_proc->symbol = symbol;
 
 
  (void) hash_insert
 
    (alpha_evax_proc_hash,
 
     symbol_get_bfdsym (alpha_evax_proc->symbol)->name, (PTR)alpha_evax_proc);
 
 
 
  demand_empty_rest_of_line ();
  demand_empty_rest_of_line ();
}
}
 
 
static void
static void
s_alpha_handler (int is_data)
s_alpha_handler (int is_data)
Line 4484... Line 4482...
  char *name;
  char *name;
  char name_end;
  char name_end;
  register char *p;
  register char *p;
  expressionS exp;
  expressionS exp;
  symbolS *entry_sym;
  symbolS *entry_sym;
  fixS *fixp;
 
  segment_info_type *seginfo = seg_info (alpha_link_section);
 
  const char *entry_sym_name;
  const char *entry_sym_name;
  char *sym_name;
  const char *pdesc_sym_name;
  int len;
  fixS *fixp;
 
  size_t len;
 
 
  if (now_seg != alpha_link_section)
  if (now_seg != alpha_link_section)
    {
    {
      as_bad (_(".pdesc directive not in link (.link) section"));
      as_bad (_(".pdesc directive not in link (.link) section"));
      demand_empty_rest_of_line ();
 
      return;
      return;
    }
    }
 
 
  expression (&exp);
  expression (&exp);
  if (exp.X_op != O_symbol)
  if (exp.X_op != O_symbol)
    {
    {
      as_warn (_(".pdesc directive has no entry symbol"));
      as_bad (_(".pdesc directive has no entry symbol"));
      demand_empty_rest_of_line ();
 
      return;
      return;
    }
    }
 
 
  entry_sym = make_expr_symbol (&exp);
  entry_sym = make_expr_symbol (&exp);
  entry_sym_name = symbol_get_bfdsym (entry_sym)->name;
  entry_sym_name = S_GET_NAME (entry_sym);
 
 
 
  /* Strip "..en".  */
  len = strlen (entry_sym_name);
  len = strlen (entry_sym_name);
  sym_name = (char *) xmalloc (len - 4 + 1);
  if (len < 4 || strcmp (entry_sym_name + len - 4, "..en") != 0)
  strncpy (sym_name, entry_sym_name, len - 4);
 
  sym_name [len - 4] = 0;
 
 
 
  alpha_evax_proc = (struct alpha_evax_procs *)
 
    hash_find (alpha_evax_proc_hash, sym_name);
 
 
 
  if (!alpha_evax_proc || !S_IS_DEFINED (alpha_evax_proc->symbol))
 
    {
    {
      as_fatal (_(".pdesc has no matching .ent"));
      as_bad (_(".pdesc has a bad entry symbol"));
      demand_empty_rest_of_line ();
 
      return;
      return;
    }
    }
 
  len -= 4;
 
  pdesc_sym_name = S_GET_NAME (alpha_evax_proc->symbol);
 
 
  *symbol_get_obj (alpha_evax_proc->symbol) =
  if (!alpha_evax_proc
    (valueT) seginfo->literal_pool_size;
      || !S_IS_DEFINED (alpha_evax_proc->symbol)
 
      || strlen (pdesc_sym_name) != len
 
      || memcmp (entry_sym_name, pdesc_sym_name, len) != 0)
 
    {
 
      as_fatal (_(".pdesc doesn't match with last .ent"));
 
      return;
 
    }
 
 
  alpha_evax_proc->symbol->sy_obj = (valueT)seginfo->literal_pool_size;
  /* Define pdesc symbol.  */
 
  symbol_set_value_now (alpha_evax_proc->symbol);
 
 
  /* Save bfd symbol of proc entry in function symbol.  */
  /* Save bfd symbol of proc entry in function symbol.  */
  ((struct evax_private_udata_struct *)
  ((struct evax_private_udata_struct *)
     symbol_get_bfdsym (alpha_evax_proc->symbol)->udata.p)->enbsym
     symbol_get_bfdsym (alpha_evax_proc->symbol)->udata.p)->enbsym
       = symbol_get_bfdsym (entry_sym);
       = symbol_get_bfdsym (entry_sym);
Line 4572... Line 4569...
 
 
  frag_align (3, 0, 0);
  frag_align (3, 0, 0);
  p = frag_more (16);
  p = frag_more (16);
  fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
  fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
  fixp->fx_done = 1;
  fixp->fx_done = 1;
  seginfo->literal_pool_size += 16;
 
 
 
  *p = alpha_evax_proc->pdsckind
  *p = alpha_evax_proc->pdsckind
    | ((alpha_evax_proc->framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0)
    | ((alpha_evax_proc->framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0)
    | ((alpha_evax_proc->handler) ? PDSC_S_M_HANDLER_VALID : 0)
    | ((alpha_evax_proc->handler) ? PDSC_S_M_HANDLER_VALID : 0)
    | ((alpha_evax_proc->handler_data) ? PDSC_S_M_HANDLER_DATA_VALID : 0);
    | ((alpha_evax_proc->handler_data) ? PDSC_S_M_HANDLER_DATA_VALID : 0);
Line 4603... Line 4599...
  *(p + 5) = alpha_evax_proc->type & 0x0f;
  *(p + 5) = alpha_evax_proc->type & 0x0f;
 
 
  /* Signature offset.  */
  /* Signature offset.  */
  md_number_to_chars (p + 6, (valueT) 0, 2);
  md_number_to_chars (p + 6, (valueT) 0, 2);
 
 
  fix_new_exp (frag_now, p - frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64);
  fix_new_exp (frag_now, p - frag_now->fr_literal + 8,
 
               8, &exp, 0, BFD_RELOC_64);
 
 
  if (alpha_evax_proc->pdsckind == PDSC_S_K_KIND_NULL)
  if (alpha_evax_proc->pdsckind == PDSC_S_K_KIND_NULL)
    return;
    return;
 
 
  /* Add dummy fix to make add_to_link_pool work.  */
 
  p = frag_more (6);
 
  fixp = fix_new (frag_now, p - frag_now->fr_literal, 6, 0, 0, 0, 0);
 
  fixp->fx_done = 1;
 
  seginfo->literal_pool_size += 6;
 
 
 
  /* pdesc+16: Size.  */
  /* pdesc+16: Size.  */
 
  p = frag_more (6);
  md_number_to_chars (p, (valueT) alpha_evax_proc->framesize, 4);
  md_number_to_chars (p, (valueT) alpha_evax_proc->framesize, 4);
 
 
  md_number_to_chars (p + 4, (valueT) 0, 2);
  md_number_to_chars (p + 4, (valueT) 0, 2);
 
 
  /* Entry length.  */
  /* Entry length.  */
  exp.X_op = O_subtract;
  exp.X_op = O_subtract;
  exp.X_add_symbol = alpha_prologue_label;
  exp.X_add_symbol = alpha_prologue_label;
Line 4628... Line 4619...
  emit_expr (&exp, 2);
  emit_expr (&exp, 2);
 
 
  if (alpha_evax_proc->pdsckind == PDSC_S_K_KIND_FP_REGISTER)
  if (alpha_evax_proc->pdsckind == PDSC_S_K_KIND_FP_REGISTER)
    return;
    return;
 
 
  /* Add dummy fix to make add_to_link_pool work.  */
 
  p = frag_more (8);
 
  fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
 
  fixp->fx_done = 1;
 
  seginfo->literal_pool_size += 8;
 
 
 
  /* pdesc+24: register masks.  */
  /* pdesc+24: register masks.  */
 
  p = frag_more (8);
  md_number_to_chars (p, alpha_evax_proc->imask, 4);
  md_number_to_chars (p, alpha_evax_proc->imask, 4);
  md_number_to_chars (p + 4, alpha_evax_proc->fmask, 4);
  md_number_to_chars (p + 4, alpha_evax_proc->fmask, 4);
 
 
  if (alpha_evax_proc->handler)
  if (alpha_evax_proc->handler)
    {
    {
Line 4648... Line 4633...
                      alpha_evax_proc->handler, 0, 0, BFD_RELOC_64);
                      alpha_evax_proc->handler, 0, 0, BFD_RELOC_64);
    }
    }
 
 
  if (alpha_evax_proc->handler_data)
  if (alpha_evax_proc->handler_data)
    {
    {
      /* Add dummy fix to make add_to_link_pool work.  */
 
      p = frag_more (8);
      p = frag_more (8);
      fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
 
      fixp->fx_done = 1;
 
      seginfo->literal_pool_size += 8;
 
      md_number_to_chars (p, alpha_evax_proc->handler_data, 8);
      md_number_to_chars (p, alpha_evax_proc->handler_data, 8);
    }
    }
}
}
 
 
/* Support for crash debug on vms.  */
/* Support for crash debug on vms.  */
Line 4664... Line 4645...
static void
static void
s_alpha_name (int ignore ATTRIBUTE_UNUSED)
s_alpha_name (int ignore ATTRIBUTE_UNUSED)
{
{
  char *p;
  char *p;
  expressionS exp;
  expressionS exp;
  segment_info_type *seginfo = seg_info (alpha_link_section);
 
 
 
  if (now_seg != alpha_link_section)
  if (now_seg != alpha_link_section)
    {
    {
      as_bad (_(".name directive not in link (.link) section"));
      as_bad (_(".name directive not in link (.link) section"));
      demand_empty_rest_of_line ();
      demand_empty_rest_of_line ();
Line 4689... Line 4669...
  md_flush_pending_output ();
  md_flush_pending_output ();
#endif
#endif
 
 
  frag_align (3, 0, 0);
  frag_align (3, 0, 0);
  p = frag_more (8);
  p = frag_more (8);
  seginfo->literal_pool_size += 8;
 
 
 
  fix_new_exp (frag_now, p - frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64);
  fix_new_exp (frag_now, p - frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64);
}
}
 
 
/* Parse .linkage <symbol>.
/* Parse .linkage <symbol>.
Line 4720... Line 4699...
      struct alpha_linkage_fixups *linkage_fixup;
      struct alpha_linkage_fixups *linkage_fixup;
 
 
      p = frag_more (LKP_S_K_SIZE);
      p = frag_more (LKP_S_K_SIZE);
      memset (p, 0, LKP_S_K_SIZE);
      memset (p, 0, LKP_S_K_SIZE);
      fixp = fix_new_exp
      fixp = fix_new_exp
        (frag_now, p - frag_now->fr_literal, LKP_S_K_SIZE, &exp, 0,\
        (frag_now, p - frag_now->fr_literal, LKP_S_K_SIZE, &exp, 0,
         BFD_RELOC_ALPHA_LINKAGE);
         BFD_RELOC_ALPHA_LINKAGE);
 
 
 
      if (alpha_insn_label == NULL)
 
        alpha_insn_label = symbol_new
 
          (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
 
 
 
      /* Create a linkage element.  */
      linkage_fixup = (struct alpha_linkage_fixups *)
      linkage_fixup = (struct alpha_linkage_fixups *)
        xmalloc (sizeof (struct alpha_linkage_fixups));
        xmalloc (sizeof (struct alpha_linkage_fixups));
 
 
      linkage_fixup->fixp = fixp;
      linkage_fixup->fixp = fixp;
      linkage_fixup->next = 0;
      linkage_fixup->next = NULL;
 
 
      if (alpha_insn_label == 0)
 
        alpha_insn_label = symbol_new
 
          (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
 
      linkage_fixup->label = alpha_insn_label;
      linkage_fixup->label = alpha_insn_label;
 
 
      if (alpha_linkage_fixup_root == 0)
      /* Append it to the list.  */
        {
      if (alpha_linkage_fixup_root == NULL)
          alpha_linkage_fixup_root = alpha_linkage_fixup_tail = linkage_fixup;
        alpha_linkage_fixup_root = linkage_fixup;
          alpha_linkage_fixup_tail->next = 0;
 
        }
 
      else
      else
        {
 
          alpha_linkage_fixup_tail->next = linkage_fixup;
          alpha_linkage_fixup_tail->next = linkage_fixup;
          alpha_linkage_fixup_tail = linkage_fixup;
          alpha_linkage_fixup_tail = linkage_fixup;
          alpha_linkage_fixup_tail->next = 0;
 
        }
 
    }
    }
  demand_empty_rest_of_line ();
  demand_empty_rest_of_line ();
}
}
 
 
/* Parse .code_address <symbol>.
/* Parse .code_address <symbol>.
Line 4778... Line 4752...
}
}
 
 
static void
static void
s_alpha_fp_save (int ignore ATTRIBUTE_UNUSED)
s_alpha_fp_save (int ignore ATTRIBUTE_UNUSED)
{
{
 
 
  alpha_evax_proc->fp_save = tc_get_register (1);
  alpha_evax_proc->fp_save = tc_get_register (1);
 
 
  demand_empty_rest_of_line ();
  demand_empty_rest_of_line ();
}
}
 
 
Line 4828... Line 4801...
  char c;
  char c;
 
 
  c = get_symbol_end ();
  c = get_symbol_end ();
  *input_line_pointer = c;
  *input_line_pointer = c;
  demand_empty_rest_of_line ();
  demand_empty_rest_of_line ();
  alpha_evax_proc = 0;
  alpha_evax_proc = NULL;
}
}
 
 
static void
static void
s_alpha_file (int ignore ATTRIBUTE_UNUSED)
s_alpha_file (int ignore ATTRIBUTE_UNUSED)
{
{
Line 5532... Line 5505...
                                   &zero_address_frag);
                                   &zero_address_frag);
#endif
#endif
 
 
#ifdef OBJ_EVAX
#ifdef OBJ_EVAX
  create_literal_section (".link", &alpha_link_section, &alpha_link_symbol);
  create_literal_section (".link", &alpha_link_section, &alpha_link_symbol);
  alpha_evax_proc_hash = hash_new ();
 
#endif
#endif
 
 
#ifdef OBJ_ELF
#ifdef OBJ_ELF
  if (ECOFF_DEBUGGING)
  if (ECOFF_DEBUGGING)
    {
    {
Line 6301... Line 6273...
      the main symbol might be equated so look it up and take its name.  */
      the main symbol might be equated so look it up and take its name.  */
      pname_len = strlen (pname);
      pname_len = strlen (pname);
      if (pname_len > 4 && strcmp (pname + pname_len - 4, "..en") == 0)
      if (pname_len > 4 && strcmp (pname + pname_len - 4, "..en") == 0)
        {
        {
          symbolS *sym;
          symbolS *sym;
          char *my_pname = xstrdup (pname);
          char *my_pname = (char *) alloca (pname_len - 4 + 1);
 
 
 
          memcpy (my_pname, pname, pname_len - 4);
          my_pname [pname_len - 4] = 0;
          my_pname [pname_len - 4] = 0;
          sym = symbol_find (my_pname);
          sym = symbol_find (my_pname);
          if (sym == NULL)
          if (sym == NULL)
            abort ();
            abort ();
 
 
          while (symbol_equated_reloc_p (sym))
          while (symbol_equated_reloc_p (sym))
            {
            {
              symbolS *n = symbol_get_value_expression (sym)->X_add_symbol;
              symbolS *n = symbol_get_value_expression (sym)->X_add_symbol;
 
 
              /* We must avoid looping, as that can occur with a badly
              /* We must avoid looping, as that can occur with a badly

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.