Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Functions | Variables
xtensa-relax.c File Reference
#include "as.h"
#include "xtensa-isa.h"
#include "xtensa-relax.h"
#include <stddef.h>
#include "xtensa-config.h"

Go to the source code of this file.

Classes

struct  opname_list_struct
struct  opname_map_e_struct
struct  opname_map_struct
struct  precond_e_struct
struct  precond_list_struct
struct  insn_templ_struct
struct  insn_pattern_struct
struct  insn_repl_e_struct
struct  insn_repl_struct
struct  split_rec_struct
struct  string_pattern_pair_struct

Defines

#define XCHAL_HAVE_WIDE_BRANCHES   0
#define WIDEN_COUNT   (sizeof (widen_spec_list) / sizeof (string_pattern_pair))
#define SIMPLIFY_COUNT   (sizeof (simplify_spec_list) / sizeof (string_pattern_pair))

Typedefs

typedef struct opname_list_struct
typedef opname_list opname_e
typedef struct opname_map_e_struct
typedef struct opname_map_struct
typedef struct precond_e_struct
typedef struct precond_list_struct
typedef struct insn_templ_struct
typedef struct insn_pattern_struct
typedef struct insn_repl_e_struct
typedef struct insn_repl_struct
typedef struct split_rec_struct
typedef struct string_pattern_pair_struct

Functions

bfd_boolean xg_has_userdef_op_fn (OpType)
long xg_apply_userdef_op_fn (OpType, long)
static void append_transition (TransitionTable *tt, xtensa_opcode opcode, TransitionRule *t, transition_cmp_fn cmp)
static void append_condition (TransitionRule *tr, Precondition *cond)
static void append_value_condition (TransitionRule *tr, CmpOp cmp, unsigned op1, unsigned op2)
static void append_constant_value_condition (TransitionRule *tr, CmpOp cmp, unsigned op1, unsigned cnst)
static void append_build_insn (TransitionRule *tr, BuildInstr *bi)
static void append_op (BuildInstr *bi, BuildOp *b_op)
static void append_literal_op (BuildInstr *bi, unsigned op1)
static void append_label_op (BuildInstr *bi, unsigned op1)
static void append_constant_op (BuildInstr *bi, unsigned op1, unsigned cnst)
static void append_field_op (BuildInstr *bi, unsigned op1, unsigned src_op)
static void append_user_fn_field_op (BuildInstr *bi, unsigned op1, OpType typ, unsigned src_op)
static long operand_function_HI24S (long a)
static long operand_function_F32MINUS (long a)
static long operand_function_LOW8 (long a)
static long operand_function_LOW16U (long a)
static long operand_function_HI16U (long a)
static const char * enter_opname_n (const char *name, int len)
static const char * enter_opname (const char *name)
static void init_opname_map (opname_map *m)
static void clear_opname_map (opname_map *m)
static bfd_boolean same_operand_name (const opname_map_e *m1, const opname_map_e *m2)
static opname_map_e * get_opmatch (opname_map *map, const char *operand_name)
static bfd_boolean op_is_constant (const opname_map_e *m1)
static unsigned op_get_constant (const opname_map_e *m1)
static void init_precond_list (precond_list *l)
static void clear_precond_list (precond_list *l)
static void init_insn_templ (insn_templ *t)
static void clear_insn_templ (insn_templ *t)
static void init_insn_pattern (insn_pattern *p)
static void clear_insn_pattern (insn_pattern *p)
static void init_insn_repl (insn_repl *r)
static void clear_insn_repl (insn_repl *r)
static int insn_templ_operand_count (const insn_templ *t)
static bfd_boolean parse_constant (const char *in, unsigned *val_p)
static bfd_boolean parse_special_fn (const char *name, const char **fn_name_p, const char **arg_name_p)
static const char * skip_white (const char *p)
static void trim_whitespace (char *in)
static void split_string (split_rec *rec, const char *in, char c, bfd_boolean elide_whitespace)
static void clear_split_rec (split_rec *rec)
static void init_split_rec (split_rec *rec)
static bfd_boolean parse_insn_templ (const char *s, insn_templ *t)
static bfd_boolean parse_precond (const char *s, precond_e *precond)
static void clear_req_or_option_list (ReqOrOption **r_p)
static void clear_req_option_list (ReqOption **r_p)
static ReqOrOption * clone_req_or_option_list (ReqOrOption *req_or_option)
static ReqOption * clone_req_option_list (ReqOption *req_option)
static bfd_boolean parse_option_cond (const char *s, ReqOption *option)
static bfd_boolean parse_insn_pattern (const char *in, insn_pattern *insn)
static bfd_boolean parse_insn_repl (const char *in, insn_repl *r_p)
static bfd_boolean transition_applies (insn_pattern *initial_insn, const char *from_string ATTRIBUTE_UNUSED, const char *to_string ATTRIBUTE_UNUSED)
static bfd_boolean wide_branch_opcode (const char *opcode_name, char *suffix, xtensa_opcode *popcode)
static TransitionRule * build_transition (insn_pattern *initial_insn, insn_repl *replace_insns, const char *from_string, const char *to_string)
static TransitionTable * build_transition_table (const string_pattern_pair *transitions, int transition_count, transition_cmp_fn cmp)
TransitionTable * xg_build_widen_table (transition_cmp_fn cmp)
TransitionTable * xg_build_simplify_table (transition_cmp_fn cmp)

Variables

xtensa_isa xtensa_default_isa
static opname_list * local_opnames = NULL
static string_pattern_pair widen_spec_list []
string_pattern_pair simplify_spec_list []

Class Documentation

struct opname_list_struct

Definition at line 119 of file xtensa-relax.c.

Class Members
opname_list * next
char * opname
struct opname_map_e_struct

Definition at line 134 of file xtensa-relax.c.

Class Members
unsigned constant_value
opname_map_e * next
const char * operand_name
int operand_num
struct opname_map_struct

Definition at line 142 of file xtensa-relax.c.

Class Members
opname_map_e * head
opname_map_e ** tail
struct precond_e_struct

Definition at line 157 of file xtensa-relax.c.

Class Members
CmpOp cmpop
precond_e * next
const char * opname1
const char * opname2
unsigned opval1
unsigned opval2
struct precond_list_struct

Definition at line 167 of file xtensa-relax.c.

Class Members
precond_e * head
precond_e ** tail
struct insn_templ_struct

Definition at line 179 of file xtensa-relax.c.

Class Members
const char * opcode_name
opname_map operand_map
struct insn_pattern_struct

Definition at line 191 of file xtensa-relax.c.

Class Members
ReqOptionList * options
precond_list preconds
insn_templ t
struct insn_repl_e_struct

Definition at line 205 of file xtensa-relax.c.

Class Members
insn_repl_e * next
insn_templ t
struct insn_repl_struct

Definition at line 212 of file xtensa-relax.c.

Class Members
insn_repl_e * head
insn_repl_e ** tail
struct split_rec_struct

Definition at line 222 of file xtensa-relax.c.

Class Members
int count
char ** vec
struct string_pattern_pair_struct

Definition at line 232 of file xtensa-relax.c.

Class Members
const char * pattern
const char * replacement

Define Documentation

#define SIMPLIFY_COUNT   (sizeof (simplify_spec_list) / sizeof (string_pattern_pair))

Definition at line 472 of file xtensa-relax.c.

#define WIDEN_COUNT   (sizeof (widen_spec_list) / sizeof (string_pattern_pair))

Definition at line 439 of file xtensa-relax.c.

#define XCHAL_HAVE_WIDE_BRANCHES   0

Definition at line 105 of file xtensa-relax.c.


Typedef Documentation

Definition at line 190 of file xtensa-relax.c.

Definition at line 204 of file xtensa-relax.c.

Definition at line 211 of file xtensa-relax.c.

Definition at line 178 of file xtensa-relax.c.

typedef opname_list opname_e

Definition at line 117 of file xtensa-relax.c.

Definition at line 116 of file xtensa-relax.c.

Definition at line 131 of file xtensa-relax.c.

Definition at line 132 of file xtensa-relax.c.

Definition at line 154 of file xtensa-relax.c.

Definition at line 155 of file xtensa-relax.c.

Definition at line 221 of file xtensa-relax.c.

Definition at line 231 of file xtensa-relax.c.


Function Documentation

static void append_build_insn ( TransitionRule *  tr,
BuildInstr *  bi 
) [static]

Definition at line 575 of file xtensa-relax.c.

{
  BuildInstr *prev = tr->to_instr;
  BuildInstr *nxt;

  bi->next = NULL;
  if (prev == NULL)
    {
      tr->to_instr = bi;
      return;
    }
  nxt = prev->next;
  while (nxt != 0)
    {
      prev = nxt;
      nxt = prev->next;
    }
  prev->next = bi;
}

Here is the caller graph for this function:

static void append_condition ( TransitionRule *  tr,
Precondition *  cond 
) [static]

Definition at line 518 of file xtensa-relax.c.

{
  PreconditionList *pl =
    (PreconditionList *) xmalloc (sizeof (PreconditionList));
  PreconditionList *prev = tr->conditions;
  PreconditionList *nxt;

  pl->precond = cond;
  pl->next = NULL;
  if (prev == NULL)
    {
      tr->conditions = pl;
      return;
    }
  nxt = prev->next;
  while (nxt != NULL)
    {
      prev = nxt;
      nxt = nxt->next;
    }
  prev->next = pl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_constant_op ( BuildInstr *  bi,
unsigned  op1,
unsigned  cnst 
) [static]

Definition at line 644 of file xtensa-relax.c.

{
  BuildOp *b_op = (BuildOp *) xmalloc (sizeof (BuildOp));

  b_op->op_num = op1;
  b_op->typ = OP_CONSTANT;
  b_op->op_data = cnst;
  b_op->next = NULL;
  append_op (bi, b_op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_constant_value_condition ( TransitionRule *  tr,
CmpOp  cmp,
unsigned  op1,
unsigned  cnst 
) [static]

Definition at line 559 of file xtensa-relax.c.

{
  Precondition *cond = (Precondition *) xmalloc (sizeof (Precondition));

  cond->cmp = cmp;
  cond->op_num = op1;
  cond->typ = OP_CONSTANT;
  cond->op_data = cnst;
  append_condition (tr, cond);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_field_op ( BuildInstr *  bi,
unsigned  op1,
unsigned  src_op 
) [static]

Definition at line 657 of file xtensa-relax.c.

{
  BuildOp *b_op = (BuildOp *) xmalloc (sizeof (BuildOp));

  b_op->op_num = op1;
  b_op->typ = OP_OPERAND;
  b_op->op_data = src_op;
  b_op->next = NULL;
  append_op (bi, b_op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_label_op ( BuildInstr *  bi,
unsigned  op1 
) [static]

Definition at line 631 of file xtensa-relax.c.

{
  BuildOp *b_op = (BuildOp *) xmalloc (sizeof (BuildOp));

  b_op->op_num = op1;
  b_op->typ = OP_LABEL;
  b_op->op_data = 0;
  b_op->next = NULL;
  append_op (bi, b_op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_literal_op ( BuildInstr *  bi,
unsigned  op1 
) [static]

Definition at line 618 of file xtensa-relax.c.

{
  BuildOp *b_op = (BuildOp *) xmalloc (sizeof (BuildOp));

  b_op->op_num = op1;
  b_op->typ = OP_LITERAL;
  b_op->op_data = 0;
  b_op->next = NULL;
  append_op (bi, b_op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_op ( BuildInstr *  bi,
BuildOp *  b_op 
) [static]

Definition at line 597 of file xtensa-relax.c.

{
  BuildOp *prev = bi->ops;
  BuildOp *nxt;

  if (prev == NULL)
    {
      bi->ops = b_op;
      return;
    }
  nxt = prev->next;
  while (nxt != NULL)
    {
      prev = nxt;
      nxt = nxt->next;
    }
  prev->next = b_op;
}

Here is the caller graph for this function:

static void append_transition ( TransitionTable *  tt,
xtensa_opcode  opcode,
TransitionRule *  t,
transition_cmp_fn  cmp 
) [static]

Definition at line 483 of file xtensa-relax.c.

{
  TransitionList *tl = (TransitionList *) xmalloc (sizeof (TransitionList));
  TransitionList *prev;
  TransitionList **t_p;
  assert (tt != NULL);
  assert (opcode < tt->num_opcodes);

  prev = tt->table[opcode];
  tl->rule = t;
  tl->next = NULL;
  if (prev == NULL)
    {
      tt->table[opcode] = tl;
      return;
    }

  for (t_p = &tt->table[opcode]; (*t_p) != NULL; t_p = &(*t_p)->next)
    {
      if (cmp && cmp (t, (*t_p)->rule) < 0)
       {
         /* Insert it here.  */
         tl->next = *t_p;
         *t_p = tl;
         return;
       }
    }
  (*t_p) = tl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_user_fn_field_op ( BuildInstr *  bi,
unsigned  op1,
OpType  typ,
unsigned  src_op 
) [static]

Definition at line 672 of file xtensa-relax.c.

{
  BuildOp *b_op = (BuildOp *) xmalloc (sizeof (BuildOp));

  b_op->op_num = op1;
  b_op->typ = typ;
  b_op->op_data = src_op;
  b_op->next = NULL;
  append_op (bi, b_op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void append_value_condition ( TransitionRule *  tr,
CmpOp  cmp,
unsigned  op1,
unsigned  op2 
) [static]

Definition at line 543 of file xtensa-relax.c.

{
  Precondition *cond = (Precondition *) xmalloc (sizeof (Precondition));

  cond->cmp = cmp;
  cond->op_num = op1;
  cond->typ = OP_OPERAND;
  cond->op_data = op2;
  append_condition (tr, cond);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static TransitionRule* build_transition ( insn_pattern *  initial_insn,
insn_repl *  replace_insns,
const char *  from_string,
const char *  to_string 
) [static]

Definition at line 1559 of file xtensa-relax.c.

{
  TransitionRule *tr = NULL;
  xtensa_opcode opcode;
  xtensa_isa isa = xtensa_default_isa;

  opname_map_e *op1;
  opname_map_e *op2;

  precond_e *precond;
  insn_repl_e *r;

  opcode = xtensa_opcode_lookup (isa, initial_insn->t.opcode_name);
  if (opcode == XTENSA_UNDEFINED)
    {
      /* It is OK to not be able to translate some of these opcodes.  */
      return NULL;
    }


  if (xtensa_opcode_num_operands (isa, opcode)
      != insn_templ_operand_count (&initial_insn->t))
    {
      /* This is also OK because there are opcodes that
        have different numbers of operands on different
        architecture variations.  */
      return NULL;
    }

  tr = (TransitionRule *) xmalloc (sizeof (TransitionRule));
  tr->opcode = opcode;
  tr->conditions = NULL;
  tr->to_instr = NULL;

  /* Build the conditions. First, equivalent operand condition....  */
  for (op1 = initial_insn->t.operand_map.head; op1 != NULL; op1 = op1->next)
    {
      for (op2 = op1->next; op2 != NULL; op2 = op2->next)
       {
         if (same_operand_name (op1, op2))
           {
             append_value_condition (tr, OP_EQUAL,
                                  op1->operand_num, op2->operand_num);
           }
       }
    }

  /* Now the condition that an operand value must be a constant....  */
  for (op1 = initial_insn->t.operand_map.head; op1 != NULL; op1 = op1->next)
    {
      if (op_is_constant (op1))
       {
         append_constant_value_condition (tr,
                                      OP_EQUAL,
                                      op1->operand_num,
                                      op_get_constant (op1));
       }
    }


  /* Now add the explicit preconditions listed after the "|" in the spec.
     These are currently very limited, so we do a special case
     parse for them.  We expect spaces, opname != opname.  */
  for (precond = initial_insn->preconds.head;
       precond != NULL;
       precond = precond->next)
    {
      op1 = NULL;
      op2 = NULL;

      if (precond->opname1)
       {
         op1 = get_opmatch (&initial_insn->t.operand_map, precond->opname1);
         if (op1 == NULL)
           as_fatal (_("opcode '%s': no bound opname '%s' "
                     "for precondition in '%s'"),
                    xtensa_opcode_name (isa, opcode),
                    precond->opname1, from_string);
       }

      if (precond->opname2)
       {
         op2 = get_opmatch (&initial_insn->t.operand_map, precond->opname2);
         if (op2 == NULL)
           as_fatal (_("opcode '%s': no bound opname '%s' "
                     "for precondition in %s"),
                    xtensa_opcode_name (isa, opcode),
                    precond->opname2, from_string);
       }

      if (op1 == NULL && op2 == NULL)
       as_fatal (_("opcode '%s': precondition only contains "
                  "constants in '%s'"),
                xtensa_opcode_name (isa, opcode), from_string);
      else if (op1 != NULL && op2 != NULL)
       append_value_condition (tr, precond->cmpop,
                            op1->operand_num, op2->operand_num);
      else if (op2 == NULL)
       append_constant_value_condition (tr, precond->cmpop,
                                    op1->operand_num, precond->opval2);
      else
       append_constant_value_condition (tr, precond->cmpop,
                                    op2->operand_num, precond->opval1);
    }

  tr->options = clone_req_option_list (initial_insn->options);

  /* Generate the replacement instructions.  Some of these
     "instructions" are actually labels and literals.  There can be at
     most one literal and at most one label.  A literal must be defined
     (e.g., "LITERAL %imm") before use (e.g., "%LITERAL").  The labels
     can be used before they are defined.  Also there are a number of
     special operands (e.g., HI24S).  */

  for (r = replace_insns->head; r != NULL; r = r->next)
    {
      BuildInstr *bi;
      const char *opcode_name;
      int operand_count;
      opname_map_e *op;
      const char *fn_name;
      const char *operand_arg_name;

      bi = (BuildInstr *) xmalloc (sizeof (BuildInstr));
      append_build_insn (tr, bi);

      bi->opcode = XTENSA_UNDEFINED;
      bi->ops = NULL;
      bi->next = NULL;

      opcode_name = r->t.opcode_name;
      operand_count = insn_templ_operand_count (&r->t);

      if (strcmp (opcode_name, "LITERAL") == 0)
       {
         bi->typ = INSTR_LITERAL_DEF;
         if (operand_count != 1)
           as_fatal (_("expected one operand for generated literal"));
       }
      else if (strcmp (opcode_name, "LABEL") == 0)
       {
         bi->typ = INSTR_LABEL_DEF;
         if (operand_count != 0)
           as_fatal (_("expected 0 operands for generated label"));
       }
      else
       {
         bi->typ = INSTR_INSTR;
         if (wide_branch_opcode (opcode_name, ".w18", &bi->opcode)
             || wide_branch_opcode (opcode_name, ".w15", &bi->opcode))
           opcode_name = xtensa_opcode_name (isa, bi->opcode);
         else
           bi->opcode = xtensa_opcode_lookup (isa, opcode_name);

         if (bi->opcode == XTENSA_UNDEFINED)
           {
             as_warn (_("invalid opcode '%s' in transition rule '%s'"),
                     opcode_name, to_string);
             return NULL;
           }

         /* Check for the right number of ops.  */
         if (xtensa_opcode_num_operands (isa, bi->opcode)
             != (int) operand_count)
           as_fatal (_("opcode '%s': replacement does not have %d ops"),
                    opcode_name,
                    xtensa_opcode_num_operands (isa, bi->opcode));
       }

      for (op = r->t.operand_map.head; op != NULL; op = op->next)
       {
         unsigned idnum;

         if (op_is_constant (op))
           append_constant_op (bi, op->operand_num, op_get_constant (op));
         else if (strcmp (op->operand_name, "%LITERAL") == 0)
           append_literal_op (bi, op->operand_num);
         else if (strcmp (op->operand_name, "%LABEL") == 0)
           append_label_op (bi, op->operand_num);
         else if (op->operand_name[0] == 'a'
                 && parse_constant (op->operand_name + 1, &idnum))
           append_constant_op (bi, op->operand_num, idnum);
         else if (op->operand_name[0] == '%')
           {
             opname_map_e *orig_op;
             orig_op = get_opmatch (&initial_insn->t.operand_map,
                                 op->operand_name);
             if (orig_op == NULL)
              as_fatal (_("opcode %s: unidentified operand '%s' in '%s'"),
                       opcode_name, op->operand_name, to_string);
             append_field_op (bi, op->operand_num, orig_op->operand_num);
           }
         else if (parse_special_fn (op->operand_name,
                                 &fn_name, &operand_arg_name))
           {
             opname_map_e *orig_op;
             OpType typ = OP_CONSTANT;

             if (strcmp (fn_name, "LOW8") == 0)
              typ = OP_OPERAND_LOW8;
             else if (strcmp (fn_name, "HI24S") == 0)
              typ = OP_OPERAND_HI24S;
             else if (strcmp (fn_name, "F32MINUS") == 0)
              typ = OP_OPERAND_F32MINUS;
             else if (strcmp (fn_name, "LOW16U") == 0)
              typ = OP_OPERAND_LOW16U;
             else if (strcmp (fn_name, "HI16U") == 0)
              typ = OP_OPERAND_HI16U;
             else
              as_fatal (_("unknown user-defined function %s"), fn_name);

             orig_op = get_opmatch (&initial_insn->t.operand_map,
                                 operand_arg_name);
             if (orig_op == NULL)
              as_fatal (_("opcode %s: unidentified operand '%s' in '%s'"),
                       opcode_name, op->operand_name, to_string);
             append_user_fn_field_op (bi, op->operand_num,
                                   typ, orig_op->operand_num);
           }
         else
           as_fatal (_("opcode %s: could not parse operand '%s' in '%s'"),
                    opcode_name, op->operand_name, to_string);
       }
    }

  return tr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static TransitionTable* build_transition_table ( const string_pattern_pair *  transitions,
int  transition_count,
transition_cmp_fn  cmp 
) [static]

Definition at line 1792 of file xtensa-relax.c.

{
  TransitionTable *table = NULL;
  int num_opcodes = xtensa_isa_num_opcodes (xtensa_default_isa);
  int i, tnum;

  if (table != NULL)
    return table;

  /* Otherwise, build it now.  */
  table = (TransitionTable *) xmalloc (sizeof (TransitionTable));
  table->num_opcodes = num_opcodes;
  table->table =
    (TransitionList **) xmalloc (sizeof (TransitionTable *) * num_opcodes);

  for (i = 0; i < num_opcodes; i++)
    table->table[i] = NULL;

  for (tnum = 0; tnum < transition_count; tnum++)
    {
      const char *from_string = transitions[tnum].pattern;
      const char *to_string = transitions[tnum].replacement;

      insn_pattern initial_insn;
      insn_repl replace_insns;
      TransitionRule *tr;

      init_insn_pattern (&initial_insn);
      if (!parse_insn_pattern (from_string, &initial_insn))
       as_fatal (_("could not parse INSN_PATTERN '%s'"), from_string);

      init_insn_repl (&replace_insns);
      if (!parse_insn_repl (to_string, &replace_insns))
       as_fatal (_("could not parse INSN_REPL '%s'"), to_string);

      if (transition_applies (&initial_insn, from_string, to_string))
       {
         tr = build_transition (&initial_insn, &replace_insns,
                             from_string, to_string);
         if (tr)
           append_transition (table, tr->opcode, tr, cmp);
         else
           {
#if TENSILICA_DEBUG
             as_warn (_("could not build transition for %s => %s"),
                     from_string, to_string);
#endif
           }
       }

      clear_insn_repl (&replace_insns);
      clear_insn_pattern (&initial_insn);
    }
  return table;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_insn_pattern ( insn_pattern *  p) [static]

Definition at line 918 of file xtensa-relax.c.

{
  clear_insn_templ (&p->t);
  clear_precond_list (&p->preconds);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_insn_repl ( insn_repl *  r) [static]

Definition at line 934 of file xtensa-relax.c.

{
  insn_repl_e *e;

  while (r->head != NULL)
    {
      e = r->head;
      r->head = e->next;
      clear_insn_templ (&e->t);
    }
  r->tail = &r->head;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_insn_templ ( insn_templ *  t) [static]

Definition at line 902 of file xtensa-relax.c.

{
  clear_opname_map (&t->operand_map);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_opname_map ( opname_map *  m) [static]

Definition at line 818 of file xtensa-relax.c.

{
  opname_map_e *e;

  while (m->head != NULL)
    {
      e = m->head;
      m->head = e->next;
      free (e);
    }
  m->tail = &m->head;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_precond_list ( precond_list *  l) [static]

Definition at line 879 of file xtensa-relax.c.

{
  precond_e *e;

  while (l->head != NULL)
    {
      e = l->head;
      l->head = e->next;
      free (e);
    }
  l->tail = &l->head;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_req_option_list ( ReqOption **  r_p) [static]

Definition at line 1258 of file xtensa-relax.c.

{
  if (*r_p == NULL)
    return;

  clear_req_or_option_list (&(*r_p)->or_option_terms);
  clear_req_option_list (&(*r_p)->next);
  *r_p = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_req_or_option_list ( ReqOrOption **  r_p) [static]

Definition at line 1246 of file xtensa-relax.c.

{
  if (*r_p == NULL)
    return;

  free ((*r_p)->option_name);
  clear_req_or_option_list (&(*r_p)->next);
  *r_p = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_split_rec ( split_rec *  rec) [static]

Definition at line 1106 of file xtensa-relax.c.

{
  int i;

  for (i = 0; i < rec->count; i++)
    free (rec->vec[i]);

  if (rec->count > 0)
    free (rec->vec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static ReqOption* clone_req_option_list ( ReqOption *  req_option) [static]

Definition at line 1287 of file xtensa-relax.c.

{
  ReqOption *new_req_option;

  if (req_option == NULL)
    return NULL;

  new_req_option = (ReqOption *) xmalloc (sizeof (ReqOption));
  new_req_option->or_option_terms = NULL;
  new_req_option->next = NULL;
  new_req_option->or_option_terms =
    clone_req_or_option_list (req_option->or_option_terms);
  new_req_option->next = clone_req_option_list (req_option->next);
  return new_req_option;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static ReqOrOption* clone_req_or_option_list ( ReqOrOption *  req_or_option) [static]

Definition at line 1270 of file xtensa-relax.c.

{
  ReqOrOption *new_req_or_option;

  if (req_or_option == NULL)
    return NULL;

  new_req_or_option = (ReqOrOption *) xmalloc (sizeof (ReqOrOption));
  new_req_or_option->option_name = xstrdup (req_or_option->option_name);
  new_req_or_option->is_true = req_or_option->is_true;
  new_req_or_option->next = NULL;
  new_req_or_option->next = clone_req_or_option_list (req_or_option->next);
  return new_req_or_option;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static const char* enter_opname ( const char *  name) [static]

Definition at line 794 of file xtensa-relax.c.

{
  opname_e *op;

  for (op = local_opnames; op != NULL; op = op->next)
    {
      if (strcmp (op->opname, name) == 0)
       return op->opname;
    }
  op = (opname_e *) xmalloc (sizeof (opname_e));
  op->opname = xstrdup (name);
  return op->opname;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static const char* enter_opname_n ( const char *  name,
int  len 
) [static]

Definition at line 775 of file xtensa-relax.c.

{
  opname_e *op;

  for (op = local_opnames; op != NULL; op = op->next)
    {
      if (strlen (op->opname) == (unsigned) len
         && strncmp (op->opname, name, len) == 0)
       return op->opname;
    }
  op = (opname_e *) xmalloc (sizeof (opname_e));
  op->opname = (char *) xmalloc (len + 1);
  strncpy (op->opname, name, len);
  op->opname[len] = '\0';
  return op->opname;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static opname_map_e* get_opmatch ( opname_map *  map,
const char *  operand_name 
) [static]

Definition at line 842 of file xtensa-relax.c.

{
  opname_map_e *m;

  for (m = map->head; m != NULL; m = m->next)
    {
      if (strcmp (m->operand_name, operand_name) == 0)
       return m;
    }
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void init_insn_pattern ( insn_pattern *  p) [static]

Definition at line 909 of file xtensa-relax.c.

{
  init_insn_templ (&p->t);
  init_precond_list (&p->preconds);
  p->options = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void init_insn_repl ( insn_repl *  r) [static]

Definition at line 926 of file xtensa-relax.c.

{
  r->head = NULL;
  r->tail = &r->head;
}

Here is the caller graph for this function:

static void init_insn_templ ( insn_templ *  t) [static]

Definition at line 894 of file xtensa-relax.c.

{
  t->opcode_name = NULL;
  init_opname_map (&t->operand_map);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void init_opname_map ( opname_map *  m) [static]

Definition at line 810 of file xtensa-relax.c.

{
  m->head = NULL;
  m->tail = &m->head;
}

Here is the caller graph for this function:

static void init_precond_list ( precond_list *  l) [static]

Definition at line 871 of file xtensa-relax.c.

{
  l->head = NULL;
  l->tail = &l->head;
}

Here is the caller graph for this function:

static void init_split_rec ( split_rec *  rec) [static]

Definition at line 1122 of file xtensa-relax.c.

{
  rec->vec = NULL;
  rec->count = 0;
}

Here is the caller graph for this function:

static int insn_templ_operand_count ( const insn_templ *  t) [static]

Definition at line 949 of file xtensa-relax.c.

{
  int i = 0;
  const opname_map_e *op;

  for (op = t->operand_map.head; op != NULL; op = op->next, i++)
    ;
  return i;
}

Here is the caller graph for this function:

static unsigned op_get_constant ( const opname_map_e *  m1) [static]

Definition at line 863 of file xtensa-relax.c.

{
  assert (m1->operand_name == NULL);
  return m1->constant_value;
}

Here is the caller graph for this function:

static bfd_boolean op_is_constant ( const opname_map_e *  m1) [static]

Definition at line 856 of file xtensa-relax.c.

{
  return (m1->operand_name == NULL);
}

Here is the caller graph for this function:

static long operand_function_F32MINUS ( long  a) [static]

Definition at line 701 of file xtensa-relax.c.

{
  return (32 - a);
}

Here is the caller graph for this function:

static long operand_function_HI16U ( long  a) [static]

Definition at line 725 of file xtensa-relax.c.

{
  unsigned long b = a & 0xffff0000;
  return (long) (b >> 16);
}

Here is the caller graph for this function:

static long operand_function_HI24S ( long  a) [static]

Definition at line 691 of file xtensa-relax.c.

{
  if (a & 0x80)
    return (a & (~0xff)) + 0x100;
  else
    return (a & (~0xff));
}

Here is the caller graph for this function:

static long operand_function_LOW16U ( long  a) [static]

Definition at line 718 of file xtensa-relax.c.

{
  return (a & 0xffff);
}

Here is the caller graph for this function:

static long operand_function_LOW8 ( long  a) [static]

Definition at line 708 of file xtensa-relax.c.

{
  if (a & 0x80)
    return (a & 0xff) | ~0xff;
  else
    return (a & 0xff);
}

Here is the caller graph for this function:

static bfd_boolean parse_constant ( const char *  in,
unsigned val_p 
) [static]

Definition at line 963 of file xtensa-relax.c.

{
  unsigned val = 0;
  const char *p;

  if (in == NULL)
    return FALSE;
  p = in;

  while (*p != '\0')
    {
      if (*p >= '0' && *p <= '9')
       val = val * 10 + (*p - '0');
      else
       return FALSE;
      ++p;
    }
  *val_p = val;
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean parse_insn_pattern ( const char *  in,
insn_pattern *  insn 
) [static]

Definition at line 1370 of file xtensa-relax.c.

{
  split_rec rec;
  split_rec optionrec;
  int i;

  init_insn_pattern (insn);

  init_split_rec (&optionrec);
  split_string (&optionrec, in, '?', TRUE);
  if (optionrec.count == 0)
    {
      clear_split_rec (&optionrec);
      return FALSE;
    }

  init_split_rec (&rec);

  split_string (&rec, optionrec.vec[0], '|', TRUE);

  if (rec.count == 0)
    {
      clear_split_rec (&rec);
      clear_split_rec (&optionrec);
      return FALSE;
    }

  if (!parse_insn_templ (rec.vec[0], &insn->t))
    {
      clear_split_rec (&rec);
      clear_split_rec (&optionrec);
      return FALSE;
    }

  for (i = 1; i < rec.count; i++)
    {
      precond_e *cond = (precond_e *) xmalloc (sizeof (precond_e));

      if (!parse_precond (rec.vec[i], cond))
       {
         clear_split_rec (&rec);
         clear_split_rec (&optionrec);
         clear_insn_pattern (insn);
         return FALSE;
       }

      /* Append the condition.  */
      *insn->preconds.tail = cond;
      insn->preconds.tail = &cond->next;
    }

  for (i = 1; i < optionrec.count; i++)
    {
      /* Handle the option conditions.  */
      ReqOption **r_p;
      ReqOption *req_option = (ReqOption *) xmalloc (sizeof (ReqOption));
      req_option->or_option_terms = NULL;
      req_option->next = NULL;

      if (!parse_option_cond (optionrec.vec[i], req_option))
       {
         clear_split_rec (&rec);
         clear_split_rec (&optionrec);
         clear_insn_pattern (insn);
         clear_req_option_list (&req_option);
         return FALSE;
       }

      /* Append the condition.  */
      for (r_p = &insn->options; (*r_p) != NULL; r_p = &(*r_p)->next)
       ;

      (*r_p) = req_option;
    }

  clear_split_rec (&rec);
  clear_split_rec (&optionrec);
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean parse_insn_repl ( const char *  in,
insn_repl *  r_p 
) [static]

Definition at line 1452 of file xtensa-relax.c.

{
  /* This is a list of instruction templates separated by ';'.  */
  split_rec rec;
  int i;

  split_string (&rec, in, ';', TRUE);

  for (i = 0; i < rec.count; i++)
    {
      insn_repl_e *e = (insn_repl_e *) xmalloc (sizeof (insn_repl_e));

      e->next = NULL;

      if (!parse_insn_templ (rec.vec[i], &e->t))
       {
         free (e);
         clear_insn_repl (r_p);
         return FALSE;
       }
      *r_p->tail = e;
      r_p->tail = &e->next;
    }
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean parse_insn_templ ( const char *  s,
insn_templ *  t 
) [static]

Definition at line 1132 of file xtensa-relax.c.

{
  const char *p = s;
  int insn_name_len;
  split_rec oprec;
  int i;

  /* First find the first whitespace.  */

  init_split_rec (&oprec);

  p = skip_white (p);
  insn_name_len = strcspn (s, " ");
  if (insn_name_len == 0)
    return FALSE;

  init_insn_templ (t);
  t->opcode_name = enter_opname_n (p, insn_name_len);

  p = p + insn_name_len;

  /* Split by ',' and skip beginning and trailing whitespace.  */
  split_string (&oprec, p, ',', TRUE);

  for (i = 0; i < oprec.count; i++)
    {
      const char *opname = oprec.vec[i];
      opname_map_e *e = (opname_map_e *) xmalloc (sizeof (opname_map_e));
      e->next = NULL;
      e->operand_name = NULL;
      e->constant_value = 0;
      e->operand_num = i;

      /* If it begins with a number, assume that it is a number.  */
      if (opname && opname[0] >= '0' && opname[0] <= '9')
       {
         unsigned val;

         if (parse_constant (opname, &val))
           e->constant_value = val;
         else
           {
             free (e);
             clear_split_rec (&oprec);
             clear_insn_templ (t);
             return FALSE;
           }
       }
      else
       e->operand_name = enter_opname (oprec.vec[i]);

      *t->operand_map.tail = e;
      t->operand_map.tail = &e->next;
    }
  clear_split_rec (&oprec);
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean parse_option_cond ( const char *  s,
ReqOption *  option 
) [static]

Definition at line 1305 of file xtensa-relax.c.

{
  int i;
  split_rec option_term_rec;

  /* All option or conditions are of the form:
     optionA + no-optionB + ...
     "Ands" are divided by "?".  */

  init_split_rec (&option_term_rec);
  split_string (&option_term_rec, s, '+', TRUE);

  if (option_term_rec.count == 0)
    {
      clear_split_rec (&option_term_rec);
      return FALSE;
    }

  for (i = 0; i < option_term_rec.count; i++)
    {
      char *option_name = option_term_rec.vec[i];
      bfd_boolean is_true = TRUE;
      ReqOrOption *req;
      ReqOrOption **r_p;

      if (strncmp (option_name, "no-", 3) == 0)
       {
         option_name = xstrdup (&option_name[3]);
         is_true = FALSE;
       }
      else
       option_name = xstrdup (option_name);

      req = (ReqOrOption *) xmalloc (sizeof (ReqOrOption));
      req->option_name = option_name;
      req->is_true = is_true;
      req->next = NULL;

      /* Append to list.  */
      for (r_p = &option->or_option_terms; (*r_p) != NULL;
          r_p = &(*r_p)->next)
       ;
      (*r_p) = req;
    }
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean parse_precond ( const char *  s,
precond_e *  precond 
) [static]

Definition at line 1192 of file xtensa-relax.c.

{
  /* All preconditions are currently of the form:
     a == b or a != b or a == k (where k is a constant).
     Later we may use some special functions like DENSITY == 1
     to identify when density is available.  */

  const char *p = s;
  int len;
  precond->opname1 = NULL;
  precond->opval1 = 0;
  precond->cmpop = OP_EQUAL;
  precond->opname2 = NULL;
  precond->opval2 = 0;
  precond->next = NULL;

  p = skip_white (p);

  len = strcspn (p, " !=");

  if (len == 0)
    return FALSE;

  precond->opname1 = enter_opname_n (p, len);
  p = p + len;
  p = skip_white (p);

  /* Check for "==" and "!=".  */
  if (strncmp (p, "==", 2) == 0)
    precond->cmpop = OP_EQUAL;
  else if (strncmp (p, "!=", 2) == 0)
    precond->cmpop = OP_NOTEQUAL;
  else
    return FALSE;

  p = p + 2;
  p = skip_white (p);

  /* No trailing whitespace from earlier parsing.  */
  if (p[0] >= '0' && p[0] <= '9')
    {
      unsigned val;
      if (parse_constant (p, &val))
       precond->opval2 = val;
      else
       return FALSE;
    }
  else
    precond->opname2 = enter_opname (p);
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean parse_special_fn ( const char *  name,
const char **  fn_name_p,
const char **  arg_name_p 
) [static]

Definition at line 986 of file xtensa-relax.c.

{
  char *p_start;
  const char *p_end;

  p_start = strchr (name, '(');
  if (p_start == NULL)
    return FALSE;

  p_end = strchr (p_start, ')');

  if (p_end == NULL)
    return FALSE;

  if (p_end[1] != '\0')
    return FALSE;

  *fn_name_p = enter_opname_n (name, p_start - name);
  *arg_name_p = enter_opname_n (p_start + 1, p_end - p_start - 1);
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean same_operand_name ( const opname_map_e *  m1,
const opname_map_e *  m2 
) [static]

Definition at line 833 of file xtensa-relax.c.

{
  if (m1->operand_name == NULL || m1->operand_name == NULL)
    return FALSE;
  return (m1->operand_name == m2->operand_name);
}

Here is the caller graph for this function:

static const char* skip_white ( const char *  p) [static]

Definition at line 1012 of file xtensa-relax.c.

{
  if (p == NULL)
    return p;
  while (*p == ' ')
    ++p;
  return p;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void split_string ( split_rec *  rec,
const char *  in,
char  c,
bfd_boolean  elide_whitespace 
) [static]

Definition at line 1051 of file xtensa-relax.c.

{
  int cnt = 0;
  int i;
  const char *p = in;

  while (p != NULL && *p != '\0')
    {
      cnt++;
      p = strchr (p, c);
      if (p)
       p++;
    }
  rec->count = cnt;
  rec->vec = NULL;

  if (rec->count == 0)
    return;

  rec->vec = (char **) xmalloc (sizeof (char *) * cnt);
  for (i = 0; i < cnt; i++)
    rec->vec[i] = 0;

  p = in;
  for (i = 0; i < cnt; i++)
    {
      const char *q;
      int len;

      q = p;
      if (elide_whitespace)
       q = skip_white (q);

      p = strchr (q, c);
      if (p == NULL)
       rec->vec[i] = xstrdup (q);
      else
       {
         len = p - q;
         rec->vec[i] = (char *) xmalloc (sizeof (char) * (len + 1));
         strncpy (rec->vec[i], q, len);
         rec->vec[i][len] = '\0';
         p++;
       }

      if (elide_whitespace)
       trim_whitespace (rec->vec[i]);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean transition_applies ( insn_pattern *  initial_insn,
const char *from_string  ATTRIBUTE_UNUSED,
const char *to_string  ATTRIBUTE_UNUSED 
) [static]

Definition at line 1480 of file xtensa-relax.c.

{
  ReqOption *req_option;

  for (req_option = initial_insn->options;
       req_option != NULL;
       req_option = req_option->next)
    {
      ReqOrOption *req_or_option = req_option->or_option_terms;

      if (req_or_option == NULL
         || req_or_option->next != NULL)
       continue;

      if (strncmp (req_or_option->option_name, "IsaUse", 6) == 0)
       {
         bfd_boolean option_available = FALSE;
         char *option_name = req_or_option->option_name + 6;
         if (!strcmp (option_name, "DensityInstruction"))
           option_available = (XCHAL_HAVE_DENSITY == 1);
         else if (!strcmp (option_name, "L32R"))
           option_available = (XCHAL_HAVE_L32R == 1);
         else if (!strcmp (option_name, "Const16"))
           option_available = (XCHAL_HAVE_CONST16 == 1);
         else if (!strcmp (option_name, "Loops"))
           option_available = (XCHAL_HAVE_LOOPS == 1);
         else if (!strcmp (option_name, "WideBranches"))
           option_available = (XCHAL_HAVE_WIDE_BRANCHES == 1);
         else if (!strcmp (option_name, "PredictedBranches"))
           option_available = (XCHAL_HAVE_PREDICTED_BRANCHES == 1);
         else if (!strcmp (option_name, "Booleans"))
           option_available = (XCHAL_HAVE_BOOLEANS == 1);
         else
           as_warn (_("invalid configuration option '%s' in transition rule '%s'"),
                   req_or_option->option_name, from_string);
         if ((option_available ^ req_or_option->is_true) != 0)
           return FALSE;
       }
      else if (strcmp (req_or_option->option_name, "realnop") == 0)
       {
         bfd_boolean nop_available =
           (xtensa_opcode_lookup (xtensa_default_isa, "nop")
            != XTENSA_UNDEFINED);
         if ((nop_available ^ req_or_option->is_true) != 0)
           return FALSE;
       }
    }
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void trim_whitespace ( char *  in) [static]

Definition at line 1023 of file xtensa-relax.c.

{
  char *last_white = NULL;
  char *p = in;

  while (p && *p != '\0')
    {
      while (*p == ' ')
       {
         if (last_white == NULL)
           last_white = p;
         p++;
       }
      if (*p != '\0')
       {
         last_white = NULL;
         p++;
       }
    }
  if (last_white)
    *last_white = '\0';
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bfd_boolean wide_branch_opcode ( const char *  opcode_name,
char *  suffix,
xtensa_opcode popcode 
) [static]

Definition at line 1534 of file xtensa-relax.c.

{
  xtensa_isa isa = xtensa_default_isa;
  xtensa_opcode opcode;
  static char wbr_name_buf[20];

  if (strncmp (opcode_name, "WIDE.", 5) != 0)
    return FALSE;

  strcpy (wbr_name_buf, opcode_name + 5);
  strcat (wbr_name_buf, suffix);
  opcode = xtensa_opcode_lookup (isa, wbr_name_buf);
  if (opcode != XTENSA_UNDEFINED)
    {
      *popcode = opcode;
      return TRUE;
    }

  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

long xg_apply_userdef_op_fn ( OpType  op,
long  a 
)

Definition at line 751 of file xtensa-relax.c.

{
  switch (op)
    {
    case OP_OPERAND_F32MINUS:
      return operand_function_F32MINUS (a);
    case OP_OPERAND_LOW8:
      return operand_function_LOW8 (a);
    case OP_OPERAND_HI24S:
      return operand_function_HI24S (a);
    case OP_OPERAND_LOW16U:
      return operand_function_LOW16U (a);
    case OP_OPERAND_HI16U:
      return operand_function_HI16U (a);
    default:
      break;
    }
  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

TransitionTable* xg_build_simplify_table ( transition_cmp_fn  cmp)

Definition at line 1862 of file xtensa-relax.c.

{
  static TransitionTable *table = NULL;
  if (table == NULL)
    table = build_transition_table (simplify_spec_list, SIMPLIFY_COUNT, cmp);
  return table;
}

Here is the call graph for this function:

Here is the caller graph for this function:

TransitionTable* xg_build_widen_table ( transition_cmp_fn  cmp)

Definition at line 1852 of file xtensa-relax.c.

{
  static TransitionTable *table = NULL;
  if (table == NULL)
    table = build_transition_table (widen_spec_list, WIDEN_COUNT, cmp);
  return table;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 733 of file xtensa-relax.c.

{
  switch (op)
    {
    case OP_OPERAND_F32MINUS:
    case OP_OPERAND_LOW8:
    case OP_OPERAND_HI24S:
    case OP_OPERAND_LOW16U:
    case OP_OPERAND_HI16U:
      return TRUE;
    default:
      break;
    }
  return FALSE;
}

Here is the caller graph for this function:


Variable Documentation

opname_list* local_opnames = NULL [static]

Definition at line 125 of file xtensa-relax.c.

string_pattern_pair simplify_spec_list[]
Initial value:
{
  {"add %ar,%as,%at ? IsaUseDensityInstruction", "add.n %ar,%as,%at"},
  {"addi.n %ar,%as,0 ? IsaUseDensityInstruction", "mov.n %ar,%as"},
  {"addi %ar,%as,0 ? IsaUseDensityInstruction", "mov.n %ar,%as"},
  {"addi %ar,%as,%imm ? IsaUseDensityInstruction", "addi.n %ar,%as,%imm"},
  {"addmi %ar,%as,%imm ? IsaUseDensityInstruction", "addi.n %ar,%as,%imm"},
  {"beqz %as,%label ? IsaUseDensityInstruction", "beqz.n %as,%label"},
  {"bnez %as,%label ? IsaUseDensityInstruction", "bnez.n %as,%label"},
  {"l32i %at,%as,%imm ? IsaUseDensityInstruction", "l32i.n %at,%as,%imm"},
  {"movi %as,%imm ? IsaUseDensityInstruction", "movi.n %as,%imm"},
  {"nop ? realnop ? IsaUseDensityInstruction", "nop.n"},
  {"or %ar,%as,%at | %ar==%as | %as==%at ? IsaUseDensityInstruction", "nop.n"},
  {"or %ar,%as,%at | %ar!=%as | %as==%at ? IsaUseDensityInstruction", "mov.n %ar,%as"},
  {"ret %as ? IsaUseDensityInstruction", "ret.n %as"},
  {"retw %as ? IsaUseDensityInstruction", "retw.n %as"},
  {"s32i %at,%as,%imm ? IsaUseDensityInstruction", "s32i.n %at,%as,%imm"},
  {"slli %ar,%as,0 ? IsaUseDensityInstruction", "mov.n %ar,%as"}
}

Definition at line 452 of file xtensa-relax.c.

string_pattern_pair widen_spec_list[] [static]

Definition at line 252 of file xtensa-relax.c.