Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Functions | Variables
cgen.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  finished_insnS

Defines

#define GAS_CGEN_MAX_FIXUPS   3
#define MAX_SAVED_FIXUP_CHAINS   50

Functions

const char * gas_cgen_parse_operand (CGEN_CPU_DESC, enum cgen_parse_operand_type, const char **, int, int, enum cgen_parse_operand_result *, bfd_vma *)
void gas_cgen_init_parse (void)
void gas_cgen_save_fixups (int)
void gas_cgen_restore_fixups (int)
void gas_cgen_swap_fixups (int)
void gas_cgen_initialize_saved_fixups_array (void)
void cgen_asm_record_register (char *, int)
void gas_cgen_finish_insn (const CGEN_INSN *, CGEN_INSN_BYTES_PTR, unsigned int, int, finished_insnS *)
fixS * gas_cgen_record_fixup (fragS *, int, const CGEN_INSN *, int, const CGEN_OPERAND *, int, symbolS *, offsetT)
fixS * gas_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *, int, const CGEN_OPERAND *, int, expressionS *)
void gas_cgen_md_apply_fix (fixS *, valueT *, segT)
arelentgas_cgen_tc_gen_reloc (asection *, fixS *)
bfd_reloc_code_real_type md_cgen_lookup_reloc (const CGEN_INSN *, const CGEN_OPERAND *, fixS *)
fixS * md_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *, int, const CGEN_OPERAND *, int, expressionS *)
void gas_cgen_md_operand (expressionS *)
void gas_cgen_begin (void)

Variables

CGEN_CPU_DESC gas_cgen_cpu_desc

Class Documentation

struct finished_insnS

Definition at line 35 of file cgen.h.

Class Members
char * addr
fixS * fixups
fragS * frag
int num_fixups

Define Documentation

#define GAS_CGEN_MAX_FIXUPS   3

Definition at line 31 of file cgen.h.

#define MAX_SAVED_FIXUP_CHAINS   50

Definition at line 62 of file cgen.h.


Function Documentation

void cgen_asm_record_register ( char *  ,
int   
)

Definition at line 61 of file cgen.c.

{
  /* Use symbol_create here instead of symbol_new so we don't try to
     output registers into the object file's symbol table.  */
  symbol_table_insert (symbol_create (name, reg_section,
                                  number, &zero_address_frag));
}

Here is the call graph for this function:

void gas_cgen_begin ( void  )

Definition at line 1057 of file cgen.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void gas_cgen_finish_insn ( const CGEN_INSN *  ,
CGEN_INSN_BYTES_PTR  ,
unsigned  int,
int  ,
finished_insnS  
)
void gas_cgen_init_parse ( void  )

Definition at line 98 of file cgen.c.

{
  num_fixups = 0;
}

Here is the caller graph for this function:

Definition at line 163 of file cgen.c.

{
  int i = 0;

  while (i < MAX_SAVED_FIXUP_CHAINS)
    stored_fixups[i++].num_fixups_in_chain = 0;
}

Here is the caller graph for this function:

void gas_cgen_md_apply_fix ( fixS *  ,
valueT ,
segT   
)
const char* gas_cgen_parse_operand ( CGEN_CPU_DESC  ,
enum  cgen_parse_operand_type,
const char **  ,
int  ,
int  ,
enum cgen_parse_operand_result ,
bfd_vma  
)
fixS* gas_cgen_record_fixup ( fragS *  ,
int  ,
const CGEN_INSN *  ,
int  ,
const CGEN_OPERAND ,
int  ,
symbolS *  ,
offsetT   
)

Definition at line 251 of file cgen.c.

{
  fixS *fixP;

  /* It may seem strange to use operand->attrs and not insn->attrs here,
     but it is the operand that has a pc relative relocation.  */
  fixP = fix_new (frag, where, length / 8, symbol, offset,
                CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
                (bfd_reloc_code_real_type)
                  ((int) BFD_RELOC_UNUSED
                   + (int) operand->type));
  fixP->fx_cgen.insn = insn;
  fixP->fx_cgen.opinfo = opinfo;
  fixP->fx_cgen.field = NULL;
  fixP->fx_cgen.msb_field_p = 0;

  return fixP;
}

Here is the call graph for this function:

Here is the caller graph for this function:

fixS* gas_cgen_record_fixup_exp ( fragS *  ,
int  ,
const CGEN_INSN *  ,
int  ,
const CGEN_OPERAND ,
int  ,
expressionS  
)

Definition at line 292 of file cgen.c.

{
  fixS *fixP;

  /* It may seem strange to use operand->attrs and not insn->attrs here,
     but it is the operand that has a pc relative relocation.  */
  fixP = fix_new_exp (frag, where, length / 8, exp,
                    CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
                    (bfd_reloc_code_real_type)
                      ((int) BFD_RELOC_UNUSED
                      + (int) operand->type));
  fixP->fx_cgen.insn = insn;
  fixP->fx_cgen.opinfo = opinfo;
  fixP->fx_cgen.field = NULL;
  fixP->fx_cgen.msb_field_p = 0;

  return fixP;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 188 of file cgen.c.

{
  if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
    {
      as_fatal ("index into stored_fixups[] out of bounds");
      return;
    }

  num_fixups = stored_fixups[i].num_fixups_in_chain;
  memcpy (fixups, stored_fixups[i].fixup_chain,
         (sizeof (stored_fixups[i].fixup_chain[0])) * num_fixups);
  stored_fixups[i].num_fixups_in_chain = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 172 of file cgen.c.

{
  if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
    {
      as_fatal ("index into stored_fixups[] out of bounds");
      return;
    }

  stored_fixups[i].num_fixups_in_chain = num_fixups;
  memcpy (stored_fixups[i].fixup_chain, fixups,
         sizeof (fixups[0]) * num_fixups);
  num_fixups = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 204 of file cgen.c.

{
  if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
    {
      as_fatal ("index into stored_fixups[] out of bounds");
      return;
    }

  if (num_fixups == 0)
    gas_cgen_restore_fixups (i);

  else if (stored_fixups[i].num_fixups_in_chain == 0)
    gas_cgen_save_fixups (i);

  else
    {
      int tmp;
      struct fixup tmp_fixup;

      tmp = stored_fixups[i].num_fixups_in_chain;
      stored_fixups[i].num_fixups_in_chain = num_fixups;
      num_fixups = tmp;

      for (tmp = GAS_CGEN_MAX_FIXUPS; tmp--;)
       {
         tmp_fixup = stored_fixups[i].fixup_chain [tmp];
         stored_fixups[i].fixup_chain[tmp] = fixups [tmp];
         fixups [tmp] = tmp_fixup;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

arelent* gas_cgen_tc_gen_reloc ( asection ,
fixS *   
)
bfd_reloc_code_real_type md_cgen_lookup_reloc ( const CGEN_INSN *  ,
const CGEN_OPERAND ,
fixS *   
)

Here is the caller graph for this function:

fixS* md_cgen_record_fixup_exp ( fragS *  ,
int  ,
const CGEN_INSN *  ,
int  ,
const CGEN_OPERAND ,
int  ,
expressionS  
)

Variable Documentation

Definition at line 54 of file cgen.c.