Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Enumerations | Functions | Variables
tc-alpha.c File Reference
#include "as.h"
#include "subsegs.h"
#include "struc-symbol.h"
#include "ecoff.h"
#include "opcode/alpha.h"
#include "dw2gencfi.h"
#include "safe-ctype.h"
#include "config/atof-vax.c"

Go to the source code of this file.

Classes

struct  alpha_fixup
struct  alpha_insn
struct  alpha_macro
struct  alpha_reloc_tag
struct  cpu_type

Defines

#define TOKENIZE_ERROR   -1
#define TOKENIZE_ERROR_REPORT   -2
#define MAX_INSN_FIXUPS   2
#define MAX_INSN_ARGS   5
#define O_pregister   O_md1 /* O_register, in parentheses. */
#define O_cpregister   O_md2 /* + a leading comma. */
#define O_literal   O_md3 /* !literal relocation. */
#define O_lituse_addr   O_md4 /* !lituse_addr relocation. */
#define O_lituse_base   O_md5 /* !lituse_base relocation. */
#define O_lituse_bytoff   O_md6 /* !lituse_bytoff relocation. */
#define O_lituse_jsr   O_md7 /* !lituse_jsr relocation. */
#define O_lituse_tlsgd   O_md8 /* !lituse_tlsgd relocation. */
#define O_lituse_tlsldm   O_md9 /* !lituse_tlsldm relocation. */
#define O_lituse_jsrdirect   O_md10 /* !lituse_jsrdirect relocation. */
#define O_gpdisp   O_md11 /* !gpdisp relocation. */
#define O_gprelhigh   O_md12 /* !gprelhigh relocation. */
#define O_gprellow   O_md13 /* !gprellow relocation. */
#define O_gprel   O_md14 /* !gprel relocation. */
#define O_samegp   O_md15 /* !samegp relocation. */
#define O_tlsgd   O_md16 /* !tlsgd relocation. */
#define O_tlsldm   O_md17 /* !tlsldm relocation. */
#define O_gotdtprel   O_md18 /* !gotdtprel relocation. */
#define O_dtprelhi   O_md19 /* !dtprelhi relocation. */
#define O_dtprello   O_md20 /* !dtprello relocation. */
#define O_dtprel   O_md21 /* !dtprel relocation. */
#define O_gottprel   O_md22 /* !gottprel relocation. */
#define O_tprelhi   O_md23 /* !tprelhi relocation. */
#define O_tprello   O_md24 /* !tprello relocation. */
#define O_tprel   O_md25 /* !tprel relocation. */
#define DUMMY_RELOC_LITUSE_ADDR   (BFD_RELOC_UNUSED + 1)
#define DUMMY_RELOC_LITUSE_BASE   (BFD_RELOC_UNUSED + 2)
#define DUMMY_RELOC_LITUSE_BYTOFF   (BFD_RELOC_UNUSED + 3)
#define DUMMY_RELOC_LITUSE_JSR   (BFD_RELOC_UNUSED + 4)
#define DUMMY_RELOC_LITUSE_TLSGD   (BFD_RELOC_UNUSED + 5)
#define DUMMY_RELOC_LITUSE_TLSLDM   (BFD_RELOC_UNUSED + 6)
#define DUMMY_RELOC_LITUSE_JSRDIRECT   (BFD_RELOC_UNUSED + 7)
#define USER_RELOC_P(R)   ((R) >= O_literal && (R) <= O_tprel)
#define is_ir_num(x)   (((x) & 32) == 0)
#define is_fpr_num(x)   (((x) & 32) != 0)
#define regno(x)   ((x) & 31)
#define note_gpreg(R)   (alpha_gprmask |= (1 << (R)))
#define note_fpreg(R)   (alpha_fprmask |= (1 << (R)))
#define range_signed_16(x)   (((offsetT) (x) >> 15) == 0 || ((offsetT) (x) >> 15) == -1)
#define range_signed_32(x)   (((offsetT) (x) >> 31) == 0 || ((offsetT) (x) >> 31) == -1)
#define sign_extend_16(x)   ((short) (x))
#define sign_extend_32(x)   ((int) (x))
#define set_tok_reg(t, r)
#define set_tok_preg(t, r)
#define set_tok_cpreg(t, r)
#define set_tok_freg(t, r)
#define set_tok_sym(t, s, a)
#define set_tok_const(t, n)
#define OPTION_32ADDR   (OPTION_MD_BASE)
#define OPTION_RELAX   (OPTION_32ADDR + 1)
#define ALPHA_RELOC_DIGITS   25
#define MAX_LITTLENUMS   6
#define md_atof   vax_md_atof

Enumerations

enum  alpha_macro_arg {
  MACRO_EOA = 1, MACRO_IR, MACRO_PIR, MACRO_OPIR,
  MACRO_CPIR, MACRO_FPR, MACRO_EXP
}

Functions

static void assemble_insn (const struct alpha_opcode *, const expressionS *, int, struct alpha_insn *, bfd_reloc_code_real_type)
static void emit_insn (struct alpha_insn *)
static void assemble_tokens (const char *, const expressionS *, int, int)
static struct alpha_reloc_tagget_alpha_reloc_tag (long sequence)
static void alpha_adjust_relocs (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *ptr ATTRIBUTE_UNUSED)
void alpha_before_fix (void)
static int tokenize_arguments (char *str, expressionS tok[], int ntok)
static struct alpha_opcodefind_opcode_match (const struct alpha_opcode *first_opcode, const expressionS *tok, int *pntok, int *pcpumatch)
static void assemble_tokens_to_insn (const char *opname, const expressionS *tok, int ntok, struct alpha_insn *insn)
static void create_literal_section (const char *name, segT *secp, symbolS **symp)
static long load_expression (int targreg, const expressionS *exp, int *pbasereg, expressionS *poffset)
static void emit_lda (const expressionS *tok, int ntok, const void *unused ATTRIBUTE_UNUSED)
static void emit_ldah (const expressionS *tok, int ntok ATTRIBUTE_UNUSED, const void *unused ATTRIBUTE_UNUSED)
static void alpha_align (int n, char *pfill, symbolS *label, int force ATTRIBUTE_UNUSED)
static unsigned insert_operand (unsigned insn, const struct alpha_operand *operand, offsetT val, char *file, unsigned line)
static void emit_ir_load (const expressionS *tok, int ntok, const void *opname)
static void emit_loadstore (const expressionS *tok, int ntok, const void *opname)
static void emit_ldXu (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_ldX (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_uldXu (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_uldX (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_ldil (const expressionS *tok, int ntok, const void *unused ATTRIBUTE_UNUSED)
static void emit_stX (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_ustX (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_sextX (const expressionS *tok, int ntok, const void *vlgsize)
static void emit_division (const expressionS *tok, int ntok, const void *symname)
static void emit_jsrjmp (const expressionS *tok, int ntok, const void *vopname)
static void emit_retjcr (const expressionS *tok, int ntok, const void *vopname)
static void emit_ldgp (const expressionS *tok, int ntok ATTRIBUTE_UNUSED, const void *unused ATTRIBUTE_UNUSED)
static struct alpha_macrofind_macro_match (const struct alpha_macro *first_macro, const expressionS *tok, int *pntok)
static void s_alpha_text (int i)
static void s_alpha_data (int i)
void alpha_cfi_frame_initial_instructions (void)
static void s_alpha_gprel32 (int ignore ATTRIBUTE_UNUSED)
static void s_alpha_float_cons (int type)
static void s_alpha_proc (int is_static ATTRIBUTE_UNUSED)
static void s_alpha_set (int x ATTRIBUTE_UNUSED)
static void s_alpha_base (int ignore ATTRIBUTE_UNUSED)
static void s_alpha_align (int ignore ATTRIBUTE_UNUSED)
static void s_alpha_stringer (int terminate)
static void s_alpha_space (int ignore)
void alpha_cons_align (int size)
static void s_alpha_ucons (int bytes)
static void s_alpha_arch (int ignored ATTRIBUTE_UNUSED)
void alpha_handle_align (fragS *fragp)
void md_begin (void)
void md_assemble (char *str)
valueT md_section_align (segT seg, valueT size)
char * vax_md_atof (int, char *, int *)
char * md_atof (int type, char *litP, int *sizeP)
int md_parse_option (int c, char *arg)
void md_show_usage (FILE *stream)
long md_pcrel_from (fixS *fixP)
void md_apply_fix (fixS *fixP, valueT *valP, segT seg)
symbolS * md_undefined_symbol (char *name)
void alpha_define_label (symbolS *sym)
int alpha_force_relocation (fixS *f)
int alpha_fix_adjustable (fixS *f)
arelenttc_gen_reloc (asection *sec ATTRIBUTE_UNUSED, fixS *fixp)
int tc_get_register (int frame ATTRIBUTE_UNUSED)

Variables

const char comment_chars [] = "#"
const char line_comment_chars [] = "#"
const char line_separator_chars [] = ";"
const char EXP_CHARS [] = "eE"
char FLT_CHARS [] = "rRsSfFdDxXpP"
const char * md_shortopts = "Fm:gG:"
size_t md_longopts_size = sizeof (md_longopts)
static unsigned alpha_target = AXP_OPCODE_BASE
static const char * alpha_target_name = "<all>"
static struct hash_controlalpha_opcode_hash
static struct hash_controlalpha_macro_hash
static int alpha_gp_register = AXP_REG_GP
static symbolS * alpha_register_table [64]
static segT alpha_lit8_section
static symbolS * alpha_lit8_symbol
static int alpha_noat_on = 0
static int alpha_macros_on = 1
static int alpha_nofloats_on = 0
static int alpha_addr32_on = 0
static symbolS * alpha_insn_label
static int alpha_auto_align_on = 1
static int alpha_current_align
unsigned long alpha_gprmask
unsigned long alpha_fprmask
static int alpha_debug
static int alpha_flag_relax
static int g_switch_value = 8
static struct hash_controlalpha_literal_hash
static long next_sequence_num = -1
static struct cpu_type cpu_types []
static const char *const sextX_op [] = { "sextb", "sextw", "sextl", NULL }
static const char *const insXl_op [] = { "insbl", "inswl", "insll", "insql" }
static const char *const insXh_op [] = { NULL, "inswh", "inslh", "insqh" }
static const char *const extXl_op [] = { "extbl", "extwl", "extll", "extql" }
static const char *const extXh_op [] = { NULL, "extwh", "extlh", "extqh" }
static const char *const mskXl_op [] = { "mskbl", "mskwl", "mskll", "mskql" }
static const char *const mskXh_op [] = { NULL, "mskwh", "msklh", "mskqh" }
static const char *const stX_op [] = { "stb", "stw", "stl", "stq" }
static const char *const ldXu_op [] = { "ldbu", "ldwu", NULL, NULL }
static struct alpha_macro []
static const unsigned int alpha_num_macros = sizeof (alpha_macros) / sizeof (*alpha_macros)
const pseudo_typeS md_pseudo_table []

Class Documentation

struct alpha_fixup

Definition at line 73 of file tc-alpha.c.

Collaboration diagram for alpha_fixup:
Class Members
expressionS exp
bfd_reloc_code_real_type reloc
struct alpha_insn

Definition at line 79 of file tc-alpha.c.

Class Members
unsigned insn
int nfixups
long sequence
struct alpha_reloc_tag

Definition at line 451 of file tc-alpha.c.

Collaboration diagram for alpha_reloc_tag:
Class Members
fixS * master
unsigned multi_section_p: 1
unsigned n_master
unsigned n_slaves
unsigned saw_lu_tlsgd: 1
unsigned saw_lu_tlsldm: 1
unsigned saw_tlsgd: 1
unsigned saw_tlsldm: 1
segT segment
long sequence
fixS * slaves
char string
struct cpu_type

Definition at line 475 of file tc-alpha.c.

Class Members
unsigned flags
const char * name

Define Documentation

#define ALPHA_RELOC_DIGITS   25

Definition at line 448 of file tc-alpha.c.

Definition at line 136 of file tc-alpha.c.

Definition at line 137 of file tc-alpha.c.

Definition at line 138 of file tc-alpha.c.

Definition at line 139 of file tc-alpha.c.

Definition at line 142 of file tc-alpha.c.

Definition at line 140 of file tc-alpha.c.

Definition at line 141 of file tc-alpha.c.

#define is_fpr_num (   x)    (((x) & 32) != 0)

Definition at line 149 of file tc-alpha.c.

#define is_ir_num (   x)    (((x) & 32) == 0)

Definition at line 148 of file tc-alpha.c.

#define MAX_INSN_ARGS   5

Definition at line 71 of file tc-alpha.c.

#define MAX_INSN_FIXUPS   2

Definition at line 70 of file tc-alpha.c.

#define MAX_LITTLENUMS   6

Definition at line 5024 of file tc-alpha.c.

#define md_atof   vax_md_atof

Definition at line 5712 of file tc-alpha.c.

#define note_fpreg (   R)    (alpha_fprmask |= (1 << (R)))

Definition at line 155 of file tc-alpha.c.

#define note_gpreg (   R)    (alpha_gprmask |= (1 << (R)))

Definition at line 154 of file tc-alpha.c.

#define O_cpregister   O_md2 /* + a leading comma. */

Definition at line 109 of file tc-alpha.c.

#define O_dtprel   O_md21 /* !dtprel relocation. */

Definition at line 130 of file tc-alpha.c.

#define O_dtprelhi   O_md19 /* !dtprelhi relocation. */

Definition at line 128 of file tc-alpha.c.

#define O_dtprello   O_md20 /* !dtprello relocation. */

Definition at line 129 of file tc-alpha.c.

#define O_gotdtprel   O_md18 /* !gotdtprel relocation. */

Definition at line 127 of file tc-alpha.c.

#define O_gottprel   O_md22 /* !gottprel relocation. */

Definition at line 131 of file tc-alpha.c.

#define O_gpdisp   O_md11 /* !gpdisp relocation. */

Definition at line 120 of file tc-alpha.c.

#define O_gprel   O_md14 /* !gprel relocation. */

Definition at line 123 of file tc-alpha.c.

#define O_gprelhigh   O_md12 /* !gprelhigh relocation. */

Definition at line 121 of file tc-alpha.c.

#define O_gprellow   O_md13 /* !gprellow relocation. */

Definition at line 122 of file tc-alpha.c.

#define O_literal   O_md3 /* !literal relocation. */

Definition at line 112 of file tc-alpha.c.

#define O_lituse_addr   O_md4 /* !lituse_addr relocation. */

Definition at line 113 of file tc-alpha.c.

#define O_lituse_base   O_md5 /* !lituse_base relocation. */

Definition at line 114 of file tc-alpha.c.

#define O_lituse_bytoff   O_md6 /* !lituse_bytoff relocation. */

Definition at line 115 of file tc-alpha.c.

#define O_lituse_jsr   O_md7 /* !lituse_jsr relocation. */

Definition at line 116 of file tc-alpha.c.

#define O_lituse_jsrdirect   O_md10 /* !lituse_jsrdirect relocation. */

Definition at line 119 of file tc-alpha.c.

#define O_lituse_tlsgd   O_md8 /* !lituse_tlsgd relocation. */

Definition at line 117 of file tc-alpha.c.

#define O_lituse_tlsldm   O_md9 /* !lituse_tlsldm relocation. */

Definition at line 118 of file tc-alpha.c.

#define O_pregister   O_md1 /* O_register, in parentheses. */

Definition at line 108 of file tc-alpha.c.

#define O_samegp   O_md15 /* !samegp relocation. */

Definition at line 124 of file tc-alpha.c.

#define O_tlsgd   O_md16 /* !tlsgd relocation. */

Definition at line 125 of file tc-alpha.c.

#define O_tlsldm   O_md17 /* !tlsldm relocation. */

Definition at line 126 of file tc-alpha.c.

#define O_tprel   O_md25 /* !tprel relocation. */

Definition at line 134 of file tc-alpha.c.

#define O_tprelhi   O_md23 /* !tprelhi relocation. */

Definition at line 132 of file tc-alpha.c.

#define O_tprello   O_md24 /* !tprello relocation. */

Definition at line 133 of file tc-alpha.c.

#define OPTION_32ADDR   (OPTION_MD_BASE)
#define OPTION_RELAX   (OPTION_32ADDR + 1)
#define range_signed_16 (   x)    (((offsetT) (x) >> 15) == 0 || ((offsetT) (x) >> 15) == -1)

Definition at line 162 of file tc-alpha.c.

#define range_signed_32 (   x)    (((offsetT) (x) >> 31) == 0 || ((offsetT) (x) >> 31) == -1)

Definition at line 164 of file tc-alpha.c.

#define regno (   x)    ((x) & 31)

Definition at line 150 of file tc-alpha.c.

#define set_tok_const (   t,
  n 
)
Value:
(memset (&(t), 0, sizeof (t)),            \
                             (t).X_op = O_constant,                   \
                             (t).X_add_number = (n))

Definition at line 204 of file tc-alpha.c.

#define set_tok_cpreg (   t,
  r 
)
Value:
(memset (&(t), 0, sizeof (t)),            \
                             (t).X_op = O_cpregister,          \
                             (t).X_add_number = (r))

Definition at line 194 of file tc-alpha.c.

#define set_tok_freg (   t,
  r 
)
Value:
(memset (&(t), 0, sizeof (t)),            \
                             (t).X_op = O_register,                   \
                             (t).X_add_number = (r) + 32)

Definition at line 197 of file tc-alpha.c.

#define set_tok_preg (   t,
  r 
)
Value:
(memset (&(t), 0, sizeof (t)),            \
                             (t).X_op = O_pregister,           \
                             (t).X_add_number = (r))

Definition at line 191 of file tc-alpha.c.

#define set_tok_reg (   t,
  r 
)
Value:
(memset (&(t), 0, sizeof (t)),            \
                             (t).X_op = O_register,                   \
                             (t).X_add_number = (r))

Definition at line 188 of file tc-alpha.c.

#define set_tok_sym (   t,
  s,
  a 
)
Value:
(memset (&(t), 0, sizeof (t)),            \
                             (t).X_op = O_symbol,                     \
                             (t).X_add_symbol = (s),           \
                             (t).X_add_number = (a))

Definition at line 200 of file tc-alpha.c.

#define sign_extend_16 (   x)    ((short) (x))

Definition at line 178 of file tc-alpha.c.

#define sign_extend_32 (   x)    ((int) (x))

Definition at line 179 of file tc-alpha.c.

#define TOKENIZE_ERROR   -1

Definition at line 68 of file tc-alpha.c.

#define TOKENIZE_ERROR_REPORT   -2

Definition at line 69 of file tc-alpha.c.

#define USER_RELOC_P (   R)    ((R) >= O_literal && (R) <= O_tprel)

Definition at line 144 of file tc-alpha.c.


Enumeration Type Documentation

Enumerator:
MACRO_EOA 
MACRO_IR 
MACRO_PIR 
MACRO_OPIR 
MACRO_CPIR 
MACRO_FPR 
MACRO_EXP 

Definition at line 87 of file tc-alpha.c.


Function Documentation

static void alpha_adjust_relocs ( bfd *abfd  ATTRIBUTE_UNUSED,
asection sec,
void *ptr  ATTRIBUTE_UNUSED 
) [static]

Definition at line 559 of file tc-alpha.c.

{
  segment_info_type *seginfo = seg_info (sec);
  fixS **prevP;
  fixS *fixp;
  fixS *next;
  fixS *slave;

  /* If seginfo is NULL, we did not create this section; don't do
     anything with it.  By using a pointer to a pointer, we can update
     the links in place.  */
  if (seginfo == NULL)
    return;

  /* If there are no relocations, skip the section.  */
  if (! seginfo->fix_root)
    return;

  /* First rebuild the fixup chain without the explicit lituse and
     gpdisp_lo16 relocs.  */
  prevP = &seginfo->fix_root;
  for (fixp = seginfo->fix_root; fixp; fixp = next)
    {
      next = fixp->fx_next;
      fixp->fx_next = (fixS *) 0;

      switch (fixp->fx_r_type)
       {
       case BFD_RELOC_ALPHA_LITUSE:
         if (fixp->tc_fix_data.info->n_master == 0)
           as_bad_where (fixp->fx_file, fixp->fx_line,
                       _("No !literal!%ld was found"),
                       fixp->tc_fix_data.info->sequence);
#ifdef RELOC_OP_P
         if (fixp->fx_offset == LITUSE_ALPHA_TLSGD)
           {
             if (! fixp->tc_fix_data.info->saw_tlsgd)
              as_bad_where (fixp->fx_file, fixp->fx_line,
                           _("No !tlsgd!%ld was found"),
                           fixp->tc_fix_data.info->sequence);
           }
         else if (fixp->fx_offset == LITUSE_ALPHA_TLSLDM)
           {
             if (! fixp->tc_fix_data.info->saw_tlsldm)
              as_bad_where (fixp->fx_file, fixp->fx_line,
                           _("No !tlsldm!%ld was found"),
                           fixp->tc_fix_data.info->sequence);
           }
#endif
         break;

       case BFD_RELOC_ALPHA_GPDISP_LO16:
         if (fixp->tc_fix_data.info->n_master == 0)
           as_bad_where (fixp->fx_file, fixp->fx_line,
                       _("No ldah !gpdisp!%ld was found"),
                       fixp->tc_fix_data.info->sequence);
         break;

       case BFD_RELOC_ALPHA_ELF_LITERAL:
         if (fixp->tc_fix_data.info
             && (fixp->tc_fix_data.info->saw_tlsgd
                 || fixp->tc_fix_data.info->saw_tlsldm))
           break;
         /* FALLTHRU */

       default:
         *prevP = fixp;
         prevP = &fixp->fx_next;
         break;
       }
    }

  /* Go back and re-chain dependent relocations.  They are currently
     linked through the next_reloc field in reverse order, so as we
     go through the next_reloc chain, we effectively reverse the chain
     once again.

     Except if there is more than one !literal for a given sequence
     number.  In that case, the programmer and/or compiler is not sure
     how control flows from literal to lituse, and we can't be sure to
     get the relaxation correct.

     ??? Well, actually we could, if there are enough lituses such that
     we can make each literal have at least one of each lituse type
     present.  Not implemented.

     Also suppress the optimization if the !literals/!lituses are spread
     in different segments.  This can happen with "intersting" uses of
     inline assembly; examples are present in the Linux kernel semaphores.  */

  for (fixp = seginfo->fix_root; fixp; fixp = next)
    {
      next = fixp->fx_next;
      switch (fixp->fx_r_type)
       {
       case BFD_RELOC_ALPHA_TLSGD:
       case BFD_RELOC_ALPHA_TLSLDM:
         if (!fixp->tc_fix_data.info)
           break;
         if (fixp->tc_fix_data.info->n_master == 0)
           break;
         else if (fixp->tc_fix_data.info->n_master > 1)
           {
             as_bad_where (fixp->fx_file, fixp->fx_line,
                         _("too many !literal!%ld for %s"),
                         fixp->tc_fix_data.info->sequence,
                         (fixp->fx_r_type == BFD_RELOC_ALPHA_TLSGD
                          ? "!tlsgd" : "!tlsldm"));
             break;
           }

         fixp->tc_fix_data.info->master->fx_next = fixp->fx_next;
         fixp->fx_next = fixp->tc_fix_data.info->master;
         fixp = fixp->fx_next;
         /* Fall through.  */

       case BFD_RELOC_ALPHA_ELF_LITERAL:
         if (fixp->tc_fix_data.info
             && fixp->tc_fix_data.info->n_master == 1
             && ! fixp->tc_fix_data.info->multi_section_p)
           {
             for (slave = fixp->tc_fix_data.info->slaves;
                 slave != (fixS *) 0;
                 slave = slave->tc_fix_data.next_reloc)
              {
                slave->fx_next = fixp->fx_next;
                fixp->fx_next = slave;
              }
           }
         break;

       case BFD_RELOC_ALPHA_GPDISP_HI16:
         if (fixp->tc_fix_data.info->n_slaves == 0)
           as_bad_where (fixp->fx_file, fixp->fx_line,
                       _("No lda !gpdisp!%ld was found"),
                       fixp->tc_fix_data.info->sequence);
         else
           {
             slave = fixp->tc_fix_data.info->slaves;
             slave->fx_next = next;
             fixp->fx_next = slave;
           }
         break;

       default:
         break;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void alpha_align ( int  n,
char *  pfill,
symbolS *  label,
int force  ATTRIBUTE_UNUSED 
) [static]

Definition at line 1554 of file tc-alpha.c.

{
  if (alpha_current_align >= n)
    return;

  if (pfill == NULL)
    {
      if (subseg_text_p (now_seg))
       frag_align_code (n, 0);
      else
       frag_align (n, 0, 0);
    }
  else
    frag_align (n, *pfill, 0);

  alpha_current_align = n;

  if (label != NULL && S_GET_SEGMENT (label) == now_seg)
    {
      symbol_set_frag (label, frag_now);
      S_SET_VALUE (label, (valueT) frag_now_fix ());
    }

  record_alignment (now_seg, n);

  /* ??? If alpha_flag_relax && force && elf, record the requested alignment
     in a reloc for the linker to see.  */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void alpha_before_fix ( void  )

Definition at line 716 of file tc-alpha.c.

Here is the call graph for this function:

Definition at line 3881 of file tc-alpha.c.

Here is the call graph for this function:

void alpha_cons_align ( int  size)

Definition at line 4546 of file tc-alpha.c.

{
  int log_size;

  log_size = 0;
  while ((size >>= 1) != 0)
    ++log_size;

  if (alpha_auto_align_on && alpha_current_align < log_size)
    alpha_align (log_size, (char *) NULL, alpha_insn_label, 0);
  if (alpha_current_align > log_size)
    alpha_current_align = log_size;
  alpha_insn_label = NULL;
}

Here is the call graph for this function:

void alpha_define_label ( symbolS *  sym)

Definition at line 5464 of file tc-alpha.c.

{
  alpha_insn_label = sym;
#ifdef OBJ_ELF
  dwarf2_emit_label (sym);
#endif
}

Here is the call graph for this function:

int alpha_fix_adjustable ( fixS *  f)

Definition at line 5518 of file tc-alpha.c.

{
  /* Are there any relocation types for which we must generate a
     reloc but we can adjust the values contained within it?   */
  switch (f->fx_r_type)
    {
    case BFD_RELOC_ALPHA_GPDISP_HI16:
    case BFD_RELOC_ALPHA_GPDISP_LO16:
    case BFD_RELOC_ALPHA_GPDISP:
      return 0;

    case BFD_RELOC_ALPHA_LITERAL:
    case BFD_RELOC_ALPHA_ELF_LITERAL:
    case BFD_RELOC_ALPHA_LITUSE:
    case BFD_RELOC_ALPHA_LINKAGE:
    case BFD_RELOC_ALPHA_CODEADDR:
      return 1;

    case BFD_RELOC_VTABLE_ENTRY:
    case BFD_RELOC_VTABLE_INHERIT:
      return 0;

    case BFD_RELOC_GPREL16:
    case BFD_RELOC_GPREL32:
    case BFD_RELOC_ALPHA_GPREL_HI16:
    case BFD_RELOC_ALPHA_GPREL_LO16:
    case BFD_RELOC_23_PCREL_S2:
    case BFD_RELOC_32:
    case BFD_RELOC_64:
    case BFD_RELOC_ALPHA_HINT:
      return 1;

    case BFD_RELOC_ALPHA_TLSGD:
    case BFD_RELOC_ALPHA_TLSLDM:
    case BFD_RELOC_ALPHA_GOTDTPREL16:
    case BFD_RELOC_ALPHA_DTPREL_HI16:
    case BFD_RELOC_ALPHA_DTPREL_LO16:
    case BFD_RELOC_ALPHA_DTPREL16:
    case BFD_RELOC_ALPHA_GOTTPREL16:
    case BFD_RELOC_ALPHA_TPREL_HI16:
    case BFD_RELOC_ALPHA_TPREL_LO16:
    case BFD_RELOC_ALPHA_TPREL16:
      /* ??? No idea why we can't return a reference to .tbss+10, but
        we're preventing this in the other assemblers.  Follow for now.  */
      return 0;

#ifdef OBJ_ELF
    case BFD_RELOC_ALPHA_BRSGP:
      /* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
         let it get resolved at assembly time.  */
      {
       symbolS *sym = f->fx_addsy;
       const char *name;
       int offset = 0;

       if (generic_force_reloc (f))
         return 0;

       switch (S_GET_OTHER (sym) & STO_ALPHA_STD_GPLOAD)
         {
         case STO_ALPHA_NOPV:
           break;
         case STO_ALPHA_STD_GPLOAD:
           offset = 8;
           break;
         default:
           if (S_IS_LOCAL (sym))
             name = "<local>";
           else
             name = S_GET_NAME (sym);
           as_bad_where (f->fx_file, f->fx_line,
              _("!samegp reloc against symbol without .prologue: %s"),
              name);
           break;
         }
       f->fx_r_type = BFD_RELOC_23_PCREL_S2;
       f->fx_offset += offset;
       return 1;
      }
#endif

    default:
      return 1;
    }
}

Here is the call graph for this function:

int alpha_force_relocation ( fixS *  f)
void alpha_handle_align ( fragS *  fragp)

Definition at line 4808 of file tc-alpha.c.

{
  static char const unop[4] = { 0x00, 0x00, 0xfe, 0x2f };
  static char const nopunop[8] =
  {
    0x1f, 0x04, 0xff, 0x47,
    0x00, 0x00, 0xfe, 0x2f
  };

  int bytes, fix;
  char *p;

  if (fragp->fr_type != rs_align_code)
    return;

  bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
  p = fragp->fr_literal + fragp->fr_fix;
  fix = 0;

  if (bytes & 3)
    {
      fix = bytes & 3;
      memset (p, 0, fix);
      p += fix;
      bytes -= fix;
    }

  if (bytes & 4)
    {
      memcpy (p, unop, 4);
      p += 4;
      bytes -= 4;
      fix += 4;
    }

  memcpy (p, nopunop, 8);

  fragp->fr_fix += fix;
  fragp->fr_var = 8;
}

Here is the call graph for this function:

static void assemble_insn ( const struct alpha_opcode opcode,
const expressionS tok,
int  ntok,
struct alpha_insn insn,
bfd_reloc_code_real_type  reloc 
) [static]

Definition at line 1844 of file tc-alpha.c.

{
  const struct alpha_operand *reloc_operand = NULL;
  const expressionS *reloc_exp = NULL;
  const unsigned char *argidx;
  unsigned image;
  int tokidx = 0;

  memset (insn, 0, sizeof (*insn));
  image = opcode->opcode;

  for (argidx = opcode->operands; *argidx; ++argidx)
    {
      const struct alpha_operand *operand = &alpha_operands[*argidx];
      const expressionS *t = (const expressionS *) 0;

      if (operand->flags & AXP_OPERAND_FAKE)
       {
         /* Fake operands take no value and generate no fixup.  */
         image = insert_operand (image, operand, 0, NULL, 0);
         continue;
       }

      if (tokidx >= ntok)
       {
         switch (operand->flags & AXP_OPERAND_OPTIONAL_MASK)
           {
           case AXP_OPERAND_DEFAULT_FIRST:
             t = &tok[0];
             break;
           case AXP_OPERAND_DEFAULT_SECOND:
             t = &tok[1];
             break;
           case AXP_OPERAND_DEFAULT_ZERO:
             {
              static expressionS zero_exp;
              t = &zero_exp;
              zero_exp.X_op = O_constant;
              zero_exp.X_unsigned = 1;
             }
             break;
           default:
             abort ();
           }
       }
      else
       t = &tok[tokidx++];

      switch (t->X_op)
       {
       case O_register:
       case O_pregister:
       case O_cpregister:
         image = insert_operand (image, operand, regno (t->X_add_number),
                              NULL, 0);
         break;

       case O_constant:
         image = insert_operand (image, operand, t->X_add_number, NULL, 0);
         assert (reloc_operand == NULL);
         reloc_operand = operand;
         reloc_exp = t;
         break;

       default:
         /* This is only 0 for fields that should contain registers,
            which means this pattern shouldn't have matched.  */
         if (operand->default_reloc == 0)
           abort ();

         /* There is one special case for which an insn receives two
            relocations, and thus the user-supplied reloc does not
            override the operand reloc.  */
         if (operand->default_reloc == BFD_RELOC_ALPHA_HINT)
           {
             struct alpha_fixup *fixup;

             if (insn->nfixups >= MAX_INSN_FIXUPS)
              as_fatal (_("too many fixups"));

             fixup = &insn->fixups[insn->nfixups++];
             fixup->exp = *t;
             fixup->reloc = BFD_RELOC_ALPHA_HINT;
           }
         else
           {
             if (reloc == BFD_RELOC_UNUSED)
              reloc = operand->default_reloc;

             assert (reloc_operand == NULL);
             reloc_operand = operand;
             reloc_exp = t;
           }
         break;
       }
    }

  if (reloc != BFD_RELOC_UNUSED)
    {
      struct alpha_fixup *fixup;

      if (insn->nfixups >= MAX_INSN_FIXUPS)
       as_fatal (_("too many fixups"));

      /* ??? My but this is hacky.  But the OSF/1 assembler uses the same
        relocation tag for both ldah and lda with gpdisp.  Choose the
        correct internal relocation based on the opcode.  */
      if (reloc == BFD_RELOC_ALPHA_GPDISP)
       {
         if (strcmp (opcode->name, "ldah") == 0)
           reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
         else if (strcmp (opcode->name, "lda") == 0)
           reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
         else
           as_bad (_("invalid relocation for instruction"));
       }

      /* If this is a real relocation (as opposed to a lituse hint), then
        the relocation width should match the operand width.  */
      else if (reloc < BFD_RELOC_UNUSED)
       {
         reloc_howto_type *reloc_howto
           = bfd_reloc_type_lookup (stdoutput, reloc);
         if (reloc_howto->bitsize != reloc_operand->bits)
           {
             as_bad (_("invalid relocation for field"));
             return;
           }
       }

      fixup = &insn->fixups[insn->nfixups++];
      if (reloc_exp)
       fixup->exp = *reloc_exp;
      else
       fixup->exp.X_op = O_absent;
      fixup->reloc = reloc;
    }

  insn->insn = image;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void assemble_tokens ( const char *  opname,
const expressionS tok,
int  ntok,
int  local_macros_on 
) [static]

Definition at line 3080 of file tc-alpha.c.

{
  int found_something = 0;
  const struct alpha_opcode *opcode;
  const struct alpha_macro *macro;
  int cpumatch = 1;
  bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED;

#ifdef RELOC_OP_P
  /* If a user-specified relocation is present, this is not a macro.  */
  if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
    {
      reloc = ALPHA_RELOC_TABLE (tok[ntok - 1].X_op)->reloc;
      ntok--;
    }
  else
#endif
  if (local_macros_on)
    {
      macro = ((const struct alpha_macro *)
              hash_find (alpha_macro_hash, opname));
      if (macro)
       {
         found_something = 1;
         macro = find_macro_match (macro, tok, &ntok);
         if (macro)
           {
             (*macro->emit) (tok, ntok, macro->arg);
             return;
           }
       }
    }

  /* Search opcodes.  */
  opcode = (const struct alpha_opcode *) hash_find (alpha_opcode_hash, opname);
  if (opcode)
    {
      found_something = 1;
      opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch);
      if (opcode)
       {
         struct alpha_insn insn;
         assemble_insn (opcode, tok, ntok, &insn, reloc);

         /* Copy the sequence number for the reloc from the reloc token.  */
         if (reloc != BFD_RELOC_UNUSED)
           insn.sequence = tok[ntok].X_add_number;

         emit_insn (&insn);
         return;
       }
    }

  if (found_something)
    {
      if (cpumatch)
       as_bad (_("inappropriate arguments for opcode `%s'"), opname);
      else
       as_bad (_("opcode `%s' not supported for target %s"), opname,
              alpha_target_name);
    }
  else
    as_bad (_("unknown opcode `%s'"), opname);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void assemble_tokens_to_insn ( const char *  opname,
const expressionS tok,
int  ntok,
struct alpha_insn insn 
) [static]

Definition at line 1104 of file tc-alpha.c.

{
  const struct alpha_opcode *opcode;

  /* Search opcodes.  */
  opcode = (const struct alpha_opcode *) hash_find (alpha_opcode_hash, opname);
  if (opcode)
    {
      int cpumatch;
      opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch);
      if (opcode)
       {
         assemble_insn (opcode, tok, ntok, insn, BFD_RELOC_UNUSED);
         return;
       }
      else if (cpumatch)
       as_bad (_("inappropriate arguments for opcode `%s'"), opname);
      else
       as_bad (_("opcode `%s' not supported for target %s"), opname,
              alpha_target_name);
    }
  else
    as_bad (_("unknown opcode `%s'"), opname);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void create_literal_section ( const char *  name,
segT secp,
symbolS **  symp 
) [static]

Definition at line 1136 of file tc-alpha.c.

{
  segT current_section = now_seg;
  int current_subsec = now_subseg;
  segT new_sec;

  *secp = new_sec = subseg_new (name, 0);
  subseg_set (current_section, current_subsec);
  bfd_set_section_alignment (stdoutput, new_sec, 4);
  bfd_set_section_flags (stdoutput, new_sec,
                      SEC_RELOC | SEC_ALLOC | SEC_LOAD | SEC_READONLY
                      | SEC_DATA);

  S_CLEAR_EXTERNAL (*symp = section_symbol (new_sec));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void emit_division ( const expressionS tok,
int  ntok,
const void *  symname 
) [static]

Definition at line 2532 of file tc-alpha.c.

{
  /* DIVISION and MODULUS. Yech.
     Convert
        OP x,y,result
     to
        lda pv,__OP
        mov x,t10
        mov y,t11
        jsr t9,(pv),__OP
        mov t12,result

     with appropriate optimizations if t10,t11,t12 are the registers
     specified by the compiler.  */

  int xr, yr, rr;
  symbolS *sym;
  expressionS newtok[3];

  xr = regno (tok[0].X_add_number);
  yr = regno (tok[1].X_add_number);

  if (ntok < 3)
    rr = xr;
  else
    rr = regno (tok[2].X_add_number);

  sym = symbol_find_or_make ((const char *) symname);

  /* Move the operands into the right place.  */
  if (yr == AXP_REG_T10 && xr == AXP_REG_T11)
    {
      /* They are in exactly the wrong order -- swap through AT.  */
      if (alpha_noat_on)
       as_bad (_("macro requires $at register while noat in effect"));

      set_tok_reg (newtok[0], AXP_REG_T10);
      set_tok_reg (newtok[1], AXP_REG_AT);
      assemble_tokens ("mov", newtok, 2, 1);

      set_tok_reg (newtok[0], AXP_REG_T11);
      set_tok_reg (newtok[1], AXP_REG_T10);
      assemble_tokens ("mov", newtok, 2, 1);

      set_tok_reg (newtok[0], AXP_REG_AT);
      set_tok_reg (newtok[1], AXP_REG_T11);
      assemble_tokens ("mov", newtok, 2, 1);
    }
  else
    {
      if (yr == AXP_REG_T10)
       {
         set_tok_reg (newtok[0], AXP_REG_T10);
         set_tok_reg (newtok[1], AXP_REG_T11);
         assemble_tokens ("mov", newtok, 2, 1);
       }

      if (xr != AXP_REG_T10)
       {
         set_tok_reg (newtok[0], xr);
         set_tok_reg (newtok[1], AXP_REG_T10);
         assemble_tokens ("mov", newtok, 2, 1);
       }

      if (yr != AXP_REG_T10 && yr != AXP_REG_T11)
       {
         set_tok_reg (newtok[0], yr);
         set_tok_reg (newtok[1], AXP_REG_T11);
         assemble_tokens ("mov", newtok, 2, 1);
       }
    }

  /* Call the division routine.  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_sym (newtok[1], sym, 0);
  assemble_tokens ("jsr", newtok, 2, 1);

  /* Reload the GP register.  */
#ifdef OBJ_AOUT
FIXME
#endif
#if defined(OBJ_ECOFF) || defined(OBJ_ELF)
  set_tok_reg (newtok[0], alpha_gp_register);
  set_tok_const (newtok[1], 0);
  set_tok_preg (newtok[2], AXP_REG_T9);
  assemble_tokens ("ldgp", newtok, 3, 1);
#endif

  /* Move the result to the right place.  */
  if (rr != AXP_REG_T12)
    {
      set_tok_reg (newtok[0], AXP_REG_T12);
      set_tok_reg (newtok[1], rr);
      assemble_tokens ("mov", newtok, 2, 1);
    }
}

Here is the call graph for this function:

static void emit_insn ( struct alpha_insn insn) [static]

Definition at line 1589 of file tc-alpha.c.

{
  char *f;
  int i;

  /* Take care of alignment duties.  */
  if (alpha_auto_align_on && alpha_current_align < 2)
    alpha_align (2, (char *) NULL, alpha_insn_label, 0);
  if (alpha_current_align > 2)
    alpha_current_align = 2;
  alpha_insn_label = NULL;

  /* Write out the instruction.  */
  f = frag_more (4);
  md_number_to_chars (f, insn->insn, 4);

#ifdef OBJ_ELF
  dwarf2_emit_insn (4);
#endif

  /* Apply the fixups in order.  */
  for (i = 0; i < insn->nfixups; ++i)
    {
      const struct alpha_operand *operand = (const struct alpha_operand *) 0;
      struct alpha_fixup *fixup = &insn->fixups[i];
      struct alpha_reloc_tag *info = NULL;
      int size, pcrel;
      fixS *fixP;

      /* Some fixups are only used internally and so have no howto.  */
      if ((int) fixup->reloc < 0)
       {
         operand = &alpha_operands[-(int) fixup->reloc];
         size = 4;
         pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0);
       }
      else if (fixup->reloc > BFD_RELOC_UNUSED
              || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_HI16
              || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_LO16)
       {
         size = 2;
         pcrel = 0;
       }
      else
       {
         reloc_howto_type *reloc_howto
           = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
         assert (reloc_howto);

         size = bfd_get_reloc_size (reloc_howto);
         assert (size >= 1 && size <= 4);

         pcrel = reloc_howto->pc_relative;
       }

      fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
                       &fixup->exp, pcrel, fixup->reloc);

      /* Turn off complaints that the addend is too large for some fixups,
         and copy in the sequence number for the explicit relocations.  */
      switch (fixup->reloc)
       {
       case BFD_RELOC_ALPHA_HINT:
       case BFD_RELOC_GPREL32:
       case BFD_RELOC_GPREL16:
       case BFD_RELOC_ALPHA_GPREL_HI16:
       case BFD_RELOC_ALPHA_GPREL_LO16:
       case BFD_RELOC_ALPHA_GOTDTPREL16:
       case BFD_RELOC_ALPHA_DTPREL_HI16:
       case BFD_RELOC_ALPHA_DTPREL_LO16:
       case BFD_RELOC_ALPHA_DTPREL16:
       case BFD_RELOC_ALPHA_GOTTPREL16:
       case BFD_RELOC_ALPHA_TPREL_HI16:
       case BFD_RELOC_ALPHA_TPREL_LO16:
       case BFD_RELOC_ALPHA_TPREL16:
         fixP->fx_no_overflow = 1;
         break;

       case BFD_RELOC_ALPHA_GPDISP_HI16:
         fixP->fx_no_overflow = 1;
         fixP->fx_addsy = section_symbol (now_seg);
         fixP->fx_offset = 0;

         info = get_alpha_reloc_tag (insn->sequence);
         if (++info->n_master > 1)
           as_bad (_("too many ldah insns for !gpdisp!%ld"), insn->sequence);
         if (info->segment != now_seg)
           as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
                  insn->sequence);
         fixP->tc_fix_data.info = info;
         break;

       case BFD_RELOC_ALPHA_GPDISP_LO16:
         fixP->fx_no_overflow = 1;

         info = get_alpha_reloc_tag (insn->sequence);
         if (++info->n_slaves > 1)
           as_bad (_("too many lda insns for !gpdisp!%ld"), insn->sequence);
         if (info->segment != now_seg)
           as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
                  insn->sequence);
         fixP->tc_fix_data.info = info;
         info->slaves = fixP;
         break;

       case BFD_RELOC_ALPHA_LITERAL:
       case BFD_RELOC_ALPHA_ELF_LITERAL:
         fixP->fx_no_overflow = 1;

         if (insn->sequence == 0)
           break;
         info = get_alpha_reloc_tag (insn->sequence);
         info->master = fixP;
         info->n_master++;
         if (info->segment != now_seg)
           info->multi_section_p = 1;
         fixP->tc_fix_data.info = info;
         break;

#ifdef RELOC_OP_P
       case DUMMY_RELOC_LITUSE_ADDR:
         fixP->fx_offset = LITUSE_ALPHA_ADDR;
         goto do_lituse;
       case DUMMY_RELOC_LITUSE_BASE:
         fixP->fx_offset = LITUSE_ALPHA_BASE;
         goto do_lituse;
       case DUMMY_RELOC_LITUSE_BYTOFF:
         fixP->fx_offset = LITUSE_ALPHA_BYTOFF;
         goto do_lituse;
       case DUMMY_RELOC_LITUSE_JSR:
         fixP->fx_offset = LITUSE_ALPHA_JSR;
         goto do_lituse;
       case DUMMY_RELOC_LITUSE_TLSGD:
         fixP->fx_offset = LITUSE_ALPHA_TLSGD;
         goto do_lituse;
       case DUMMY_RELOC_LITUSE_TLSLDM:
         fixP->fx_offset = LITUSE_ALPHA_TLSLDM;
         goto do_lituse;
       case DUMMY_RELOC_LITUSE_JSRDIRECT:
         fixP->fx_offset = LITUSE_ALPHA_JSRDIRECT;
         goto do_lituse;
       do_lituse:
         fixP->fx_addsy = section_symbol (now_seg);
         fixP->fx_r_type = BFD_RELOC_ALPHA_LITUSE;

         info = get_alpha_reloc_tag (insn->sequence);
         if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSGD)
           info->saw_lu_tlsgd = 1;
         else if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSLDM)
           info->saw_lu_tlsldm = 1;
         if (++info->n_slaves > 1)
           {
             if (info->saw_lu_tlsgd)
              as_bad (_("too many lituse insns for !lituse_tlsgd!%ld"),
                      insn->sequence);
             else if (info->saw_lu_tlsldm)
              as_bad (_("too many lituse insns for !lituse_tlsldm!%ld"),
                      insn->sequence);
           }
         fixP->tc_fix_data.info = info;
         fixP->tc_fix_data.next_reloc = info->slaves;
         info->slaves = fixP;
         if (info->segment != now_seg)
           info->multi_section_p = 1;
         break;

       case BFD_RELOC_ALPHA_TLSGD:
         fixP->fx_no_overflow = 1;

         if (insn->sequence == 0)
           break;
         info = get_alpha_reloc_tag (insn->sequence);
         if (info->saw_tlsgd)
           as_bad (_("duplicate !tlsgd!%ld"), insn->sequence);
         else if (info->saw_tlsldm)
           as_bad (_("sequence number in use for !tlsldm!%ld"),
                  insn->sequence);
         else
           info->saw_tlsgd = 1;
         fixP->tc_fix_data.info = info;
         break;

       case BFD_RELOC_ALPHA_TLSLDM:
         fixP->fx_no_overflow = 1;

         if (insn->sequence == 0)
           break;
         info = get_alpha_reloc_tag (insn->sequence);
         if (info->saw_tlsldm)
           as_bad (_("duplicate !tlsldm!%ld"), insn->sequence);
         else if (info->saw_tlsgd)
           as_bad (_("sequence number in use for !tlsgd!%ld"),
                  insn->sequence);
         else
           info->saw_tlsldm = 1;
         fixP->tc_fix_data.info = info;
         break;
#endif
       default:
         if ((int) fixup->reloc < 0)
           {
             if (operand->flags & AXP_OPERAND_NOOVERFLOW)
              fixP->fx_no_overflow = 1;
           }
         break;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void emit_ir_load ( const expressionS tok,
int  ntok,
const void *  opname 
) [static]

Definition at line 1994 of file tc-alpha.c.

{
  int basereg;
  long lituse;
  expressionS newtok[3];
  struct alpha_insn insn;

  if (ntok == 2)
    basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register);
  else
    basereg = tok[2].X_add_number;

  lituse = load_expression (tok[0].X_add_number, &tok[1], &basereg,
                         &newtok[1]);

  newtok[0] = tok[0];
  set_tok_preg (newtok[2], basereg);

  assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn);

  if (lituse)
    {
      assert (insn.nfixups < MAX_INSN_FIXUPS);
      insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
      insn.fixups[insn.nfixups].exp.X_op = O_absent;
      insn.nfixups++;
      insn.sequence = lituse;
    }

  emit_insn (&insn);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void emit_jsrjmp ( const expressionS tok,
int  ntok,
const void *  vopname 
) [static]

Definition at line 2638 of file tc-alpha.c.

{
  const char *opname = (const char *) vopname;
  struct alpha_insn insn;
  expressionS newtok[3];
  int r, tokidx = 0;
  long lituse = 0;

  if (tokidx < ntok && tok[tokidx].X_op == O_register)
    r = regno (tok[tokidx++].X_add_number);
  else
    r = strcmp (opname, "jmp") == 0 ? AXP_REG_ZERO : AXP_REG_RA;

  set_tok_reg (newtok[0], r);

  if (tokidx < ntok &&
      (tok[tokidx].X_op == O_pregister || tok[tokidx].X_op == O_cpregister))
    r = regno (tok[tokidx++].X_add_number);
#ifdef OBJ_EVAX
  /* Keep register if jsr $n.<sym>.  */
#else
  else
    {
      int basereg = alpha_gp_register;
      lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL);
    }
#endif

  set_tok_cpreg (newtok[1], r);

#ifdef OBJ_EVAX
  /* FIXME: Add hint relocs to BFD for evax.  */
#else
  if (tokidx < ntok)
    newtok[2] = tok[tokidx];
  else
#endif
    set_tok_const (newtok[2], 0);

  assemble_tokens_to_insn (opname, newtok, 3, &insn);

  if (lituse)
    {
      assert (insn.nfixups < MAX_INSN_FIXUPS);
      insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_JSR;
      insn.fixups[insn.nfixups].exp.X_op = O_absent;
      insn.nfixups++;
      insn.sequence = lituse;
    }

  emit_insn (&insn);
}

Here is the call graph for this function:

static void emit_lda ( const expressionS tok,
int  ntok,
const void *unused  ATTRIBUTE_UNUSED 
) [static]

Definition at line 1517 of file tc-alpha.c.

{
  int basereg;

  if (ntok == 2)
    basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register);
  else
    basereg = tok[2].X_add_number;

  (void) load_expression (tok[0].X_add_number, &tok[1], &basereg, NULL);
}

Here is the call graph for this function:

static void emit_ldah ( const expressionS tok,
int ntok  ATTRIBUTE_UNUSED,
const void *unused  ATTRIBUTE_UNUSED 
) [static]

Definition at line 1535 of file tc-alpha.c.

{
  expressionS newtok[3];

  newtok[0] = tok[0];
  newtok[1] = tok[1];
  set_tok_preg (newtok[2], AXP_REG_ZERO);

  assemble_tokens ("ldah", newtok, 3, 0);
}

Here is the call graph for this function:

static void emit_ldgp ( const expressionS tok,
int ntok  ATTRIBUTE_UNUSED,
const void *unused  ATTRIBUTE_UNUSED 
) [static]

Definition at line 2731 of file tc-alpha.c.

{
#ifdef OBJ_AOUT
FIXME
#endif
#if defined(OBJ_ECOFF) || defined(OBJ_ELF)
  /* from "ldgp r1,n(r2)", generate "ldah r1,X(R2); lda r1,Y(r1)"
     with appropriate constants and relocations.  */
  struct alpha_insn insn;
  expressionS newtok[3];
  expressionS addend;

#ifdef OBJ_ECOFF
  if (regno (tok[2].X_add_number) == AXP_REG_PV)
    ecoff_set_gp_prolog_size (0);
#endif

  newtok[0] = tok[0];
  set_tok_const (newtok[1], 0);
  newtok[2] = tok[2];

  assemble_tokens_to_insn ("ldah", newtok, 3, &insn);

  addend = tok[1];

#ifdef OBJ_ECOFF
  if (addend.X_op != O_constant)
    as_bad (_("can not resolve expression"));
  addend.X_op = O_symbol;
  addend.X_add_symbol = alpha_gp_symbol;
#endif

  insn.nfixups = 1;
  insn.fixups[0].exp = addend;
  insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
  insn.sequence = next_sequence_num;

  emit_insn (&insn);

  set_tok_preg (newtok[2], tok[0].X_add_number);

  assemble_tokens_to_insn ("lda", newtok, 3, &insn);

#ifdef OBJ_ECOFF
  addend.X_add_number += 4;
#endif

  insn.nfixups = 1;
  insn.fixups[0].exp = addend;
  insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
  insn.sequence = next_sequence_num--;

  emit_insn (&insn);
#endif /* OBJ_ECOFF || OBJ_ELF */
}

Here is the call graph for this function:

static void emit_ldil ( const expressionS tok,
int  ntok,
const void *unused  ATTRIBUTE_UNUSED 
) [static]

Definition at line 2214 of file tc-alpha.c.

{
  expressionS newtok[2];

  memcpy (newtok, tok, sizeof (newtok));
  newtok[1].X_add_number = sign_extend_32 (tok[1].X_add_number);

  assemble_tokens ("lda", newtok, ntok, 1);
}

Here is the call graph for this function:

static void emit_ldX ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2142 of file tc-alpha.c.

{
  emit_ldXu (tok, ntok, vlgsize);
  assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1);
}

Here is the call graph for this function:

static void emit_ldXu ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2079 of file tc-alpha.c.

{
  if (alpha_target & AXP_OPCODE_BWX)
    emit_ir_load (tok, ntok, ldXu_op[(long) vlgsize]);
  else
    {
      expressionS newtok[3];
      struct alpha_insn insn;
      int basereg;
      long lituse;

      if (alpha_noat_on)
       as_bad (_("macro requires $at register while noat in effect"));

      if (ntok == 2)
       basereg = (tok[1].X_op == O_constant
                 ? AXP_REG_ZERO : alpha_gp_register);
      else
       basereg = tok[2].X_add_number;

      /* Emit "lda $at, exp".  */
      lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL);

      /* Emit "ldq_u targ, 0($at)".  */
      newtok[0] = tok[0];
      set_tok_const (newtok[1], 0);
      set_tok_preg (newtok[2], basereg);
      assemble_tokens_to_insn ("ldq_u", newtok, 3, &insn);

      if (lituse)
       {
         assert (insn.nfixups < MAX_INSN_FIXUPS);
         insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
         insn.fixups[insn.nfixups].exp.X_op = O_absent;
         insn.nfixups++;
         insn.sequence = lituse;
       }

      emit_insn (&insn);

      /* Emit "extXl targ, $at, targ".  */
      set_tok_reg (newtok[1], basereg);
      newtok[2] = newtok[0];
      assemble_tokens_to_insn (extXl_op[(long) vlgsize], newtok, 3, &insn);

      if (lituse)
       {
         assert (insn.nfixups < MAX_INSN_FIXUPS);
         insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
         insn.fixups[insn.nfixups].exp.X_op = O_absent;
         insn.nfixups++;
         insn.sequence = lituse;
       }

      emit_insn (&insn);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void emit_loadstore ( const expressionS tok,
int  ntok,
const void *  opname 
) [static]

Definition at line 2032 of file tc-alpha.c.

{
  int basereg;
  long lituse;
  expressionS newtok[3];
  struct alpha_insn insn;

  if (ntok == 2)
    basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register);
  else
    basereg = tok[2].X_add_number;

  if (tok[1].X_op != O_constant || !range_signed_16 (tok[1].X_add_number))
    {
      if (alpha_noat_on)
       as_bad (_("macro requires $at register while noat in effect"));

      lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1]);
    }
  else
    {
      newtok[1] = tok[1];
      lituse = 0;
    }

  newtok[0] = tok[0];
  set_tok_preg (newtok[2], basereg);

  assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn);

  if (lituse)
    {
      assert (insn.nfixups < MAX_INSN_FIXUPS);
      insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
      insn.fixups[insn.nfixups].exp.X_op = O_absent;
      insn.nfixups++;
      insn.sequence = lituse;
    }

  emit_insn (&insn);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void emit_retjcr ( const expressionS tok,
int  ntok,
const void *  vopname 
) [static]

Definition at line 2697 of file tc-alpha.c.

{
  const char *opname = (const char *) vopname;
  expressionS newtok[3];
  int r, tokidx = 0;

  if (tokidx < ntok && tok[tokidx].X_op == O_register)
    r = regno (tok[tokidx++].X_add_number);
  else
    r = AXP_REG_ZERO;

  set_tok_reg (newtok[0], r);

  if (tokidx < ntok &&
      (tok[tokidx].X_op == O_pregister || tok[tokidx].X_op == O_cpregister))
    r = regno (tok[tokidx++].X_add_number);
  else
    r = AXP_REG_RA;

  set_tok_cpreg (newtok[1], r);

  if (tokidx < ntok)
    newtok[2] = tok[tokidx];
  else
    set_tok_const (newtok[2], strcmp (opname, "ret") == 0);

  assemble_tokens (opname, newtok, 3, 0);
}

Here is the call graph for this function:

static void emit_sextX ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2402 of file tc-alpha.c.

{
  long lgsize = (long) vlgsize;

  if (alpha_target & AXP_OPCODE_BWX)
    assemble_tokens (sextX_op[lgsize], tok, ntok, 0);
  else
    {
      int bitshift = 64 - 8 * (1 << lgsize);
      expressionS newtok[3];

      /* Emit "sll src,bits,dst".  */
      newtok[0] = tok[0];
      set_tok_const (newtok[1], bitshift);
      newtok[2] = tok[ntok - 1];
      assemble_tokens ("sll", newtok, 3, 1);

      /* Emit "sra dst,bits,dst".  */
      newtok[0] = newtok[2];
      assemble_tokens ("sra", newtok, 3, 1);
    }
}

Here is the call graph for this function:

static void emit_stX ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2229 of file tc-alpha.c.

{
  int lgsize = (int) (long) vlgsize;

  if (alpha_target & AXP_OPCODE_BWX)
    emit_loadstore (tok, ntok, stX_op[lgsize]);
  else
    {
      expressionS newtok[3];
      struct alpha_insn insn;
      int basereg;
      long lituse;

      if (alpha_noat_on)
       as_bad (_("macro requires $at register while noat in effect"));

      if (ntok == 2)
       basereg = (tok[1].X_op == O_constant
                 ? AXP_REG_ZERO : alpha_gp_register);
      else
       basereg = tok[2].X_add_number;

      /* Emit "lda $at, exp".  */
      lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL);

      /* Emit "ldq_u $t9, 0($at)".  */
      set_tok_reg (newtok[0], AXP_REG_T9);
      set_tok_const (newtok[1], 0);
      set_tok_preg (newtok[2], basereg);
      assemble_tokens_to_insn ("ldq_u", newtok, 3, &insn);

      if (lituse)
       {
         assert (insn.nfixups < MAX_INSN_FIXUPS);
         insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
         insn.fixups[insn.nfixups].exp.X_op = O_absent;
         insn.nfixups++;
         insn.sequence = lituse;
       }

      emit_insn (&insn);

      /* Emit "insXl src, $at, $t10".  */
      newtok[0] = tok[0];
      set_tok_reg (newtok[1], basereg);
      set_tok_reg (newtok[2], AXP_REG_T10);
      assemble_tokens_to_insn (insXl_op[lgsize], newtok, 3, &insn);

      if (lituse)
       {
         assert (insn.nfixups < MAX_INSN_FIXUPS);
         insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
         insn.fixups[insn.nfixups].exp.X_op = O_absent;
         insn.nfixups++;
         insn.sequence = lituse;
       }

      emit_insn (&insn);

      /* Emit "mskXl $t9, $at, $t9".  */
      set_tok_reg (newtok[0], AXP_REG_T9);
      newtok[2] = newtok[0];
      assemble_tokens_to_insn (mskXl_op[lgsize], newtok, 3, &insn);

      if (lituse)
       {
         assert (insn.nfixups < MAX_INSN_FIXUPS);
         insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
         insn.fixups[insn.nfixups].exp.X_op = O_absent;
         insn.nfixups++;
         insn.sequence = lituse;
       }

      emit_insn (&insn);

      /* Emit "or $t9, $t10, $t9".  */
      set_tok_reg (newtok[1], AXP_REG_T10);
      assemble_tokens ("or", newtok, 3, 1);

      /* Emit "stq_u $t9, 0($at).  */
      set_tok_const(newtok[1], 0);
      set_tok_preg (newtok[2], AXP_REG_AT);
      assemble_tokens_to_insn ("stq_u", newtok, 3, &insn);

      if (lituse)
       {
         assert (insn.nfixups < MAX_INSN_FIXUPS);
         insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
         insn.fixups[insn.nfixups].exp.X_op = O_absent;
         insn.nfixups++;
         insn.sequence = lituse;
       }

      emit_insn (&insn);
    }
}

Here is the call graph for this function:

static void emit_uldX ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2203 of file tc-alpha.c.

{
  emit_uldXu (tok, ntok, vlgsize);
  assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1);
}

Here is the call graph for this function:

static void emit_uldXu ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2154 of file tc-alpha.c.

{
  long lgsize = (long) vlgsize;
  expressionS newtok[3];

  if (alpha_noat_on)
    as_bad (_("macro requires $at register while noat in effect"));

  /* Emit "lda $at, exp".  */
  memcpy (newtok, tok, sizeof (expressionS) * ntok);
  newtok[0].X_add_number = AXP_REG_AT;
  assemble_tokens ("lda", newtok, ntok, 1);

  /* Emit "ldq_u $t9, 0($at)".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_const (newtok[1], 0);
  set_tok_preg (newtok[2], AXP_REG_AT);
  assemble_tokens ("ldq_u", newtok, 3, 1);

  /* Emit "ldq_u $t10, size-1($at)".  */
  set_tok_reg (newtok[0], AXP_REG_T10);
  set_tok_const (newtok[1], (1 << lgsize) - 1);
  assemble_tokens ("ldq_u", newtok, 3, 1);

  /* Emit "extXl $t9, $at, $t9".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_reg (newtok[1], AXP_REG_AT);
  set_tok_reg (newtok[2], AXP_REG_T9);
  assemble_tokens (extXl_op[lgsize], newtok, 3, 1);

  /* Emit "extXh $t10, $at, $t10".  */
  set_tok_reg (newtok[0], AXP_REG_T10);
  set_tok_reg (newtok[2], AXP_REG_T10);
  assemble_tokens (extXh_op[lgsize], newtok, 3, 1);

  /* Emit "or $t9, $t10, targ".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_reg (newtok[1], AXP_REG_T10);
  newtok[2] = tok[0];
  assemble_tokens ("or", newtok, 3, 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void emit_ustX ( const expressionS tok,
int  ntok,
const void *  vlgsize 
) [static]

Definition at line 2331 of file tc-alpha.c.

{
  int lgsize = (int) (long) vlgsize;
  expressionS newtok[3];

  /* Emit "lda $at, exp".  */
  memcpy (newtok, tok, sizeof (expressionS) * ntok);
  newtok[0].X_add_number = AXP_REG_AT;
  assemble_tokens ("lda", newtok, ntok, 1);

  /* Emit "ldq_u $9, 0($at)".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_const (newtok[1], 0);
  set_tok_preg (newtok[2], AXP_REG_AT);
  assemble_tokens ("ldq_u", newtok, 3, 1);

  /* Emit "ldq_u $10, size-1($at)".  */
  set_tok_reg (newtok[0], AXP_REG_T10);
  set_tok_const (newtok[1], (1 << lgsize) - 1);
  assemble_tokens ("ldq_u", newtok, 3, 1);

  /* Emit "insXl src, $at, $t11".  */
  newtok[0] = tok[0];
  set_tok_reg (newtok[1], AXP_REG_AT);
  set_tok_reg (newtok[2], AXP_REG_T11);
  assemble_tokens (insXl_op[lgsize], newtok, 3, 1);

  /* Emit "insXh src, $at, $t12".  */
  set_tok_reg (newtok[2], AXP_REG_T12);
  assemble_tokens (insXh_op[lgsize], newtok, 3, 1);

  /* Emit "mskXl $t9, $at, $t9".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  newtok[2] = newtok[0];
  assemble_tokens (mskXl_op[lgsize], newtok, 3, 1);

  /* Emit "mskXh $t10, $at, $t10".  */
  set_tok_reg (newtok[0], AXP_REG_T10);
  newtok[2] = newtok[0];
  assemble_tokens (mskXh_op[lgsize], newtok, 3, 1);

  /* Emit "or $t9, $t11, $t9".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_reg (newtok[1], AXP_REG_T11);
  newtok[2] = newtok[0];
  assemble_tokens ("or", newtok, 3, 1);

  /* Emit "or $t10, $t12, $t10".  */
  set_tok_reg (newtok[0], AXP_REG_T10);
  set_tok_reg (newtok[1], AXP_REG_T12);
  newtok[2] = newtok[0];
  assemble_tokens ("or", newtok, 3, 1);

  /* Emit "stq_u $t10, size-1($at)".  */
  set_tok_reg (newtok[0], AXP_REG_T10);
  set_tok_const (newtok[1], (1 << lgsize) - 1);
  set_tok_preg (newtok[2], AXP_REG_AT);
  assemble_tokens ("stq_u", newtok, 3, 1);

  /* Emit "stq_u $t9, 0($at)".  */
  set_tok_reg (newtok[0], AXP_REG_T9);
  set_tok_const (newtok[1], 0);
  assemble_tokens ("stq_u", newtok, 3, 1);
}

Here is the call graph for this function:

static struct alpha_macro* find_macro_match ( const struct alpha_macro first_macro,
const expressionS tok,
int pntok 
) [static, read]

Definition at line 2970 of file tc-alpha.c.

{
  const struct alpha_macro *macro = first_macro;
  int ntok = *pntok;

  do
    {
      const enum alpha_macro_arg *arg = macro->argsets;
      int tokidx = 0;

      while (*arg)
       {
         switch (*arg)
           {
           case MACRO_EOA:
             if (tokidx == ntok)
              return macro;
             else
              tokidx = 0;
             break;

             /* Index register.  */
           case MACRO_IR:
             if (tokidx >= ntok || tok[tokidx].X_op != O_register
                || !is_ir_num (tok[tokidx].X_add_number))
              goto match_failed;
             ++tokidx;
             break;

             /* Parenthesized index register.  */
           case MACRO_PIR:
             if (tokidx >= ntok || tok[tokidx].X_op != O_pregister
                || !is_ir_num (tok[tokidx].X_add_number))
              goto match_failed;
             ++tokidx;
             break;

             /* Optional parenthesized index register.  */
           case MACRO_OPIR:
             if (tokidx < ntok && tok[tokidx].X_op == O_pregister
                && is_ir_num (tok[tokidx].X_add_number))
              ++tokidx;
             break;

             /* Leading comma with a parenthesized index register.  */
           case MACRO_CPIR:
             if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister
                || !is_ir_num (tok[tokidx].X_add_number))
              goto match_failed;
             ++tokidx;
             break;

             /* Floating point register.  */
           case MACRO_FPR:
             if (tokidx >= ntok || tok[tokidx].X_op != O_register
                || !is_fpr_num (tok[tokidx].X_add_number))
              goto match_failed;
             ++tokidx;
             break;

             /* Normal expression.  */
           case MACRO_EXP:
             if (tokidx >= ntok)
              goto match_failed;
             switch (tok[tokidx].X_op)
              {
              case O_illegal:
              case O_absent:
              case O_register:
              case O_pregister:
              case O_cpregister:
              case O_literal:
              case O_lituse_base:
              case O_lituse_bytoff:
              case O_lituse_jsr:
              case O_gpdisp:
              case O_gprelhigh:
              case O_gprellow:
              case O_gprel:
              case O_samegp:
                goto match_failed;

              default:
                break;
              }
             ++tokidx;
             break;

           match_failed:
             while (*arg != MACRO_EOA)
              ++arg;
             tokidx = 0;
             break;
           }
         ++arg;
       }
    }
  while (++macro - alpha_macros < (int) alpha_num_macros
        && !strcmp (macro->name, first_macro->name));

  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static struct alpha_opcode* find_opcode_match ( const struct alpha_opcode first_opcode,
const expressionS tok,
int pntok,
int pcpumatch 
) [static, read]

Definition at line 995 of file tc-alpha.c.

{
  const struct alpha_opcode *opcode = first_opcode;
  int ntok = *pntok;
  int got_cpu_match = 0;

  do
    {
      const unsigned char *opidx;
      int tokidx = 0;

      /* Don't match opcodes that don't exist on this architecture.  */
      if (!(opcode->flags & alpha_target))
       goto match_failed;

      got_cpu_match = 1;

      for (opidx = opcode->operands; *opidx; ++opidx)
       {
         const struct alpha_operand *operand = &alpha_operands[*opidx];

         /* Only take input from real operands.  */
         if (operand->flags & AXP_OPERAND_FAKE)
           continue;

         /* When we expect input, make sure we have it.  */
         if (tokidx >= ntok)
           {
             if ((operand->flags & AXP_OPERAND_OPTIONAL_MASK) == 0)
              goto match_failed;
             continue;
           }

         /* Match operand type with expression type.  */
         switch (operand->flags & AXP_OPERAND_TYPECHECK_MASK)
           {
           case AXP_OPERAND_IR:
             if (tok[tokidx].X_op != O_register
                || !is_ir_num (tok[tokidx].X_add_number))
              goto match_failed;
             break;
           case AXP_OPERAND_FPR:
             if (tok[tokidx].X_op != O_register
                || !is_fpr_num (tok[tokidx].X_add_number))
              goto match_failed;
             break;
           case AXP_OPERAND_IR | AXP_OPERAND_PARENS:
             if (tok[tokidx].X_op != O_pregister
                || !is_ir_num (tok[tokidx].X_add_number))
              goto match_failed;
             break;
           case AXP_OPERAND_IR | AXP_OPERAND_PARENS | AXP_OPERAND_COMMA:
             if (tok[tokidx].X_op != O_cpregister
                || !is_ir_num (tok[tokidx].X_add_number))
              goto match_failed;
             break;

           case AXP_OPERAND_RELATIVE:
           case AXP_OPERAND_SIGNED:
           case AXP_OPERAND_UNSIGNED:
             switch (tok[tokidx].X_op)
              {
              case O_illegal:
              case O_absent:
              case O_register:
              case O_pregister:
              case O_cpregister:
                goto match_failed;

              default:
                break;
              }
             break;

           default:
             /* Everything else should have been fake.  */
             abort ();
           }
         ++tokidx;
       }

      /* Possible match -- did we use all of our input?  */
      if (tokidx == ntok)
       {
         *pntok = ntok;
         return opcode;
       }

    match_failed:;
    }
  while (++opcode - alpha_opcodes < (int) alpha_num_opcodes
        && !strcmp (opcode->name, first_opcode->name));

  if (*pcpumatch)
    *pcpumatch = got_cpu_match;

  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static struct alpha_reloc_tag* get_alpha_reloc_tag ( long  sequence) [static, read]

Definition at line 532 of file tc-alpha.c.

{
  char buffer[ALPHA_RELOC_DIGITS];
  struct alpha_reloc_tag *info;

  sprintf (buffer, "!%ld", sequence);

  info = (struct alpha_reloc_tag *) hash_find (alpha_literal_hash, buffer);
  if (! info)
    {
      size_t len = strlen (buffer);
      const char *errmsg;

      info = xcalloc (sizeof (struct alpha_reloc_tag) + len, 1);

      info->segment = now_seg;
      info->sequence = sequence;
      strcpy (info->string, buffer);
      errmsg = hash_insert (alpha_literal_hash, info->string, (void *) info);
      if (errmsg)
       as_fatal (errmsg);
    }

  return info;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned insert_operand ( unsigned  insn,
const struct alpha_operand operand,
offsetT  val,
char *  file,
unsigned  line 
) [static]

Definition at line 1801 of file tc-alpha.c.

{
  if (operand->bits != 32 && !(operand->flags & AXP_OPERAND_NOOVERFLOW))
    {
      offsetT min, max;

      if (operand->flags & AXP_OPERAND_SIGNED)
       {
         max = (1 << (operand->bits - 1)) - 1;
         min = -(1 << (operand->bits - 1));
       }
      else
       {
         max = (1 << operand->bits) - 1;
         min = 0;
       }

      if (val < min || val > max)
       as_warn_value_out_of_range (_("operand"), val, min, max, file, line);
    }

  if (operand->insert)
    {
      const char *errmsg = NULL;

      insn = (*operand->insert) (insn, val, &errmsg);
      if (errmsg)
       as_warn (errmsg);
    }
  else
    insn |= ((val & ((1 << operand->bits) - 1)) << operand->shift);

  return insn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static long load_expression ( int  targreg,
const expressionS exp,
int pbasereg,
expressionS poffset 
) [static]

Definition at line 1176 of file tc-alpha.c.

{
  long emit_lituse = 0;
  offsetT addend = exp->X_add_number;
  int basereg = *pbasereg;
  struct alpha_insn insn;
  expressionS newtok[3];

  switch (exp->X_op)
    {
    case O_symbol:
      {
#ifdef OBJ_ECOFF
       offsetT lit;

       /* Attempt to reduce .lit load by splitting the offset from
          its symbol when possible, but don't create a situation in
          which we'd fail.  */
       if (!range_signed_32 (addend) &&
           (alpha_noat_on || targreg == AXP_REG_AT))
         {
           lit = add_to_literal_pool (exp->X_add_symbol, addend,
                                   alpha_lita_section, 8);
           addend = 0;
         }
       else
         lit = add_to_literal_pool (exp->X_add_symbol, 0,
                                 alpha_lita_section, 8);

       if (lit >= 0x8000)
         as_fatal (_("overflow in literal (.lita) table"));

       /* Emit "ldq r, lit(gp)".  */

       if (basereg != alpha_gp_register && targreg == basereg)
         {
           if (alpha_noat_on)
             as_bad (_("macro requires $at register while noat in effect"));
           if (targreg == AXP_REG_AT)
             as_bad (_("macro requires $at while $at in use"));

           set_tok_reg (newtok[0], AXP_REG_AT);
         }
       else
         set_tok_reg (newtok[0], targreg);

       set_tok_sym (newtok[1], alpha_lita_symbol, lit);
       set_tok_preg (newtok[2], alpha_gp_register);

       assemble_tokens_to_insn ("ldq", newtok, 3, &insn);

       assert (insn.nfixups == 1);
       insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL;
       insn.sequence = emit_lituse = next_sequence_num--;
#endif /* OBJ_ECOFF */
#ifdef OBJ_ELF
       /* Emit "ldq r, gotoff(gp)".  */

       if (basereg != alpha_gp_register && targreg == basereg)
         {
           if (alpha_noat_on)
             as_bad (_("macro requires $at register while noat in effect"));
           if (targreg == AXP_REG_AT)
             as_bad (_("macro requires $at while $at in use"));

           set_tok_reg (newtok[0], AXP_REG_AT);
         }
       else
         set_tok_reg (newtok[0], targreg);

       /* XXX: Disable this .got minimizing optimization so that we can get
          better instruction offset knowledge in the compiler.  This happens
          very infrequently anyway.  */
       if (1
           || (!range_signed_32 (addend)
              && (alpha_noat_on || targreg == AXP_REG_AT)))
         {
           newtok[1] = *exp;
           addend = 0;
         }
       else
         set_tok_sym (newtok[1], exp->X_add_symbol, 0);

       set_tok_preg (newtok[2], alpha_gp_register);

       assemble_tokens_to_insn ("ldq", newtok, 3, &insn);

       assert (insn.nfixups == 1);
       insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
       insn.sequence = emit_lituse = next_sequence_num--;
#endif /* OBJ_ELF */
#ifdef OBJ_EVAX
       offsetT link;

       /* Find symbol or symbol pointer in link section.  */

       if (exp->X_add_symbol == alpha_evax_proc.symbol)
         {
           if (range_signed_16 (addend))
             {
              set_tok_reg (newtok[0], targreg);
              set_tok_const (newtok[1], addend);
              set_tok_preg (newtok[2], basereg);
              assemble_tokens_to_insn ("lda", newtok, 3, &insn);
              addend = 0;
             }
           else
             {
              set_tok_reg (newtok[0], targreg);
              set_tok_const (newtok[1], 0);
              set_tok_preg (newtok[2], basereg);
              assemble_tokens_to_insn ("lda", newtok, 3, &insn);
             }
         }
       else
         {
           if (!range_signed_32 (addend))
             {
              link = add_to_link_pool (alpha_evax_proc.symbol,
                                    exp->X_add_symbol, addend);
              addend = 0;
             }
           else
             link = add_to_link_pool (alpha_evax_proc.symbol,
                                   exp->X_add_symbol, 0);

           set_tok_reg (newtok[0], targreg);
           set_tok_const (newtok[1], link);
           set_tok_preg (newtok[2], basereg);
           assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
         }
#endif /* OBJ_EVAX */

       emit_insn (&insn);

#ifndef OBJ_EVAX
       if (basereg != alpha_gp_register && basereg != AXP_REG_ZERO)
         {
           /* Emit "addq r, base, r".  */

           set_tok_reg (newtok[1], basereg);
           set_tok_reg (newtok[2], targreg);
           assemble_tokens ("addq", newtok, 3, 0);
         }
#endif
       basereg = targreg;
      }
      break;

    case O_constant:
      break;

    case O_subtract:
      /* Assume that this difference expression will be resolved to an
        absolute value and that that value will fit in 16 bits.  */

      set_tok_reg (newtok[0], targreg);
      newtok[1] = *exp;
      set_tok_preg (newtok[2], basereg);
      assemble_tokens ("lda", newtok, 3, 0);

      if (poffset)
       set_tok_const (*poffset, 0);
      return 0;

    case O_big:
      if (exp->X_add_number > 0)
       as_bad (_("bignum invalid; zero assumed"));
      else
       as_bad (_("floating point number invalid; zero assumed"));
      addend = 0;
      break;

    default:
      as_bad (_("can't handle expression"));
      addend = 0;
      break;
    }

  if (!range_signed_32 (addend))
    {
      offsetT lit;
      long seq_num = next_sequence_num--;

      /* For 64-bit addends, just put it in the literal pool.  */
#ifdef OBJ_EVAX
      /* Emit "ldq targreg, lit(basereg)".  */
      lit = add_to_link_pool (alpha_evax_proc.symbol,
                           section_symbol (absolute_section), addend);
      set_tok_reg (newtok[0], targreg);
      set_tok_const (newtok[1], lit);
      set_tok_preg (newtok[2], alpha_gp_register);
      assemble_tokens ("ldq", newtok, 3, 0);
#else

      if (alpha_lit8_section == NULL)
       {
         create_literal_section (".lit8",
                              &alpha_lit8_section,
                              &alpha_lit8_symbol);

#ifdef OBJ_ECOFF
         alpha_lit8_literal = add_to_literal_pool (alpha_lit8_symbol, 0x8000,
                                              alpha_lita_section, 8);
         if (alpha_lit8_literal >= 0x8000)
           as_fatal (_("overflow in literal (.lita) table"));
#endif
       }

      lit = add_to_literal_pool (NULL, addend, alpha_lit8_section, 8) - 0x8000;
      if (lit >= 0x8000)
       as_fatal (_("overflow in literal (.lit8) table"));

      /* Emit "lda litreg, .lit8+0x8000".  */

      if (targreg == basereg)
       {
         if (alpha_noat_on)
           as_bad (_("macro requires $at register while noat in effect"));
         if (targreg == AXP_REG_AT)
           as_bad (_("macro requires $at while $at in use"));

         set_tok_reg (newtok[0], AXP_REG_AT);
       }
      else
       set_tok_reg (newtok[0], targreg);
#ifdef OBJ_ECOFF
      set_tok_sym (newtok[1], alpha_lita_symbol, alpha_lit8_literal);
#endif
#ifdef OBJ_ELF
      set_tok_sym (newtok[1], alpha_lit8_symbol, 0x8000);
#endif
      set_tok_preg (newtok[2], alpha_gp_register);

      assemble_tokens_to_insn ("ldq", newtok, 3, &insn);

      assert (insn.nfixups == 1);
#ifdef OBJ_ECOFF
      insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL;
#endif
#ifdef OBJ_ELF
      insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
#endif
      insn.sequence = seq_num;

      emit_insn (&insn);

      /* Emit "ldq litreg, lit(litreg)".  */

      set_tok_const (newtok[1], lit);
      set_tok_preg (newtok[2], newtok[0].X_add_number);

      assemble_tokens_to_insn ("ldq", newtok, 3, &insn);

      assert (insn.nfixups < MAX_INSN_FIXUPS);
      insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
      insn.fixups[insn.nfixups].exp.X_op = O_absent;
      insn.nfixups++;
      insn.sequence = seq_num;
      emit_lituse = 0;

      emit_insn (&insn);

      /* Emit "addq litreg, base, target".  */

      if (basereg != AXP_REG_ZERO)
       {
         set_tok_reg (newtok[1], basereg);
         set_tok_reg (newtok[2], targreg);
         assemble_tokens ("addq", newtok, 3, 0);
       }
#endif /* !OBJ_EVAX */

      if (poffset)
       set_tok_const (*poffset, 0);
      *pbasereg = targreg;
    }
  else
    {
      offsetT low, high, extra, tmp;

      /* For 32-bit operands, break up the addend.  */

      low = sign_extend_16 (addend);
      tmp = addend - low;
      high = sign_extend_16 (tmp >> 16);

      if (tmp - (high << 16))
       {
         extra = 0x4000;
         tmp -= 0x40000000;
         high = sign_extend_16 (tmp >> 16);
       }
      else
       extra = 0;

      set_tok_reg (newtok[0], targreg);
      set_tok_preg (newtok[2], basereg);

      if (extra)
       {
         /* Emit "ldah r, extra(r).  */
         set_tok_const (newtok[1], extra);
         assemble_tokens ("ldah", newtok, 3, 0);
         set_tok_preg (newtok[2], basereg = targreg);
       }

      if (high)
       {
         /* Emit "ldah r, high(r).  */
         set_tok_const (newtok[1], high);
         assemble_tokens ("ldah", newtok, 3, 0);
         basereg = targreg;
         set_tok_preg (newtok[2], basereg);
       }

      if ((low && !poffset) || (!poffset && basereg != targreg))
       {
         /* Emit "lda r, low(base)".  */
         set_tok_const (newtok[1], low);
         assemble_tokens ("lda", newtok, 3, 0);
         basereg = targreg;
         low = 0;
       }

      if (poffset)
       set_tok_const (*poffset, low);
      *pbasereg = basereg;
    }

  return emit_lituse;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void md_apply_fix ( fixS *  fixP,
valueT valP,
segT seg   
)

Definition at line 5207 of file tc-alpha.c.

{
  char * const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where;
  valueT value = * valP;
  unsigned image, size;

  switch (fixP->fx_r_type)
    {
      /* The GPDISP relocations are processed internally with a symbol
        referring to the current function's section;  we need to drop
        in a value which, when added to the address of the start of
        the function, gives the desired GP.  */
    case BFD_RELOC_ALPHA_GPDISP_HI16:
      {
       fixS *next = fixP->fx_next;

       /* With user-specified !gpdisp relocations, we can be missing
          the matching LO16 reloc.  We will have already issued an
          error message.  */
       if (next)
         fixP->fx_offset = (next->fx_frag->fr_address + next->fx_where
                          - fixP->fx_frag->fr_address - fixP->fx_where);

       value = (value - sign_extend_16 (value)) >> 16;
      }
#ifdef OBJ_ELF
      fixP->fx_r_type = BFD_RELOC_ALPHA_GPDISP;
#endif
      goto do_reloc_gp;

    case BFD_RELOC_ALPHA_GPDISP_LO16:
      value = sign_extend_16 (value);
      fixP->fx_offset = 0;
#ifdef OBJ_ELF
      fixP->fx_done = 1;
#endif

    do_reloc_gp:
      fixP->fx_addsy = section_symbol (seg);
      md_number_to_chars (fixpos, value, 2);
      break;

    case BFD_RELOC_16:
      if (fixP->fx_pcrel)
       fixP->fx_r_type = BFD_RELOC_16_PCREL;
      size = 2;
      goto do_reloc_xx;

    case BFD_RELOC_32:
      if (fixP->fx_pcrel)
       fixP->fx_r_type = BFD_RELOC_32_PCREL;
      size = 4;
      goto do_reloc_xx;

    case BFD_RELOC_64:
      if (fixP->fx_pcrel)
       fixP->fx_r_type = BFD_RELOC_64_PCREL;
      size = 8;

    do_reloc_xx:
      if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
       {
         md_number_to_chars (fixpos, value, size);
         goto done;
       }
      return;

#ifdef OBJ_ECOFF
    case BFD_RELOC_GPREL32:
      assert (fixP->fx_subsy == alpha_gp_symbol);
      fixP->fx_subsy = 0;
      /* FIXME: inherited this obliviousness of `value' -- why?  */
      md_number_to_chars (fixpos, -alpha_gp_value, 4);
      break;
#else
    case BFD_RELOC_GPREL32:
#endif
    case BFD_RELOC_GPREL16:
    case BFD_RELOC_ALPHA_GPREL_HI16:
    case BFD_RELOC_ALPHA_GPREL_LO16:
      return;

    case BFD_RELOC_23_PCREL_S2:
      if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
       {
         image = bfd_getl32 (fixpos);
         image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF);
         goto write_done;
       }
      return;

    case BFD_RELOC_ALPHA_HINT:
      if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
       {
         image = bfd_getl32 (fixpos);
         image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF);
         goto write_done;
       }
      return;

#ifdef OBJ_ELF
    case BFD_RELOC_ALPHA_BRSGP:
      return;

    case BFD_RELOC_ALPHA_TLSGD:
    case BFD_RELOC_ALPHA_TLSLDM:
    case BFD_RELOC_ALPHA_GOTDTPREL16:
    case BFD_RELOC_ALPHA_DTPREL_HI16:
    case BFD_RELOC_ALPHA_DTPREL_LO16:
    case BFD_RELOC_ALPHA_DTPREL16:
    case BFD_RELOC_ALPHA_GOTTPREL16:
    case BFD_RELOC_ALPHA_TPREL_HI16:
    case BFD_RELOC_ALPHA_TPREL_LO16:
    case BFD_RELOC_ALPHA_TPREL16:
      if (fixP->fx_addsy)
       S_SET_THREAD_LOCAL (fixP->fx_addsy);
      return;
#endif

#ifdef OBJ_ECOFF
    case BFD_RELOC_ALPHA_LITERAL:
      md_number_to_chars (fixpos, value, 2);
      return;
#endif
    case BFD_RELOC_ALPHA_ELF_LITERAL:
    case BFD_RELOC_ALPHA_LITUSE:
    case BFD_RELOC_ALPHA_LINKAGE:
    case BFD_RELOC_ALPHA_CODEADDR:
      return;

    case BFD_RELOC_VTABLE_INHERIT:
    case BFD_RELOC_VTABLE_ENTRY:
      return;

    default:
      {
       const struct alpha_operand *operand;

       if ((int) fixP->fx_r_type >= 0)
         as_fatal (_("unhandled relocation type %s"),
                  bfd_get_reloc_code_name (fixP->fx_r_type));

       assert (-(int) fixP->fx_r_type < (int) alpha_num_operands);
       operand = &alpha_operands[-(int) fixP->fx_r_type];

       /* The rest of these fixups only exist internally during symbol
          resolution and have no representation in the object file.
          Therefore they must be completely resolved as constants.  */

       if (fixP->fx_addsy != 0
           && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section)
         as_bad_where (fixP->fx_file, fixP->fx_line,
                     _("non-absolute expression in constant field"));

       image = bfd_getl32 (fixpos);
       image = insert_operand (image, operand, (offsetT) value,
                            fixP->fx_file, fixP->fx_line);
      }
      goto write_done;
    }

  if (fixP->fx_addsy != 0 || fixP->fx_pcrel != 0)
    return;
  else
    {
      as_warn_where (fixP->fx_file, fixP->fx_line,
                   _("type %d reloc done?\n"), (int) fixP->fx_r_type);
      goto done;
    }

write_done:
  md_number_to_chars (fixpos, image, 4);

done:
  fixP->fx_done = 1;
}

Here is the call graph for this function:

void md_assemble ( char *  str)

Definition at line 4978 of file tc-alpha.c.

{
  /* Current maximum is 13.  */
  char opname[32];
  expressionS tok[MAX_INSN_ARGS];
  int ntok, trunclen;
  size_t opnamelen;

  /* Split off the opcode.  */
  opnamelen = strspn (str, "abcdefghijklmnopqrstuvwxyz_/46819");
  trunclen = (opnamelen < sizeof (opname) - 1
             ? opnamelen
             : sizeof (opname) - 1);
  memcpy (opname, str, trunclen);
  opname[trunclen] = '\0';

  /* Tokenize the rest of the line.  */
  if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0)
    {
      if (ntok != TOKENIZE_ERROR_REPORT)
       as_bad (_("syntax error"));

      return;
    }

  /* Finish it off.  */
  assemble_tokens (opname, tok, ntok, alpha_macros_on);
}

Here is the caller graph for this function:

char* md_atof ( int type  ,
char *  litP,
int sizeP 
)

Definition at line 5029 of file tc-alpha.c.

{
  int prec;
  LITTLENUM_TYPE words[MAX_LITTLENUMS];
  LITTLENUM_TYPE *wordP;
  char *t;

  switch (type)
    {
      /* VAX floats.  */
    case 'G':
      /* VAX md_atof doesn't like "G" for some reason.  */
      type = 'g';
    case 'F':
    case 'D':
      return vax_md_atof (type, litP, sizeP);

      /* IEEE floats.  */
    case 'f':
      prec = 2;
      break;

    case 'd':
      prec = 4;
      break;

    case 'x':
    case 'X':
      prec = 6;
      break;

    case 'p':
    case 'P':
      prec = 6;
      break;

    default:
      *sizeP = 0;
      return _("Bad call to MD_ATOF()");
    }
  t = atof_ieee (input_line_pointer, type, words);
  if (t)
    input_line_pointer = t;
  *sizeP = prec * sizeof (LITTLENUM_TYPE);

  for (wordP = words + prec - 1; prec--;)
    {
      md_number_to_chars (litP, (long) (*wordP--), sizeof (LITTLENUM_TYPE));
      litP += sizeof (LITTLENUM_TYPE);
    }

  return 0;
}

Here is the call graph for this function:

void md_begin ( void  )

Definition at line 4856 of file tc-alpha.c.

{
  unsigned int i;

  /* Verify that X_op field is wide enough.  */
  {
    expressionS e;

    e.X_op = O_max;
    assert (e.X_op == O_max);
  }

  /* Create the opcode hash table.  */
  alpha_opcode_hash = hash_new ();

  for (i = 0; i < alpha_num_opcodes;)
    {
      const char *name, *retval, *slash;

      name = alpha_opcodes[i].name;
      retval = hash_insert (alpha_opcode_hash, name, (void *) &alpha_opcodes[i]);
      if (retval)
       as_fatal (_("internal error: can't hash opcode `%s': %s"),
                name, retval);

      /* Some opcodes include modifiers of various sorts with a "/mod"
        syntax, like the architecture manual suggests.  However, for
        use with gcc at least, we also need access to those same opcodes
        without the "/".  */

      if ((slash = strchr (name, '/')) != NULL)
       {
         char *p = xmalloc (strlen (name));

         memcpy (p, name, slash - name);
         strcpy (p + (slash - name), slash + 1);

         (void) hash_insert (alpha_opcode_hash, p, (void *) &alpha_opcodes[i]);
         /* Ignore failures -- the opcode table does duplicate some
            variants in different forms, like "hw_stq" and "hw_st/q".  */
       }

      while (++i < alpha_num_opcodes
            && (alpha_opcodes[i].name == name
               || !strcmp (alpha_opcodes[i].name, name)))
       continue;
    }

  /* Create the macro hash table.  */
  alpha_macro_hash = hash_new ();

  for (i = 0; i < alpha_num_macros;)
    {
      const char *name, *retval;

      name = alpha_macros[i].name;
      retval = hash_insert (alpha_macro_hash, name, (void *) &alpha_macros[i]);
      if (retval)
       as_fatal (_("internal error: can't hash macro `%s': %s"),
                name, retval);

      while (++i < alpha_num_macros
            && (alpha_macros[i].name == name
               || !strcmp (alpha_macros[i].name, name)))
       continue;
    }

  /* Construct symbols for each of the registers.  */
  for (i = 0; i < 32; ++i)
    {
      char name[4];

      sprintf (name, "$%d", i);
      alpha_register_table[i] = symbol_create (name, reg_section, i,
                                          &zero_address_frag);
    }

  for (; i < 64; ++i)
    {
      char name[5];

      sprintf (name, "$f%d", i - 32);
      alpha_register_table[i] = symbol_create (name, reg_section, i,
                                          &zero_address_frag);
    }

  /* Create the special symbols and sections we'll be using.  */

  /* So .sbss will get used for tiny objects.  */
  bfd_set_gp_size (stdoutput, g_switch_value);

#ifdef OBJ_ECOFF
  create_literal_section (".lita", &alpha_lita_section, &alpha_lita_symbol);

  /* For handling the GP, create a symbol that won't be output in the
     symbol table.  We'll edit it out of relocs later.  */
  alpha_gp_symbol = symbol_create ("<GP value>", alpha_lita_section, 0x8000,
                               &zero_address_frag);
#endif

#ifdef OBJ_EVAX
  create_literal_section (".link", &alpha_link_section, &alpha_link_symbol);
#endif

#ifdef OBJ_ELF
  if (ECOFF_DEBUGGING)
    {
      segT sec = subseg_new (".mdebug", (subsegT) 0);
      bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY);
      bfd_set_section_alignment (stdoutput, sec, 3);
    }
#endif

  /* Create literal lookup hash table.  */
  alpha_literal_hash = hash_new ();

  subseg_set (text_section, 0);
}
int md_parse_option ( int c  ,
char *  arg 
)

Definition at line 5086 of file tc-alpha.c.

{
  switch (c)
    {
    case 'F':
      alpha_nofloats_on = 1;
      break;

    case OPTION_32ADDR:
      alpha_addr32_on = 1;
      break;

    case 'g':
      alpha_debug = 1;
      break;

    case 'G':
      g_switch_value = atoi (arg);
      break;

    case 'm':
      {
       const struct cpu_type *p;

       for (p = cpu_types; p->name; ++p)
         if (strcmp (arg, p->name) == 0)
           {
             alpha_target_name = p->name, alpha_target = p->flags;
             goto found;
           }
       as_warn (_("Unknown CPU identifier `%s'"), arg);
      found:;
      }
      break;

#ifdef OBJ_EVAX
    case '+':               /* For g++.  Hash any name > 63 chars long.  */
      alpha_flag_hash_long_names = 1;
      break;

    case 'H':               /* Show new symbol after hash truncation.  */
      alpha_flag_show_after_trunc = 1;
      break;

    case 'h':               /* For gnu-c/vax compatibility.  */
      break;
#endif

    case OPTION_RELAX:
      alpha_flag_relax = 1;
      break;

#ifdef OBJ_ELF
    case OPTION_MDEBUG:
      alpha_flag_mdebug = 1;
      break;
    case OPTION_NO_MDEBUG:
      alpha_flag_mdebug = 0;
      break;
#endif

    default:
      return 0;
    }

  return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

long md_pcrel_from ( fixS *  fixP)

Definition at line 5181 of file tc-alpha.c.

{
  valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;

  switch (fixP->fx_r_type)
    {
    case BFD_RELOC_23_PCREL_S2:
    case BFD_RELOC_ALPHA_HINT:
    case BFD_RELOC_ALPHA_BRSGP:
      return addr + 4;
    default:
      return addr;
    }
}

Definition at line 5010 of file tc-alpha.c.

{
  int align = bfd_get_section_alignment (stdoutput, seg);
  valueT mask = ((valueT) 1 << align) - 1;

  return (size + mask) & ~mask;
}

Here is the call graph for this function:

void md_show_usage ( FILE *  stream)

Definition at line 5157 of file tc-alpha.c.

{
  fputs (_("\
Alpha options:\n\
-32addr                     treat addresses as 32-bit values\n\
-F                   lack floating point instructions support\n\
-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mev67 | -mev68 | -mall\n\
                     specify variant of Alpha architecture\n\
-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264 | -m21264a | -m21264b\n\
                     these variants include PALcode opcodes\n"),
       stream);
#ifdef OBJ_EVAX
  fputs (_("\
VMS options:\n\
-+                   hash encode (don't truncate) names longer than 64 characters\n\
-H                   show new symbol after hash truncation\n"),
       stream);
#endif
}

Here is the caller graph for this function:

symbolS* md_undefined_symbol ( char *  name)

Definition at line 5387 of file tc-alpha.c.

{
  if (*name == '$')
    {
      int is_float = 0, num;

      switch (*++name)
       {
       case 'f':
         if (name[1] == 'p' && name[2] == '\0')
           return alpha_register_table[AXP_REG_FP];
         is_float = 32;
         /* Fall through.  */

       case 'r':
         if (!ISDIGIT (*++name))
           break;
         /* Fall through.  */

       case '0': case '1': case '2': case '3': case '4':
       case '5': case '6': case '7': case '8': case '9':
         if (name[1] == '\0')
           num = name[0] - '0';
         else if (name[0] != '0' && ISDIGIT (name[1]) && name[2] == '\0')
           {
             num = (name[0] - '0') * 10 + name[1] - '0';
             if (num >= 32)
              break;
           }
         else
           break;

         if (!alpha_noat_on && (num + is_float) == AXP_REG_AT)
           as_warn (_("Used $at without \".set noat\""));
         return alpha_register_table[num + is_float];

       case 'a':
         if (name[1] == 't' && name[2] == '\0')
           {
             if (!alpha_noat_on)
              as_warn (_("Used $at without \".set noat\""));
             return alpha_register_table[AXP_REG_AT];
           }
         break;

       case 'g':
         if (name[1] == 'p' && name[2] == '\0')
           return alpha_register_table[alpha_gp_register];
         break;

       case 's':
         if (name[1] == 'p' && name[2] == '\0')
           return alpha_register_table[AXP_REG_SP];
         break;
       }
    }
  return NULL;
}
static void s_alpha_align ( int ignore  ATTRIBUTE_UNUSED) [static]

Definition at line 4483 of file tc-alpha.c.

{
  int align;
  char fill, *pfill;
  long max_alignment = 15;

  align = get_absolute_expression ();
  if (align > max_alignment)
    {
      align = max_alignment;
      as_bad (_("Alignment too large: %d. assumed"), align);
    }
  else if (align < 0)
    {
      as_warn (_("Alignment negative: 0 assumed"));
      align = 0;
    }

  if (*input_line_pointer == ',')
    {
      input_line_pointer++;
      fill = get_absolute_expression ();
      pfill = &fill;
    }
  else
    pfill = NULL;

  if (align != 0)
    {
      alpha_auto_align_on = 1;
      alpha_align (align, pfill, alpha_insn_label, 1);
    }
  else
    {
      alpha_auto_align_on = 0;
    }

  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void s_alpha_arch ( int ignored  ATTRIBUTE_UNUSED) [static]

Definition at line 4576 of file tc-alpha.c.

{
  char *name, ch;
  const struct cpu_type *p;

  SKIP_WHITESPACE ();
  name = input_line_pointer;
  ch = get_symbol_end ();

  for (p = cpu_types; p->name; ++p)
    if (strcmp (name, p->name) == 0)
      {
       alpha_target_name = p->name, alpha_target = p->flags;
       goto found;
      }
  as_warn ("Unknown CPU identifier `%s'", name);

found:
  *input_line_pointer = ch;
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void s_alpha_base ( int ignore  ATTRIBUTE_UNUSED) [static]

Definition at line 4456 of file tc-alpha.c.

{
  SKIP_WHITESPACE ();

  if (*input_line_pointer == '$')
    {
      /* $rNN form.  */
      input_line_pointer++;
      if (*input_line_pointer == 'r')
       input_line_pointer++;
    }

  alpha_gp_register = get_absolute_expression ();
  if (alpha_gp_register < 0 || alpha_gp_register > 31)
    {
      alpha_gp_register = AXP_REG_GP;
      as_warn (_("Bad base register, using $%d."), alpha_gp_register);
    }

  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void s_alpha_data ( int  i) [static]

Definition at line 3227 of file tc-alpha.c.

{
#ifdef OBJ_ELF
  obj_elf_data (i);
#else
  s_data (i);
#endif
  alpha_insn_label = NULL;
  alpha_auto_align_on = 1;
  alpha_current_align = 0;
}

Here is the call graph for this function:

static void s_alpha_float_cons ( int  type) [static]

Definition at line 4343 of file tc-alpha.c.

{
  int log_size;

  switch (type)
    {
    default:
    case 'f':
    case 'F':
      log_size = 2;
      break;

    case 'd':
    case 'D':
    case 'G':
      log_size = 3;
      break;

    case 'x':
    case 'X':
    case 'p':
    case 'P':
      log_size = 4;
      break;
    }

  if (alpha_auto_align_on && alpha_current_align < log_size)
    alpha_align (log_size, (char *) NULL, alpha_insn_label, 0);
  if (alpha_current_align > log_size)
    alpha_current_align = log_size;
  alpha_insn_label = NULL;

  float_cons (type);
}

Here is the call graph for this function:

static void s_alpha_gprel32 ( int ignore  ATTRIBUTE_UNUSED) [static]

Definition at line 4289 of file tc-alpha.c.

{
  expressionS e;
  char *p;

  SKIP_WHITESPACE ();
  expression (&e);

#ifdef OBJ_ELF
  switch (e.X_op)
    {
    case O_constant:
      e.X_add_symbol = section_symbol (absolute_section);
      e.X_op = O_symbol;
      /* FALLTHRU */
    case O_symbol:
      break;
    default:
      abort ();
    }
#else
#ifdef OBJ_ECOFF
  switch (e.X_op)
    {
    case O_constant:
      e.X_add_symbol = section_symbol (absolute_section);
      /* fall through */
    case O_symbol:
      e.X_op = O_subtract;
      e.X_op_symbol = alpha_gp_symbol;
      break;
    default:
      abort ();
    }
#endif
#endif

  if (alpha_auto_align_on && alpha_current_align < 2)
    alpha_align (2, (char *) NULL, alpha_insn_label, 0);
  if (alpha_current_align > 2)
    alpha_current_align = 2;
  alpha_insn_label = NULL;

  p = frag_more (4);
  memset (p, 0, 4);
  fix_new_exp (frag_now, p - frag_now->fr_literal, 4,
              &e, 0, BFD_RELOC_GPREL32);
}

Here is the call graph for this function:

static void s_alpha_proc ( int is_static  ATTRIBUTE_UNUSED) [static]

Definition at line 4382 of file tc-alpha.c.

{
  char *name;
  char c;
  char *p;
  symbolS *symbolP;
  int temp;

  /* Takes ".proc name,nargs".  */
  SKIP_WHITESPACE ();
  name = input_line_pointer;
  c = get_symbol_end ();
  p = input_line_pointer;
  symbolP = symbol_find_or_make (name);
  *p = c;
  SKIP_WHITESPACE ();
  if (*input_line_pointer != ',')
    {
      *p = 0;
      as_warn (_("Expected comma after name \"%s\""), name);
      *p = c;
      temp = 0;
      ignore_rest_of_line ();
    }
  else
    {
      input_line_pointer++;
      temp = get_absolute_expression ();
    }
  /*  *symbol_get_obj (symbolP) = (signed char) temp; */
  as_warn (_("unhandled: .proc %s,%d"), name, temp);
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void s_alpha_set ( int x  ATTRIBUTE_UNUSED) [static]

Definition at line 4420 of file tc-alpha.c.

{
  char *name, ch, *s;
  int yesno = 1;

  SKIP_WHITESPACE ();
  name = input_line_pointer;
  ch = get_symbol_end ();

  s = name;
  if (s[0] == 'n' && s[1] == 'o')
    {
      yesno = 0;
      s += 2;
    }
  if (!strcmp ("reorder", s))
    /* ignore */ ;
  else if (!strcmp ("at", s))
    alpha_noat_on = !yesno;
  else if (!strcmp ("macro", s))
    alpha_macros_on = yesno;
  else if (!strcmp ("move", s))
    /* ignore */ ;
  else if (!strcmp ("volatile", s))
    /* ignore */ ;
  else
    as_warn (_("Tried to .set unrecognized mode `%s'"), name);

  *input_line_pointer = ch;
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void s_alpha_space ( int  ignore) [static]

Definition at line 4536 of file tc-alpha.c.

Here is the call graph for this function:

static void s_alpha_stringer ( int  terminate) [static]

Definition at line 4526 of file tc-alpha.c.

Here is the call graph for this function:

static void s_alpha_text ( int  i) [static]

Definition at line 3210 of file tc-alpha.c.

{
#ifdef OBJ_ELF
  obj_elf_text (i);
#else
  s_text (i);
#endif
  alpha_insn_label = NULL;
  alpha_auto_align_on = 1;
  alpha_current_align = 0;
}

Here is the call graph for this function:

static void s_alpha_ucons ( int  bytes) [static]

Definition at line 4565 of file tc-alpha.c.

{
  int hold = alpha_auto_align_on;
  alpha_auto_align_on = 0;
  cons (bytes);
  alpha_auto_align_on = hold;
}

Here is the call graph for this function:

arelent* tc_gen_reloc ( asection *sec  ATTRIBUTE_UNUSED,
fixS *  fixp 
)

Definition at line 5608 of file tc-alpha.c.

{
  arelent *reloc;

  reloc = xmalloc (sizeof (* reloc));
  reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
  *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
  reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;

  /* Make sure none of our internal relocations make it this far.
     They'd better have been fully resolved by this point.  */
  assert ((int) fixp->fx_r_type > 0);

  reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
  if (reloc->howto == NULL)
    {
      as_bad_where (fixp->fx_file, fixp->fx_line,
                  _("cannot represent `%s' relocation in object file"),
                  bfd_get_reloc_code_name (fixp->fx_r_type));
      return NULL;
    }

  if (!fixp->fx_pcrel != !reloc->howto->pc_relative)
    as_fatal (_("internal error? cannot generate `%s' relocation"),
             bfd_get_reloc_code_name (fixp->fx_r_type));

  assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);

#ifdef OBJ_ECOFF
  if (fixp->fx_r_type == BFD_RELOC_ALPHA_LITERAL)
    /* Fake out bfd_perform_relocation. sigh.  */
    reloc->addend = -alpha_gp_value;
  else
#endif
    {
      reloc->addend = fixp->fx_offset;
#ifdef OBJ_ELF
      /* Ohhh, this is ugly.  The problem is that if this is a local global
         symbol, the relocation will entirely be performed at link time, not
         at assembly time.  bfd_perform_reloc doesn't know about this sort
         of thing, and as a result we need to fake it out here.  */
      if ((S_IS_EXTERNAL (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)
          || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE)
          || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_THREAD_LOCAL))
         && !S_IS_COMMON (fixp->fx_addsy))
       reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value;
#endif
    }

  return reloc;
}

Here is the call graph for this function:

int tc_get_register ( int frame  ATTRIBUTE_UNUSED) [abstract]

Definition at line 5668 of file tc-alpha.c.

{
  int framereg = AXP_REG_SP;

  SKIP_WHITESPACE ();
  if (*input_line_pointer == '$')
    {
      char *s = input_line_pointer;
      char c = get_symbol_end ();
      symbolS *sym = md_undefined_symbol (s);

      *strchr (s, '\0') = c;
      if (sym && (framereg = S_GET_VALUE (sym)) <= 31)
       goto found;
    }
  as_warn (_("frame reg expected, using $%d."), framereg);

found:
  note_gpreg (framereg);
  return framereg;
}

Here is the caller graph for this function:

static int tokenize_arguments ( char *  str,
expressionS  tok[],
int  ntok 
) [static]

Definition at line 807 of file tc-alpha.c.

{
  expressionS *end_tok = tok + ntok;
  char *old_input_line_pointer;
  int saw_comma = 0, saw_arg = 0;
#ifdef DEBUG_ALPHA
  expressionS *orig_tok = tok;
#endif
#ifdef RELOC_OP_P
  char *p;
  const struct alpha_reloc_op_tag *r;
  int c, i;
  size_t len;
  int reloc_found_p = 0;
#endif

  memset (tok, 0, sizeof (*tok) * ntok);

  /* Save and restore input_line_pointer around this function.  */
  old_input_line_pointer = input_line_pointer;
  input_line_pointer = str;

#ifdef RELOC_OP_P
  /* ??? Wrest control of ! away from the regular expression parser.  */
  is_end_of_line[(unsigned char) '!'] = 1;
#endif

  while (tok < end_tok && *input_line_pointer)
    {
      SKIP_WHITESPACE ();
      switch (*input_line_pointer)
       {
       case '\0':
         goto fini;

#ifdef RELOC_OP_P
       case '!':
         /* A relocation operand can be placed after the normal operand on an
            assembly language statement, and has the following form:
              !relocation_type!sequence_number.  */
         if (reloc_found_p)
           {
             /* Only support one relocation op per insn.  */
             as_bad (_("More than one relocation op per insn"));
             goto err_report;
           }

         if (!saw_arg)
           goto err;

         ++input_line_pointer;
         SKIP_WHITESPACE ();
         p = input_line_pointer;
         c = get_symbol_end ();

         /* Parse !relocation_type.  */
         len = input_line_pointer - p;
         if (len == 0)
           {
             as_bad (_("No relocation operand"));
             goto err_report;
           }

         r = &alpha_reloc_op[0];
         for (i = alpha_num_reloc_op - 1; i >= 0; i--, r++)
           if (len == r->length && memcmp (p, r->name, len) == 0)
             break;
         if (i < 0)
           {
             as_bad (_("Unknown relocation operand: !%s"), p);
             goto err_report;
           }

         *input_line_pointer = c;
         SKIP_WHITESPACE ();
         if (*input_line_pointer != '!')
           {
             if (r->require_seq)
              {
                as_bad (_("no sequence number after !%s"), p);
                goto err_report;
              }

             tok->X_add_number = 0;
           }
         else
           {
             if (! r->allow_seq)
              {
                as_bad (_("!%s does not use a sequence number"), p);
                goto err_report;
              }

             input_line_pointer++;

             /* Parse !sequence_number.  */
             expression (tok);
             if (tok->X_op != O_constant || tok->X_add_number <= 0)
              {
                as_bad (_("Bad sequence number: !%s!%s"),
                       r->name, input_line_pointer);
                goto err_report;
              }
           }

         tok->X_op = r->op;
         reloc_found_p = 1;
         ++tok;
         break;
#endif /* RELOC_OP_P */

       case ',':
         ++input_line_pointer;
         if (saw_comma || !saw_arg)
           goto err;
         saw_comma = 1;
         break;

       case '(':
         {
           char *hold = input_line_pointer++;

           /* First try for parenthesized register ...  */
           expression (tok);
           if (*input_line_pointer == ')' && tok->X_op == O_register)
             {
              tok->X_op = (saw_comma ? O_cpregister : O_pregister);
              saw_comma = 0;
              saw_arg = 1;
              ++input_line_pointer;
              ++tok;
              break;
             }

           /* ... then fall through to plain expression.  */
           input_line_pointer = hold;
         }

       default:
         if (saw_arg && !saw_comma)
           goto err;

         expression (tok);
         if (tok->X_op == O_illegal || tok->X_op == O_absent)
           goto err;

         saw_comma = 0;
         saw_arg = 1;
         ++tok;
         break;
       }
    }

fini:
  if (saw_comma)
    goto err;
  input_line_pointer = old_input_line_pointer;

#ifdef DEBUG_ALPHA
  debug_exp (orig_tok, ntok - (end_tok - tok));
#endif
#ifdef RELOC_OP_P
  is_end_of_line[(unsigned char) '!'] = 0;
#endif

  return ntok - (end_tok - tok);

err:
#ifdef RELOC_OP_P
  is_end_of_line[(unsigned char) '!'] = 0;
#endif
  input_line_pointer = old_input_line_pointer;
  return TOKENIZE_ERROR;

#ifdef RELOC_OP_P
err_report:
  is_end_of_line[(unsigned char) '!'] = 0;
#endif
  input_line_pointer = old_input_line_pointer;
  return TOKENIZE_ERROR_REPORT;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* vax_md_atof ( int  ,
char *  ,
int  
)

Here is the caller graph for this function:


Variable Documentation

int alpha_addr32_on = 0 [static]

Definition at line 334 of file tc-alpha.c.

int alpha_auto_align_on = 1 [static]

Definition at line 345 of file tc-alpha.c.

Definition at line 348 of file tc-alpha.c.

int alpha_debug [static]

Definition at line 354 of file tc-alpha.c.

Definition at line 362 of file tc-alpha.c.

Definition at line 351 of file tc-alpha.c.

Definition at line 292 of file tc-alpha.c.

Definition at line 351 of file tc-alpha.c.

symbolS* alpha_insn_label [static]

Definition at line 341 of file tc-alpha.c.

Definition at line 306 of file tc-alpha.c.

symbolS* alpha_lit8_symbol [static]

Definition at line 317 of file tc-alpha.c.

Definition at line 468 of file tc-alpha.c.

struct alpha_macro[] [static]

Definition at line 2791 of file tc-alpha.c.

Definition at line 281 of file tc-alpha.c.

int alpha_macros_on = 1 [static]

Definition at line 328 of file tc-alpha.c.

int alpha_noat_on = 0 [static]

Definition at line 325 of file tc-alpha.c.

int alpha_nofloats_on = 0 [static]

Definition at line 331 of file tc-alpha.c.

const unsigned int alpha_num_macros = sizeof (alpha_macros) / sizeof (*alpha_macros) [static]

Definition at line 2964 of file tc-alpha.c.

Definition at line 278 of file tc-alpha.c.

symbolS* alpha_register_table[64] [static]

Definition at line 295 of file tc-alpha.c.

Definition at line 274 of file tc-alpha.c.

const char* alpha_target_name = "<all>" [static]

Definition at line 275 of file tc-alpha.c.

const char comment_chars[] = "#"

Definition at line 212 of file tc-alpha.c.

const char EXP_CHARS[] = "eE"

Definition at line 223 of file tc-alpha.c.

const char* const extXh_op[] = { NULL, "extwh", "extlh", "extqh" } [static]

Definition at line 521 of file tc-alpha.c.

const char* const extXl_op[] = { "extbl", "extwl", "extll", "extql" } [static]

Definition at line 520 of file tc-alpha.c.

char FLT_CHARS[] = "rRsSfFdDxXpP"

Definition at line 228 of file tc-alpha.c.

int g_switch_value = 8 [static]

Definition at line 365 of file tc-alpha.c.

const char* const insXh_op[] = { NULL, "inswh", "inslh", "insqh" } [static]

Definition at line 519 of file tc-alpha.c.

const char* const insXl_op[] = { "insbl", "inswl", "insll", "insql" } [static]

Definition at line 518 of file tc-alpha.c.

const char* const ldXu_op[] = { "ldbu", "ldwu", NULL, NULL } [static]

Definition at line 525 of file tc-alpha.c.

const char line_comment_chars[] = "#"

Definition at line 215 of file tc-alpha.c.

Definition at line 219 of file tc-alpha.c.

size_t md_longopts_size = sizeof (md_longopts)

Definition at line 251 of file tc-alpha.c.

const pseudo_typeS md_pseudo_table[]

Definition at line 4627 of file tc-alpha.c.

const char* md_shortopts = "Fm:gG:"

Definition at line 233 of file tc-alpha.c.

const char* const mskXh_op[] = { NULL, "mskwh", "msklh", "mskqh" } [static]

Definition at line 523 of file tc-alpha.c.

const char* const mskXl_op[] = { "mskbl", "mskwl", "mskll", "mskql" } [static]

Definition at line 522 of file tc-alpha.c.

long next_sequence_num = -1 [static]

Definition at line 471 of file tc-alpha.c.

const char* const sextX_op[] = { "sextb", "sextw", "sextl", NULL } [static]

Definition at line 517 of file tc-alpha.c.

const char* const stX_op[] = { "stb", "stw", "stl", "stq" } [static]

Definition at line 524 of file tc-alpha.c.