Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions
tc-xtensa.h File Reference
#include "xtensa-isa.h"
#include "xtensa-config.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xtensa_frag_type
struct  xtensa_fix_data_struct
struct  xtensa_symfield_type
struct  xtensa_segment_info_struct
struct  resource_table

Defines

#define TARGET_BYTES_BIG_ENDIAN   XCHAL_HAVE_BE
#define MAX_SLOTS   15
#define RELAX_IMMED_MAXSTEPS   (RELAX_IMMED_STEP2 - RELAX_IMMED)
#define TARGET_FORMAT   xtensa_target_format ()
#define TARGET_ARCH   bfd_arch_xtensa
#define TC_SEGMENT_INFO_TYPE   xtensa_segment_info
#define TC_SYMFIELD_TYPE   struct xtensa_symfield_type
#define TC_FIX_TYPE   xtensa_fix_data
#define TC_INIT_FIX_DATA(x)   xtensa_init_fix_data (x)
#define TC_FRAG_TYPE   struct xtensa_frag_type
#define TC_FRAG_INIT(frag)   xtensa_frag_init (frag)
#define TC_FORCE_RELOCATION(fix)   xtensa_force_relocation (fix)
#define TC_FORCE_RELOCATION_SUB_SAME(fix, seg)   (! SEG_NORMAL (seg) || xtensa_force_relocation (fix))
#define TC_VALIDATE_FIX_SUB(fix)   xtensa_validate_fix_sub (fix)
#define NO_PSEUDO_DOT   xtensa_check_inside_bundle ()
#define tc_canonicalize_symbol_name(s)   xtensa_section_rename (s)
#define tc_canonicalize_section_name(s)   xtensa_section_rename (s)
#define tc_init_after_args()   xtensa_file_arch_init (stdoutput)
#define tc_fix_adjustable(fix)   xtensa_fix_adjustable (fix)
#define tc_frob_label(sym)   xtensa_frob_label (sym)
#define tc_unrecognized_line(ch)   xtensa_unrecognized_line (ch)
#define md_do_align(a, b, c, d, e)   xtensa_flush_pending_output ()
#define md_elf_section_change_hook   xtensa_elf_section_change_hook
#define md_end   xtensa_end
#define md_flush_pending_output()   xtensa_flush_pending_output ()
#define md_operand(x)
#define TEXT_SECTION_NAME   xtensa_section_rename (".text")
#define DATA_SECTION_NAME   xtensa_section_rename (".data")
#define BSS_SECTION_NAME   xtensa_section_rename (".bss")
#define HANDLE_ALIGN(fragP)   xtensa_handle_align (fragP)
#define MAX_MEM_FOR_RS_ALIGN_CODE   1
#define md_post_relax_hook
#define md_relax_frag(segment, fragP, stretch)   xtensa_relax_frag (fragP, stretch, &stretched)
#define LOCAL_LABELS_FB   1
#define WORKING_DOT_WORD   1
#define DOUBLESLASH_LINE_COMMENTS
#define TC_HANDLES_FX_DONE
#define TC_FINALIZE_SYMS_BEFORE_SIZE_SEG   0
#define TC_LINKRELAX_FIXUP(SEG)   0
#define MD_APPLY_SYM_VALUE(FIX)   0
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN)   0
#define DWARF2_USE_FIXED_ADVANCE_PC   (linkrelax != 0)

Typedefs

typedef struct
xtensa_fix_data_struct 
xtensa_fix_data
typedef struct xtensa_symfield_type xtensa_symfield_type
typedef struct xtensa_block_info_struct
typedef struct
xtensa_segment_info_struct 
xtensa_segment_info
typedef int(* unit_num_copies_func )(void *, xtensa_funcUnit)
typedef int(* opcode_num_units_func )(void *, xtensa_opcode)
typedef int(* opcode_funcUnit_use_unit_func )(void *, xtensa_opcode, int)
typedef int(* opcode_funcUnit_use_stage_func )(void *, xtensa_opcode, int)

Enumerations

enum  xtensa_relax_statesE {
  RELAX_ALIGN_NEXT_OPCODE, RELAX_CHECK_ALIGN_NEXT_OPCODE, RELAX_DESIRE_ALIGN_IF_TARGET, RELAX_ADD_NOP_IF_A0_B_RETW,
  RELAX_ADD_NOP_IF_PRE_LOOP_END, RELAX_ADD_NOP_IF_SHORT_LOOP, RELAX_ADD_NOP_IF_CLOSE_LOOP_END, RELAX_DESIRE_ALIGN,
  RELAX_MAYBE_DESIRE_ALIGN, RELAX_LOOP_END, RELAX_LOOP_END_ADD_NOP, RELAX_LITERAL,
  RELAX_LITERAL_NR, RELAX_LITERAL_FINAL, RELAX_LITERAL_POOL_BEGIN, RELAX_LITERAL_POOL_END,
  RELAX_NARROW, RELAX_IMMED, RELAX_IMMED_STEP1, RELAX_IMMED_STEP2,
  RELAX_SLOTS, RELAX_FILL_NOP, RELAX_UNREACHABLE, RELAX_MAYBE_UNREACHABLE,
  RELAX_NONE
}
enum  xt_section_type { xt_literal_sec, xt_prop_sec, max_xt_sec }

Functions

const char * xtensa_target_format (void)
void xtensa_init_fix_data (struct fix *)
void xtensa_frag_init (fragS *)
int xtensa_force_relocation (struct fix *)
int xtensa_validate_fix_sub (struct fix *)
void xtensa_frob_label (struct symbol *)
void xtensa_end (void)
void xtensa_post_relax_hook (void)
void xtensa_file_arch_init (bfd *)
void xtensa_flush_pending_output (void)
bfd_boolean xtensa_fix_adjustable (struct fix *)
void xtensa_symbol_new_hook (symbolS *)
long xtensa_relax_frag (fragS *, long, int *)
void xtensa_elf_section_change_hook (void)
int xtensa_unrecognized_line (int)
bfd_boolean xtensa_check_inside_bundle (void)
void xtensa_handle_align (fragS *)
char * xtensa_section_rename (char *)
int opcode_funcUnit_use_unit (void *, xtensa_opcode, int)
int opcode_funcUnit_use_stage (void *, xtensa_opcode, int)
resource_tablenew_resource_table (void *, int, int, unit_num_copies_func, opcode_num_units_func, opcode_funcUnit_use_unit_func, opcode_funcUnit_use_stage_func)
void resize_resource_table (resource_table *, int)
void clear_resource_table (resource_table *)
bfd_boolean resources_available (resource_table *, xtensa_opcode, int)
void reserve_resources (resource_table *, xtensa_opcode, int)
void release_resources (resource_table *, xtensa_opcode, int)

Class Documentation

struct xtensa_frag_type

Definition at line 177 of file tc-xtensa.h.

Collaboration diagram for xtensa_frag_type:
Class Members
unsigned int alignment: 5
unsigned int is_align: 1
unsigned int is_aligning_branch: 1
unsigned int is_assembly_state_set: 1
unsigned int is_branch_target: 1
unsigned int is_first_loop_insn: 1
unsigned int is_insn: 1
unsigned int is_literal: 1
unsigned int is_loop_target: 1
unsigned int is_no_density: 1
unsigned int is_no_transform: 1
unsigned int is_specific_opcode: 1
unsigned int is_text_align: 1
unsigned int is_unreachable: 1
struct frchain * lit_frchain
segT lit_seg
int literal_expansion
fragS * literal_frag
fragS * literal_frags
unsigned int relax_seen: 1
int text_expansion
int unreported_expansion
unsigned int use_absolute_literals: 1
unsigned int use_longcalls: 1
struct xtensa_fix_data_struct

Definition at line 254 of file tc-xtensa.h.

Class Members
int slot
offsetT X_add_number
symbolS * X_add_symbol
struct xtensa_symfield_type

Definition at line 263 of file tc-xtensa.h.

Class Members
unsigned int is_branch_target: 1
unsigned int is_loop_target: 1
struct xtensa_segment_info_struct

Definition at line 285 of file tc-xtensa.h.

Class Members
xtensa_block_info * blocks
fragS * literal_pool_loc
struct resource_table

Definition at line 412 of file tc-xtensa.h.

Class Members
int allocated_cycles
int cycles
void * data
int num_units
opcode_num_units_func opcode_num_units
opcode_funcUnit_use_stage_func opcode_unit_stage
opcode_funcUnit_use_unit_func opcode_unit_use
unit_num_copies_func unit_num_copies
unsigned char ** units

Define Documentation

#define BSS_SECTION_NAME   xtensa_section_rename (".bss")

Definition at line 337 of file tc-xtensa.h.

#define DATA_SECTION_NAME   xtensa_section_rename (".data")

Definition at line 336 of file tc-xtensa.h.

Definition at line 367 of file tc-xtensa.h.

Definition at line 375 of file tc-xtensa.h.

#define HANDLE_ALIGN (   fragP)    xtensa_handle_align (fragP)

Definition at line 338 of file tc-xtensa.h.

#define LOCAL_LABELS_FB   1

Definition at line 365 of file tc-xtensa.h.

#define MAX_MEM_FOR_RS_ALIGN_CODE   1

Definition at line 339 of file tc-xtensa.h.

#define MAX_SLOTS   15

Definition at line 37 of file tc-xtensa.h.

#define MD_APPLY_SYM_VALUE (   FIX)    0

Definition at line 371 of file tc-xtensa.h.

#define md_do_align (   a,
  b,
  c,
  d,
  e 
)    xtensa_flush_pending_output ()

Definition at line 330 of file tc-xtensa.h.

Definition at line 331 of file tc-xtensa.h.

#define md_end   xtensa_end

Definition at line 332 of file tc-xtensa.h.

Definition at line 333 of file tc-xtensa.h.

#define md_operand (   x)

Definition at line 334 of file tc-xtensa.h.

Value:
do \
    { \
      int i = 0; \
      xtensa_post_relax_hook (); \
      bfd_map_over_sections (stdoutput, renumber_sections, &i); \
    } \
  while (0)

Definition at line 346 of file tc-xtensa.h.

#define md_relax_frag (   segment,
  fragP,
  stretch 
)    xtensa_relax_frag (fragP, stretch, &stretched)

Definition at line 361 of file tc-xtensa.h.

Definition at line 323 of file tc-xtensa.h.

Definition at line 175 of file tc-xtensa.h.

#define SUB_SEGMENT_ALIGN (   SEG,
  FRCHAIN 
)    0

Definition at line 372 of file tc-xtensa.h.

Definition at line 312 of file tc-xtensa.h.

Definition at line 33 of file tc-xtensa.h.

Definition at line 311 of file tc-xtensa.h.

Definition at line 325 of file tc-xtensa.h.

Definition at line 324 of file tc-xtensa.h.

Definition at line 369 of file tc-xtensa.h.

Definition at line 327 of file tc-xtensa.h.

Definition at line 315 of file tc-xtensa.h.

Definition at line 319 of file tc-xtensa.h.

Definition at line 320 of file tc-xtensa.h.

#define TC_FRAG_INIT (   frag)    xtensa_frag_init (frag)

Definition at line 318 of file tc-xtensa.h.

Definition at line 317 of file tc-xtensa.h.

#define tc_frob_label (   sym)    xtensa_frob_label (sym)

Definition at line 328 of file tc-xtensa.h.

Definition at line 368 of file tc-xtensa.h.

Definition at line 326 of file tc-xtensa.h.

#define TC_INIT_FIX_DATA (   x)    xtensa_init_fix_data (x)

Definition at line 316 of file tc-xtensa.h.

#define TC_LINKRELAX_FIXUP (   SEG)    0

Definition at line 370 of file tc-xtensa.h.

Definition at line 313 of file tc-xtensa.h.

Definition at line 314 of file tc-xtensa.h.

Definition at line 329 of file tc-xtensa.h.

Definition at line 322 of file tc-xtensa.h.

#define TEXT_SECTION_NAME   xtensa_section_rename (".text")

Definition at line 335 of file tc-xtensa.h.

#define WORKING_DOT_WORD   1

Definition at line 366 of file tc-xtensa.h.


Typedef Documentation

Definition at line 392 of file tc-xtensa.h.

Definition at line 388 of file tc-xtensa.h.

Definition at line 384 of file tc-xtensa.h.

Definition at line 381 of file tc-xtensa.h.

Definition at line 274 of file tc-xtensa.h.


Enumeration Type Documentation

Enumerator:
xt_literal_sec 
xt_prop_sec 
max_xt_sec 

Definition at line 278 of file tc-xtensa.h.

Enumerator:
RELAX_ALIGN_NEXT_OPCODE 
RELAX_CHECK_ALIGN_NEXT_OPCODE 
RELAX_DESIRE_ALIGN_IF_TARGET 
RELAX_ADD_NOP_IF_A0_B_RETW 
RELAX_ADD_NOP_IF_PRE_LOOP_END 
RELAX_ADD_NOP_IF_SHORT_LOOP 
RELAX_ADD_NOP_IF_CLOSE_LOOP_END 
RELAX_DESIRE_ALIGN 
RELAX_MAYBE_DESIRE_ALIGN 
RELAX_LOOP_END 
RELAX_LOOP_END_ADD_NOP 
RELAX_LITERAL 
RELAX_LITERAL_NR 
RELAX_LITERAL_FINAL 
RELAX_LITERAL_POOL_BEGIN 
RELAX_LITERAL_POOL_END 
RELAX_NARROW 
RELAX_IMMED 
RELAX_IMMED_STEP1 
RELAX_IMMED_STEP2 
RELAX_SLOTS 
RELAX_FILL_NOP 
RELAX_UNREACHABLE 
RELAX_MAYBE_UNREACHABLE 
RELAX_NONE 

Definition at line 47 of file tc-xtensa.h.

{
  RELAX_ALIGN_NEXT_OPCODE,
  /* Use the first opcode of the next fragment to determine the
     alignment requirements.  This is ONLY used for LOOPs currently.  */

  RELAX_CHECK_ALIGN_NEXT_OPCODE,
  /* The next non-empty frag contains a loop instruction.  Check to see
     if it is correctly aligned, but do not align it.  */

  RELAX_DESIRE_ALIGN_IF_TARGET,
  /* These are placed in front of labels and converted to either
     RELAX_DESIRE_ALIGN / RELAX_LOOP_END or rs_fill of 0 before
     relaxation begins.  */

  RELAX_ADD_NOP_IF_A0_B_RETW,
  /* These are placed in front of conditional branches.  Before
     relaxation begins, they are turned into either NOPs for branches
     immediately followed by RETW or RETW.N or rs_fills of 0.  This is
     used to avoid a hardware bug in some early versions of the
     processor.  */

  RELAX_ADD_NOP_IF_PRE_LOOP_END,
  /* These are placed after JX instructions.  Before relaxation begins,
     they are turned into either NOPs, if the JX is one instruction
     before a loop end label, or rs_fills of 0.  This is used to avoid a
     hardware interlock issue prior to Xtensa version T1040.  */

  RELAX_ADD_NOP_IF_SHORT_LOOP,
  /* These are placed after LOOP instructions and turned into NOPs when:
     (1) there are less than 3 instructions in the loop; we place 2 of
     these in a row to add up to 2 NOPS in short loops; or (2) the
     instructions in the loop do not include a branch or jump.
     Otherwise they are turned into rs_fills of 0 before relaxation
     begins.  This is used to avoid hardware bug PR3830.  */

  RELAX_ADD_NOP_IF_CLOSE_LOOP_END,
  /* These are placed after LOOP instructions and turned into NOPs if
     there are less than 12 bytes to the end of some other loop's end.
     Otherwise they are turned into rs_fills of 0 before relaxation
     begins.  This is used to avoid hardware bug PR3830.  */

  RELAX_DESIRE_ALIGN,
  /* The next fragment would like its first instruction to NOT cross an
     instruction fetch boundary.  */

  RELAX_MAYBE_DESIRE_ALIGN,
  /* The next fragment might like its first instruction to NOT cross an
     instruction fetch boundary.  These are placed after a branch that
     might be relaxed.  If the branch is relaxed, then this frag will be
     a branch target and this frag will be changed to RELAX_DESIRE_ALIGN
     frag.  */

  RELAX_LOOP_END,
  /* This will be turned into a NOP or NOP.N if the previous instruction
     is expanded to negate a loop.  */

  RELAX_LOOP_END_ADD_NOP,
  /* When the code density option is available, this will generate a
     NOP.N marked RELAX_NARROW.  Otherwise, it will create an rs_fill
     fragment with a NOP in it.  */

  RELAX_LITERAL,
  /* Another fragment could generate an expansion here but has not yet.  */

  RELAX_LITERAL_NR,
  /* Expansion has been generated by an instruction that generates a
     literal.  However, the stretch has NOT been reported yet in this
     fragment.  */

  RELAX_LITERAL_FINAL,
  /* Expansion has been generated by an instruction that generates a
     literal.  */

  RELAX_LITERAL_POOL_BEGIN,
  RELAX_LITERAL_POOL_END,
  /* Technically these are not relaxations at all but mark a location
     to store literals later.  Note that fr_var stores the frchain for
     BEGIN frags and fr_var stores now_seg for END frags.  */

  RELAX_NARROW,
  /* The last instruction in this fragment (at->fr_opcode) can be
     freely replaced with a single wider instruction if a future
     alignment desires or needs it.  */

  RELAX_IMMED,
  /* The last instruction in this fragment (at->fr_opcode) contains
     the value defined by fr_symbol (fr_offset = 0).  If the value
     does not fit, use the specified expansion.  This is similar to
     "NARROW", except that these may not be expanded in order to align
     code.  */

  RELAX_IMMED_STEP1,
  /* The last instruction in this fragment (at->fr_opcode) contains a
     literal.  It has already been expanded at least 1 step.  */

  RELAX_IMMED_STEP2,
  /* The last instruction in this fragment (at->fr_opcode) contains a
     literal.  It has already been expanded at least 2 steps.  */

  RELAX_SLOTS,
  /* There are instructions within the last VLIW instruction that need
     relaxation.  Find the relaxation based on the slot info in
     xtensa_frag_type.  Relaxations that deal with particular opcodes
     are slot-based (e.g., converting a MOVI to an L32R).  Relaxations
     that deal with entire instructions, such as alignment, are not
     slot-based.  */

  RELAX_FILL_NOP,
  /* This marks the location of a pipeline stall.  We can fill these guys
     in for alignment of any size.  */

  RELAX_UNREACHABLE,
  /* This marks the location as unreachable.  The assembler may widen or
     narrow this area to meet alignment requirements of nearby
     instructions.  */

  RELAX_MAYBE_UNREACHABLE,
  /* This marks the location as possibly unreachable.  These are placed
     after a branch that may be relaxed into a branch and jump. If the
     branch is relaxed, then this frag will be converted to a
     RELAX_UNREACHABLE frag.  */

  RELAX_NONE
};

Function Documentation

Definition at line 5756 of file tc-xtensa.c.

{
  int i, j;
  for (i = 0; i < rt->allocated_cycles; i++)
    for (j = 0; j < rt->num_units; j++)
      rt->units[i][j] = 0;
}

Here is the caller graph for this function:

Definition at line 5728 of file tc-xtensa.c.

{
  int i;
  resource_table *rt = (resource_table *) xmalloc (sizeof (resource_table));
  rt->data = data;
  rt->cycles = cycles;
  rt->allocated_cycles = cycles;
  rt->num_units = nu;
  rt->unit_num_copies = uncf;
  rt->opcode_num_units = onuf;
  rt->opcode_unit_use = ouuf;
  rt->opcode_unit_stage = ousf;

  rt->units = (unsigned char **) xcalloc (cycles, sizeof (unsigned char *));
  for (i = 0; i < cycles; i++)
    rt->units[i] = (unsigned char *) xcalloc (nu, sizeof (unsigned char));

  return rt;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 5855 of file tc-xtensa.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int opcode_funcUnit_use_unit ( void *  ,
xtensa_opcode  ,
int   
)

Definition at line 5847 of file tc-xtensa.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 5828 of file tc-xtensa.c.

{
  int i;
  int uses = (rt->opcode_num_units) (rt->data, opcode);

  for (i = 0; i < uses; i++)
    {
      xtensa_funcUnit unit = (rt->opcode_unit_use) (rt->data, opcode, i);
      int stage = (rt->opcode_unit_stage) (rt->data, opcode, i);
      assert (rt->units[stage + cycle][unit] > 0);
      rt->units[stage + cycle][unit]--;
    }
}

Definition at line 5809 of file tc-xtensa.c.

{
  int i;
  int uses = (rt->opcode_num_units) (rt->data, opcode);

  for (i = 0; i < uses; i++)
    {
      xtensa_funcUnit unit = (rt->opcode_unit_use) (rt->data, opcode, i);
      int stage = (rt->opcode_unit_stage) (rt->data, opcode, i);
      /* Note that this allows resources to be oversubscribed.  That's
        essential to the way the optional scheduler works.
        resources_available reports when a resource is over-subscribed,
        so it's easy to tell.  */
      rt->units[stage + cycle][unit]++;
    }
}

Here is the caller graph for this function:

Definition at line 5768 of file tc-xtensa.c.

{
  int i, old_cycles;

  rt->cycles = cycles;
  if (cycles <= rt->allocated_cycles)
    return;

  old_cycles = rt->allocated_cycles;
  rt->allocated_cycles = cycles;

  rt->units = xrealloc (rt->units,
                     rt->allocated_cycles * sizeof (unsigned char *));
  for (i = 0; i < old_cycles; i++)
    rt->units[i] = xrealloc (rt->units[i],
                          rt->num_units * sizeof (unsigned char));
  for (i = old_cycles; i < cycles; i++)
    rt->units[i] = xcalloc (rt->num_units, sizeof (unsigned char));
}

Here is the call graph for this function:

Definition at line 5790 of file tc-xtensa.c.

{
  int i;
  int uses = (rt->opcode_num_units) (rt->data, opcode);

  for (i = 0; i < uses; i++)
    {
      xtensa_funcUnit unit = (rt->opcode_unit_use) (rt->data, opcode, i);
      int stage = (rt->opcode_unit_stage) (rt->data, opcode, i);
      int copies_in_use = rt->units[stage + cycle][unit];
      int copies = (rt->unit_num_copies) (rt->data, unit);
      if (copies_in_use >= copies)
       return FALSE;
    }
  return TRUE;
}

Here is the caller graph for this function:

Definition at line 5453 of file tc-xtensa.c.

{
  if (cur_vinsn.inside_bundle && input_line_pointer[-1] == '.')
    as_bad (_("directives are not valid inside bundles"));

  /* This function must always return FALSE because it is called via a
     macro that has nothing to do with bundling.  */
  return FALSE;
}

Here is the call graph for this function:

Definition at line 5467 of file tc-xtensa.c.

{
  /* Set up the assembly state.  */
  if (!frag_now->tc_frag_data.is_assembly_state_set)
    xtensa_set_frag_assembly_state (frag_now);
}

Here is the call graph for this function:

void xtensa_end ( void  )
void xtensa_file_arch_init ( bfd )

Definition at line 4887 of file tc-xtensa.c.

{
  bfd_set_private_flags (abfd, 0x100 | 0x200);
}

Here is the call graph for this function:

void xtensa_flush_pending_output ( void  )

Definition at line 5094 of file tc-xtensa.c.

{
  if (cur_vinsn.inside_bundle)
    as_bad (_("missing closing brace"));

  /* If there is a non-zero instruction fragment, close it.  */
  if (frag_now_fix () != 0 && frag_now->tc_frag_data.is_insn)
    {
      frag_wane (frag_now);
      frag_new (0);
      xtensa_set_frag_assembly_state (frag_now);
    }
  frag_now->tc_frag_data.is_insn = FALSE;

  xtensa_clear_insn_labels ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void xtensa_frag_init ( fragS *  )

Definition at line 5298 of file tc-xtensa.c.

Here is the call graph for this function:

void xtensa_handle_align ( fragS *  )

Definition at line 5270 of file tc-xtensa.c.

{
  if (linkrelax
      && ! fragP->tc_frag_data.is_literal
      && (fragP->fr_type == rs_align
         || fragP->fr_type == rs_align_code)
      && fragP->fr_address + fragP->fr_fix > 0
      && fragP->fr_offset > 0
      && now_seg != bss_section)
    {
      fragP->tc_frag_data.is_align = TRUE;
      fragP->tc_frag_data.alignment = fragP->fr_offset;
    }

  if (fragP->fr_type == rs_align_test)
    {
      int count;
      count = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix;
      if (count != 0)
       as_bad_where (fragP->fr_file, fragP->fr_line,
                    _("unaligned entry instruction"));
    }
}

Here is the call graph for this function:

void xtensa_post_relax_hook ( void  )
long xtensa_relax_frag ( fragS *  ,
long  ,
int  
)

Definition at line 8187 of file tc-xtensa.c.

{
  xtensa_isa isa = xtensa_default_isa;
  int unreported = fragP->tc_frag_data.unreported_expansion;
  long new_stretch = 0;
  char *file_name;
  unsigned line;
  int lit_size;
  static xtensa_insnbuf vbuf = NULL;
  int slot, num_slots;
  xtensa_format fmt;

  as_where (&file_name, &line);
  new_logical_line (fragP->fr_file, fragP->fr_line);

  fragP->tc_frag_data.unreported_expansion = 0;

  switch (fragP->fr_subtype)
    {
    case RELAX_ALIGN_NEXT_OPCODE:
      /* Always convert.  */
      if (fragP->tc_frag_data.relax_seen)
       new_stretch = relax_frag_loop_align (fragP, stretch);
      break;

    case RELAX_LOOP_END:
      /* Do nothing.  */
      break;

    case RELAX_LOOP_END_ADD_NOP:
      /* Add a NOP and switch to .fill 0.  */
      new_stretch = relax_frag_add_nop (fragP);
      frag_wane (fragP);
      break;

    case RELAX_DESIRE_ALIGN:
      /* Do nothing. The narrowing before this frag will either align
         it or not.  */
      break;

    case RELAX_LITERAL:
    case RELAX_LITERAL_FINAL:
      return 0;

    case RELAX_LITERAL_NR:
      lit_size = 4;
      fragP->fr_subtype = RELAX_LITERAL_FINAL;
      assert (unreported == lit_size);
      memset (&fragP->fr_literal[fragP->fr_fix], 0, 4);
      fragP->fr_var -= lit_size;
      fragP->fr_fix += lit_size;
      new_stretch = 4;
      break;

    case RELAX_SLOTS:
      if (vbuf == NULL)
       vbuf = xtensa_insnbuf_alloc (isa);

      xtensa_insnbuf_from_chars
       (isa, vbuf, (unsigned char *) fragP->fr_opcode, 0);
      fmt = xtensa_format_decode (isa, vbuf);
      num_slots = xtensa_format_num_slots (isa, fmt);

      for (slot = 0; slot < num_slots; slot++)
       {
         switch (fragP->tc_frag_data.slot_subtypes[slot])
           {
           case RELAX_NARROW:
             if (fragP->tc_frag_data.relax_seen)
              new_stretch += relax_frag_for_align (fragP, stretch);
             break;

           case RELAX_IMMED:
           case RELAX_IMMED_STEP1:
           case RELAX_IMMED_STEP2:
             /* Place the immediate.  */
             new_stretch += relax_frag_immed
              (now_seg, fragP, stretch,
               fragP->tc_frag_data.slot_subtypes[slot] - RELAX_IMMED,
               fmt, slot, stretched_p, FALSE);
             break;

           default:
             /* This is OK; see the note in xg_assemble_vliw_tokens.  */
             break;
           }
       }
      break;

    case RELAX_LITERAL_POOL_BEGIN:
    case RELAX_LITERAL_POOL_END:
    case RELAX_MAYBE_UNREACHABLE:
    case RELAX_MAYBE_DESIRE_ALIGN:
      /* No relaxation required.  */
      break;

    case RELAX_FILL_NOP:
    case RELAX_UNREACHABLE:
      if (fragP->tc_frag_data.relax_seen)
       new_stretch += relax_frag_for_align (fragP, stretch);
      break;

    default:
      as_bad (_("bad relaxation state"));
    }

  /* Tell gas we need another relaxation pass.  */
  if (! fragP->tc_frag_data.relax_seen)
    {
      fragP->tc_frag_data.relax_seen = TRUE;
      *stretched_p = 1;
    }

  new_logical_line (file_name, line);
  return new_stretch;
}

Here is the call graph for this function:

char* xtensa_section_rename ( char *  )

Definition at line 11682 of file tc-xtensa.c.

{
  struct rename_section_struct *r = section_rename;

  for (r = section_rename; r != NULL; r = r->next)
    {
      if (strcmp (r->old_name, name) == 0)
       return r->new_name;
    }

  return name;
}

Here is the call graph for this function:

void xtensa_symbol_new_hook ( symbolS *  )
const char* xtensa_target_format ( void  )

Definition at line 4880 of file tc-xtensa.c.

{
  return (target_big_endian ? "elf32-xtensa-be" : "elf32-xtensa-le");
}

Definition at line 5049 of file tc-xtensa.c.

{
  switch (ch)
    {
    case '{' :
      if (cur_vinsn.inside_bundle == 0)
       {
         /* PR8110: Cannot emit line number info inside a FLIX bundle
            when using --gstabs.  Temporarily disable debug info.  */
         generate_lineno_debug ();
         if (debug_type == DEBUG_STABS)
           {
             xt_saved_debug_type = debug_type;
             debug_type = DEBUG_NONE;
           }

         cur_vinsn.inside_bundle = 1;
       }
      else
       {
         as_bad (_("extra opening brace"));
         return 0;
       }
      break;

    case '}' :
      if (cur_vinsn.inside_bundle)
       finish_vinsn (&cur_vinsn);
      else
       {
         as_bad (_("extra closing brace"));
         return 0;
       }
      break;
    default:
      as_bad (_("syntax error"));
      return 0;
    }
  return 1;
}

Here is the call graph for this function: