Back to index

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

Go to the source code of this file.

Defines

#define TC_FR30
#define LISTING_HEADER   "FR30 GAS "
#define TARGET_ARCH   bfd_arch_fr30
#define TARGET_FORMAT   "elf32-fr30"
#define TARGET_BYTES_BIG_ENDIAN   1
#define LOCAL_LABELS_FB   1
#define DIFF_EXPR_OK   /* .-foo gets turned into PC relative relocs. */
#define WORKING_DOT_WORD
#define MD_APPLY_SYM_VALUE(FIX)   0
#define md_apply_fix   gas_cgen_md_apply_fix
#define tc_fix_adjustable(FIX)   fr30_fix_adjustable (FIX)
#define tc_gen_reloc   gas_cgen_tc_gen_reloc
#define MD_PCREL_FROM_SECTION(FIX, SEC)   md_pcrel_from_section (FIX, SEC)
#define TC_GENERIC_RELAX_TABLE   md_relax_table
#define TC_START_LABEL(character, i_l_p)   ((character) != ':' ? 0 : (character = fr30_is_colon_insn (s)) ? 0 : ((character = ':'), 1))

Functions

bfd_boolean fr30_fix_adjustable (struct fix *)
long md_pcrel_from_section (struct fix *, segT)
char fr30_is_colon_insn (char *)

Define Documentation

#define DIFF_EXPR_OK   /* .-foo gets turned into PC relative relocs. */

Definition at line 36 of file tc-fr30.h.

#define LISTING_HEADER   "FR30 GAS "

Definition at line 24 of file tc-fr30.h.

#define LOCAL_LABELS_FB   1

Definition at line 34 of file tc-fr30.h.

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

#define MD_APPLY_SYM_VALUE (   FIX)    0

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

#define MD_PCREL_FROM_SECTION (   FIX,
  SEC 
)    md_pcrel_from_section (FIX, SEC)

Definition at line 53 of file tc-fr30.h.

#define TARGET_ARCH   bfd_arch_fr30

Definition at line 27 of file tc-fr30.h.

#define TARGET_BYTES_BIG_ENDIAN   1

Definition at line 31 of file tc-fr30.h.

#define TARGET_FORMAT   "elf32-fr30"

Definition at line 29 of file tc-fr30.h.

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

#define TC_FR30

Definition at line 22 of file tc-fr30.h.

Definition at line 50 of file tc-fr30.h.

Definition at line 57 of file tc-fr30.h.

#define TC_START_LABEL (   character,
  i_l_p 
)    ((character) != ':' ? 0 : (character = fr30_is_colon_insn (s)) ? 0 : ((character = ':'), 1))

Definition at line 68 of file tc-fr30.h.

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


Function Documentation

char fr30_is_colon_insn ( char *  )

Definition at line 399 of file tc-fr30.c.

{
  char * i_l_p = input_line_pointer;

  /* Check to see if the symbol parsed so far is 'ldi'.  */
  if (   (start[0] != 'l' && start[0] != 'L')
      || (start[1] != 'd' && start[1] != 'D')
      || (start[2] != 'i' && start[2] != 'I')
      || start[3] != 0)
    {
      /* Nope - check to see a 'd' follows the colon.  */
      if (   (i_l_p[1] == 'd' || i_l_p[1] == 'D')
         && (i_l_p[2] == ' ' || i_l_p[2] == '\t' || i_l_p[2] == '\n'))
       {
         /* Yup - it might be delay slot instruction.  */
         int           i;
         static char * delay_insns [] =
         {
           "call", "jmp", "ret", "bra", "bno",
           "beq",  "bne", "bc",  "bnc", "bn",
           "bp",   "bv",  "bnv", "blt", "bge",
           "ble",  "bgt", "bls", "bhi"
         };

         for (i = sizeof (delay_insns) / sizeof (delay_insns[0]); i--;)
           {
             char * insn = delay_insns[i];
             int    len  = strlen (insn);

             if (start [len] != 0)
              continue;

             while (len --)
              if (TOLOWER (start [len]) != insn [len])
                break;

             if (len == -1)
              return restore_colon (1);
           }
       }

      /* Nope - it is a normal label.  */
      return 0;
    }

  /* Check to see if the text following the colon is '8'.  */
  if (i_l_p[1] == '8' && (i_l_p[2] == ' ' || i_l_p[2] == '\t'))
    return restore_colon (2);

  /* Check to see if the text following the colon is '20'.  */
  else if (i_l_p[1] == '2' && i_l_p[2] =='0' && (i_l_p[3] == ' ' || i_l_p[3] == '\t'))
    return restore_colon (3);

  /* Check to see if the text following the colon is '32'.  */
  else if (i_l_p[1] == '3' && i_l_p[2] =='2' && (i_l_p[3] == ' ' || i_l_p[3] == '\t'))
    return restore_colon (3);

  return 0;
}

Here is the call graph for this function: