Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
tc-hppa.h File Reference

Go to the source code of this file.

Defines

#define TC_HPPA   1
#define TARGET_BYTES_BIG_ENDIAN   1
#define TARGET_ARCH   bfd_arch_hppa
#define WORKING_DOT_WORD
#define FALSE   (0)
#define TRUE   (!FALSE)
#define ASEC_NULL   (asection *)0
#define tc_frob_file   pa_check_eof
#define tc_frob_label(sym)   pa_define_label (sym)
#define tc_symbol_chars   hppa_symbol_chars
#define RELOC_EXPANSION_POSSIBLE
#define MAX_RELOC_EXPANSION   6
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES)   parse_cons_expression_hppa (EXP)
#define TC_CONS_FIX_NEW   cons_fix_new_hppa
#define TC_EOL_IN_INSN(PTR)   (*(PTR) == '!' && (PTR)[-1] == ',')
#define tc_fix_adjustable   hppa_fix_adjustable
#define EXTERN_FORCE_RELOC   1
#define TC_FORCE_RELOCATION(FIX)   hppa_force_relocation (FIX)
#define MD_APPLY_SYM_VALUE(FIX)   0
#define md_operand(x)
#define md_optimize_expr   hppa_force_reg_syms_absolute
#define TC_FIX_TYPE   PTR
#define TC_INIT_FIX_DATA(FIX)   ((FIX)->tc_fix_data = NULL)

Functions

void pa_define_label (symbolS *)
void parse_cons_expression_hppa (expressionS *)
void cons_fix_new_hppa (fragS *, int, int, expressionS *)
int hppa_force_relocation (struct fix *)
void pa_check_eof (void)
int hppa_fix_adjustable (struct fix *)
int hppa_force_reg_syms_absolute (expressionS *, operatorT, expressionS *)

Variables

const char hppa_symbol_chars []

Define Documentation

#define ASEC_NULL   (asection *)0

Definition at line 90 of file tc-hppa.h.

#define EXTERN_FORCE_RELOC   1

Definition at line 125 of file tc-hppa.h.

#define FALSE   (0)

Definition at line 86 of file tc-hppa.h.

#define MAX_RELOC_EXPANSION   6

Definition at line 109 of file tc-hppa.h.

#define MD_APPLY_SYM_VALUE (   FIX)    0

Definition at line 133 of file tc-hppa.h.

#define md_operand (   x)

Definition at line 193 of file tc-hppa.h.

Definition at line 197 of file tc-hppa.h.

Definition at line 108 of file tc-hppa.h.

#define TARGET_ARCH   bfd_arch_hppa

Definition at line 44 of file tc-hppa.h.

#define TARGET_BYTES_BIG_ENDIAN   1

Definition at line 42 of file tc-hppa.h.

Definition at line 115 of file tc-hppa.h.

#define TC_EOL_IN_INSN (   PTR)    (*(PTR) == '!' && (PTR)[-1] == ',')

Definition at line 120 of file tc-hppa.h.

Definition at line 123 of file tc-hppa.h.

#define TC_FIX_TYPE   PTR

Definition at line 201 of file tc-hppa.h.

Definition at line 130 of file tc-hppa.h.

#define tc_frob_file   pa_check_eof

Definition at line 101 of file tc-hppa.h.

#define tc_frob_label (   sym)    pa_define_label (sym)

Definition at line 103 of file tc-hppa.h.

#define TC_HPPA   1

Definition at line 39 of file tc-hppa.h.

#define TC_INIT_FIX_DATA (   FIX)    ((FIX)->tc_fix_data = NULL)

Definition at line 202 of file tc-hppa.h.

#define TC_PARSE_CONS_EXPRESSION (   EXP,
  NBYTES 
)    parse_cons_expression_hppa (EXP)

Definition at line 113 of file tc-hppa.h.

Definition at line 106 of file tc-hppa.h.

#define TRUE   (!FALSE)

Definition at line 87 of file tc-hppa.h.

Definition at line 46 of file tc-hppa.h.


Function Documentation

void cons_fix_new_hppa ( fragS *  ,
int  ,
int  ,
expressionS  
)

Definition at line 1249 of file tc-hppa.c.

{
  unsigned int rel_type;

  /* Get a base relocation type.  */
  if (is_DP_relative (*exp))
    rel_type = R_HPPA_GOTOFF;
  else if (is_PC_relative (*exp))
    rel_type = R_HPPA_PCREL_CALL;
#ifdef OBJ_ELF
  else if (is_tls_gdidx (*exp))
    rel_type = R_PARISC_TLS_GD21L;
  else if (is_tls_ldidx (*exp))
    rel_type = R_PARISC_TLS_LDM21L;
  else if (is_tls_dtpoff (*exp))
    rel_type = R_PARISC_TLS_LDO21L;
  else if (is_tls_ieoff (*exp))
    rel_type = R_PARISC_TLS_IE21L;
  else if (is_tls_leoff (*exp))
    rel_type = R_PARISC_TLS_LE21L;
#endif
  else if (is_complex (*exp))
    rel_type = R_HPPA_COMPLEX;
  else
    rel_type = R_HPPA;

  if (hppa_field_selector != e_psel && hppa_field_selector != e_fsel)
    {
      as_warn (_("Invalid field selector.  Assuming F%%."));
      hppa_field_selector = e_fsel;
    }

  fix_new_hppa (frag, where, size,
              (symbolS *) NULL, (offsetT) 0, exp, 0, rel_type,
              hppa_field_selector, size * 8, 0, 0);

  /* Reset field selector to its default state.  */
  hppa_field_selector = 0;
}

Here is the call graph for this function:

Definition at line 8465 of file tc-hppa.c.

{
  struct hppa_fix_struct *hppa_fixp;

  hppa_fixp = (struct hppa_fix_struct *) fixp->tc_fix_data;
#ifdef OBJ_SOM
  if (fixp->fx_r_type == (int) R_HPPA_ENTRY
      || fixp->fx_r_type == (int) R_HPPA_EXIT
      || fixp->fx_r_type == (int) R_HPPA_BEGIN_BRTAB
      || fixp->fx_r_type == (int) R_HPPA_END_BRTAB
      || fixp->fx_r_type == (int) R_HPPA_BEGIN_TRY
      || fixp->fx_r_type == (int) R_HPPA_END_TRY
      || (fixp->fx_addsy != NULL && fixp->fx_subsy != NULL
         && (hppa_fixp->segment->flags & SEC_CODE) != 0))
    return 1;
#endif
#ifdef OBJ_ELF
  if (fixp->fx_r_type == (int) R_PARISC_GNU_VTINHERIT
      || fixp->fx_r_type == (int) R_PARISC_GNU_VTENTRY)
    return 1;
#endif

  assert (fixp->fx_addsy != NULL);

  /* Ensure we emit a relocation for global symbols so that dynamic
     linking works.  */
  if (S_FORCE_RELOC (fixp->fx_addsy, 1))
    return 1;

  /* It is necessary to force PC-relative calls/jumps to have a relocation
     entry if they're going to need either an argument relocation or long
     call stub.  */
  if (fixp->fx_pcrel
      && arg_reloc_stub_needed (symbol_arg_reloc_info (fixp->fx_addsy),
                            hppa_fixp->fx_arg_reloc))
    return 1;

  /* Now check to see if we're going to need a long-branch stub.  */
  if (fixp->fx_r_type == (int) R_HPPA_PCREL_CALL)
    {
      long pc = md_pcrel_from (fixp);
      valueT distance, min_stub_distance;

      distance = fixp->fx_offset + S_GET_VALUE (fixp->fx_addsy) - pc - 8;

      /* Distance to the closest possible stub.  This will detect most
        but not all circumstances where a stub will not work.  */
      min_stub_distance = pc + 16;
#ifdef OBJ_SOM
      if (last_call_info != NULL)
       min_stub_distance -= S_GET_VALUE (last_call_info->start_symbol);
#endif

      if ((distance + 8388608 >= 16777216
          && min_stub_distance <= 8388608)
         || (hppa_fixp->fx_r_format == 17
             && distance + 262144 >= 524288
             && min_stub_distance <= 262144)
         || (hppa_fixp->fx_r_format == 12
             && distance + 8192 >= 16384
             && min_stub_distance <= 8192)
         )
       return 1;
    }

  if (fixp->fx_r_type == (int) R_HPPA_ABS_CALL)
    return 1;

  /* No need (yet) to force another relocations to be emitted.  */
  return 0;
}

Here is the call graph for this function:

void pa_check_eof ( void  )

Definition at line 1089 of file tc-hppa.c.

{
  if (within_entry_exit)
    as_fatal (_("Missing .exit\n"));

  if (within_procedure)
    as_fatal (_("Missing .procend\n"));
}

Here is the call graph for this function:

void pa_define_label ( symbolS *  )

Definition at line 1127 of file tc-hppa.c.

{
  label_symbol_struct *label_chain = pa_get_label ();

  if (label_chain)
    label_chain->lss_label = symbol;
  else
    {
      /* Create a new label entry and add it to the head of the chain.  */
      label_chain = xmalloc (sizeof (label_symbol_struct));
      label_chain->lss_label = symbol;
#ifdef OBJ_SOM
      label_chain->lss_space = current_space;
#endif
#ifdef OBJ_ELF
      label_chain->lss_segment = now_seg;
#endif
      label_chain->lss_next = NULL;

      if (label_symbols_rootp)
       label_chain->lss_next = label_symbols_rootp;

      label_symbols_rootp = label_chain;
    }

#ifdef OBJ_ELF
  dwarf2_emit_label (symbol);
#endif
}

Here is the call graph for this function:

Definition at line 2540 of file tc-hppa.c.

Here is the call graph for this function:


Variable Documentation

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