Back to index

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

Go to the source code of this file.

Classes

struct  expressionS

Defines

#define expression(result)   expr (0, result, expr_normal)
#define expression_and_evaluate(result)   expr (0, result, expr_evaluate)
#define deferred_expression(result)   expr (0, result, expr_defer)
#define SIZE_OF_LARGE_NUMBER   (20)

Typedefs

typedef struct expressionS expressionS
typedef char operator_rankT

Enumerations

enum  operatorT {
  O_illegal, O_absent, O_constant, O_symbol,
  O_symbol_rva, O_register, O_big, O_uminus,
  O_bit_not, O_logical_not, O_multiply, O_divide,
  O_modulus, O_left_shift, O_right_shift, O_bit_inclusive_or,
  O_bit_or_not, O_bit_exclusive_or, O_bit_and, O_add,
  O_subtract, O_eq, O_ne, O_lt,
  O_le, O_ge, O_gt, O_logical_and,
  O_logical_or, O_index, O_md1, O_md2,
  O_md3, O_md4, O_md5, O_md6,
  O_md7, O_md8, O_md9, O_md10,
  O_md11, O_md12, O_md13, O_md14,
  O_md15, O_md16, O_md17, O_md18,
  O_md19, O_md20, O_md21, O_md22,
  O_md23, O_md24, O_md25, O_md26,
  O_md27, O_md28, O_md29, O_md30,
  O_md31, O_md32, O_max
}
enum  expr_mode { expr_evaluate, expr_normal, expr_defer }

Functions

char get_symbol_end (void)
void expr_begin (void)
void expr_set_precedence (void)
segT expr (int, expressionS *, enum expr_mode)
unsigned int get_single_number (void)
symbolS * make_expr_symbol (expressionS *expressionP)
int expr_symbol_where (symbolS *, char **, unsigned int *)
symbolS * expr_build_uconstant (offsetT)
symbolS * expr_build_dot (void)
int resolve_expression (expressionS *)

Variables

FLONUM_TYPE generic_floating_point_number
LITTLENUM_TYPE generic_bignum []

Class Documentation

struct expressionS

Definition at line 116 of file expr.h.

Class Members
offsetT X_add_number
symbolS * X_add_symbol
unsigned short X_md
unsigned char X_op
symbolS * X_op_symbol
unsigned int X_unsigned: 1

Define Documentation

#define deferred_expression (   result)    expr (0, result, expr_defer)

Definition at line 156 of file expr.h.

#define expression (   result)    expr (0, result, expr_normal)

Definition at line 154 of file expr.h.

#define expression_and_evaluate (   result)    expr (0, result, expr_evaluate)

Definition at line 155 of file expr.h.

#define SIZE_OF_LARGE_NUMBER   (20)

Definition at line 165 of file expr.h.


Typedef Documentation

typedef char operator_rankT

Definition at line 167 of file expr.h.


Enumeration Type Documentation

enum expr_mode
Enumerator:
expr_evaluate 
expr_normal 
expr_defer 

Definition at line 146 of file expr.h.

enum operatorT
Enumerator:
O_illegal 
O_absent 
O_constant 
O_symbol 
O_symbol_rva 
O_register 
O_big 
O_uminus 
O_bit_not 
O_logical_not 
O_multiply 
O_divide 
O_modulus 
O_left_shift 
O_right_shift 
O_bit_inclusive_or 
O_bit_or_not 
O_bit_exclusive_or 
O_bit_and 
O_add 
O_subtract 
O_eq 
O_ne 
O_lt 
O_le 
O_ge 
O_gt 
O_logical_and 
O_logical_or 
O_index 
O_md1 
O_md2 
O_md3 
O_md4 
O_md5 
O_md6 
O_md7 
O_md8 
O_md9 
O_md10 
O_md11 
O_md12 
O_md13 
O_md14 
O_md15 
O_md16 
O_md17 
O_md18 
O_md19 
O_md20 
O_md21 
O_md22 
O_md23 
O_md24 
O_md25 
O_md26 
O_md27 
O_md28 
O_md29 
O_md30 
O_md31 
O_md32 
O_max 

Definition at line 43 of file expr.h.

             {
  /* An illegal expression.  */
  O_illegal,
  /* A nonexistent expression.  */
  O_absent,
  /* X_add_number (a constant expression).  */
  O_constant,
  /* X_add_symbol + X_add_number.  */
  O_symbol,
  /* X_add_symbol + X_add_number - the base address of the image.  */
  O_symbol_rva,
  /* A register (X_add_number is register number).  */
  O_register,
  /* A big value.  If X_add_number is negative or 0, the value is in
     generic_floating_point_number.  Otherwise the value is in
     generic_bignum, and X_add_number is the number of LITTLENUMs in
     the value.  */
  O_big,
  /* (- X_add_symbol) + X_add_number.  */
  O_uminus,
  /* (~ X_add_symbol) + X_add_number.  */
  O_bit_not,
  /* (! X_add_symbol) + X_add_number.  */
  O_logical_not,
  /* (X_add_symbol * X_op_symbol) + X_add_number.  */
  O_multiply,
  /* (X_add_symbol / X_op_symbol) + X_add_number.  */
  O_divide,
  /* (X_add_symbol % X_op_symbol) + X_add_number.  */
  O_modulus,
  /* (X_add_symbol << X_op_symbol) + X_add_number.  */
  O_left_shift,
  /* (X_add_symbol >> X_op_symbol) + X_add_number.  */
  O_right_shift,
  /* (X_add_symbol | X_op_symbol) + X_add_number.  */
  O_bit_inclusive_or,
  /* (X_add_symbol |~ X_op_symbol) + X_add_number.  */
  O_bit_or_not,
  /* (X_add_symbol ^ X_op_symbol) + X_add_number.  */
  O_bit_exclusive_or,
  /* (X_add_symbol & X_op_symbol) + X_add_number.  */
  O_bit_and,
  /* (X_add_symbol + X_op_symbol) + X_add_number.  */
  O_add,
  /* (X_add_symbol - X_op_symbol) + X_add_number.  */
  O_subtract,
  /* (X_add_symbol == X_op_symbol) + X_add_number.  */
  O_eq,
  /* (X_add_symbol != X_op_symbol) + X_add_number.  */
  O_ne,
  /* (X_add_symbol < X_op_symbol) + X_add_number.  */
  O_lt,
  /* (X_add_symbol <= X_op_symbol) + X_add_number.  */
  O_le,
  /* (X_add_symbol >= X_op_symbol) + X_add_number.  */
  O_ge,
  /* (X_add_symbol > X_op_symbol) + X_add_number.  */
  O_gt,
  /* (X_add_symbol && X_op_symbol) + X_add_number.  */
  O_logical_and,
  /* (X_add_symbol || X_op_symbol) + X_add_number.  */
  O_logical_or,
  /* X_op_symbol [ X_add_symbol ] */
  O_index,
  /* machine dependent operators */
  O_md1,  O_md2,  O_md3,  O_md4,  O_md5,  O_md6,  O_md7,  O_md8,
  O_md9,  O_md10, O_md11, O_md12, O_md13, O_md14, O_md15, O_md16,
  O_md17, O_md18, O_md19, O_md20, O_md21, O_md22, O_md23, O_md24,
  O_md25, O_md26, O_md27, O_md28, O_md29, O_md30, O_md31, O_md32,
  /* this must be the largest value */
  O_max
} operatorT;

Function Documentation

segT expr ( int  ,
expressionS ,
enum  expr_mode 
)

Definition at line 1628 of file expr.c.

{
  operator_rankT rank = (operator_rankT) rankarg;
  segT retval;
  expressionS right;
  operatorT op_left;
  operatorT op_right;
  int op_chars;

  know (rank >= 0);

  /* Save the value of dot for the fixup code.  */
  if (rank == 0)
    dot_value = frag_now_fix ();

  retval = operand (resultP, mode);

  /* operand () gobbles spaces.  */
  know (*input_line_pointer != ' ');

  op_left = operator (&op_chars);
  while (op_left != O_illegal && op_rank[(int) op_left] > rank)
    {
      segT rightseg;
      bfd_vma frag_off;

      input_line_pointer += op_chars;     /* -> after operator.  */

      rightseg = expr (op_rank[(int) op_left], &right, mode);
      if (right.X_op == O_absent)
       {
         as_warn (_("missing operand; zero assumed"));
         right.X_op = O_constant;
         right.X_add_number = 0;
         right.X_add_symbol = NULL;
         right.X_op_symbol = NULL;
       }

      know (*input_line_pointer != ' ');

      if (op_left == O_index)
       {
         if (*input_line_pointer != ']')
           as_bad ("missing right bracket");
         else
           {
             ++input_line_pointer;
             SKIP_WHITESPACE ();
           }
       }

      op_right = operator (&op_chars);

      know (op_right == O_illegal
           || op_rank[(int) op_right] <= op_rank[(int) op_left]);
      know ((int) op_left >= (int) O_multiply
           && (int) op_left <= (int) O_index);

      /* input_line_pointer->after right-hand quantity.  */
      /* left-hand quantity in resultP.  */
      /* right-hand quantity in right.  */
      /* operator in op_left.  */

      if (resultP->X_op == O_big)
       {
         if (resultP->X_add_number > 0)
           as_warn (_("left operand is a bignum; integer 0 assumed"));
         else
           as_warn (_("left operand is a float; integer 0 assumed"));
         resultP->X_op = O_constant;
         resultP->X_add_number = 0;
         resultP->X_add_symbol = NULL;
         resultP->X_op_symbol = NULL;
       }
      if (right.X_op == O_big)
       {
         if (right.X_add_number > 0)
           as_warn (_("right operand is a bignum; integer 0 assumed"));
         else
           as_warn (_("right operand is a float; integer 0 assumed"));
         right.X_op = O_constant;
         right.X_add_number = 0;
         right.X_add_symbol = NULL;
         right.X_op_symbol = NULL;
       }

      /* Optimize common cases.  */
#ifdef md_optimize_expr
      if (md_optimize_expr (resultP, op_left, &right))
       {
         /* Skip.  */
         ;
       }
      else
#endif
      if (op_left == O_add && right.X_op == O_constant)
       {
         /* X + constant.  */
         resultP->X_add_number += right.X_add_number;
       }
      /* This case comes up in PIC code.  */
      else if (op_left == O_subtract
              && right.X_op == O_symbol
              && resultP->X_op == O_symbol
              && retval == rightseg
              && (SEG_NORMAL (rightseg)
                 || right.X_add_symbol == resultP->X_add_symbol)
              && frag_offset_fixed_p (symbol_get_frag (resultP->X_add_symbol),
                                   symbol_get_frag (right.X_add_symbol),
                                   &frag_off))
       {
         resultP->X_add_number -= right.X_add_number;
         resultP->X_add_number -= frag_off / OCTETS_PER_BYTE;
         resultP->X_add_number += (S_GET_VALUE (resultP->X_add_symbol)
                                - S_GET_VALUE (right.X_add_symbol));
         resultP->X_op = O_constant;
         resultP->X_add_symbol = 0;
       }
      else if (op_left == O_subtract && right.X_op == O_constant)
       {
         /* X - constant.  */
         resultP->X_add_number -= right.X_add_number;
       }
      else if (op_left == O_add && resultP->X_op == O_constant)
       {
         /* Constant + X.  */
         resultP->X_op = right.X_op;
         resultP->X_add_symbol = right.X_add_symbol;
         resultP->X_op_symbol = right.X_op_symbol;
         resultP->X_add_number += right.X_add_number;
         retval = rightseg;
       }
      else if (resultP->X_op == O_constant && right.X_op == O_constant)
       {
         /* Constant OP constant.  */
         offsetT v = right.X_add_number;
         if (v == 0 && (op_left == O_divide || op_left == O_modulus))
           {
             as_warn (_("division by zero"));
             v = 1;
           }
         switch (op_left)
           {
           default:                abort ();
           case O_multiply:        resultP->X_add_number *= v; break;
           case O_divide:          resultP->X_add_number /= v; break;
           case O_modulus:         resultP->X_add_number %= v; break;
           case O_left_shift:             resultP->X_add_number <<= v; break;
           case O_right_shift:
             /* We always use unsigned shifts, to avoid relying on
               characteristics of the compiler used to compile gas.  */
             resultP->X_add_number =
              (offsetT) ((valueT) resultP->X_add_number >> (valueT) v);
             break;
           case O_bit_inclusive_or:       resultP->X_add_number |= v; break;
           case O_bit_or_not:             resultP->X_add_number |= ~v; break;
           case O_bit_exclusive_or:       resultP->X_add_number ^= v; break;
           case O_bit_and:         resultP->X_add_number &= v; break;
             /* Constant + constant (O_add) is handled by the
               previous if statement for constant + X, so is omitted
               here.  */
           case O_subtract:        resultP->X_add_number -= v; break;
           case O_eq:
             resultP->X_add_number =
              resultP->X_add_number == v ? ~ (offsetT) 0 : 0;
             break;
           case O_ne:
             resultP->X_add_number =
              resultP->X_add_number != v ? ~ (offsetT) 0 : 0;
             break;
           case O_lt:
             resultP->X_add_number =
              resultP->X_add_number <  v ? ~ (offsetT) 0 : 0;
             break;
           case O_le:
             resultP->X_add_number =
              resultP->X_add_number <= v ? ~ (offsetT) 0 : 0;
             break;
           case O_ge:
             resultP->X_add_number =
              resultP->X_add_number >= v ? ~ (offsetT) 0 : 0;
             break;
           case O_gt:
             resultP->X_add_number =
              resultP->X_add_number >  v ? ~ (offsetT) 0 : 0;
             break;
           case O_logical_and:
             resultP->X_add_number = resultP->X_add_number && v;
             break;
           case O_logical_or:
             resultP->X_add_number = resultP->X_add_number || v;
             break;
           }
       }
      else if (resultP->X_op == O_symbol
              && right.X_op == O_symbol
              && (op_left == O_add
                 || op_left == O_subtract
                 || (resultP->X_add_number == 0
                     && right.X_add_number == 0)))
       {
         /* Symbol OP symbol.  */
         resultP->X_op = op_left;
         resultP->X_op_symbol = right.X_add_symbol;
         if (op_left == O_add)
           resultP->X_add_number += right.X_add_number;
         else if (op_left == O_subtract)
           {
             resultP->X_add_number -= right.X_add_number;
             if (retval == rightseg && SEG_NORMAL (retval))
              {
                retval = absolute_section;
                rightseg = absolute_section;
              }
           }
       }
      else
       {
         /* The general case.  */
         resultP->X_add_symbol = make_expr_symbol (resultP);
         resultP->X_op_symbol = make_expr_symbol (&right);
         resultP->X_op = op_left;
         resultP->X_add_number = 0;
         resultP->X_unsigned = 1;
       }

      if (retval != rightseg)
       {
         if (! SEG_NORMAL (retval))
           {
             if (retval != undefined_section || SEG_NORMAL (rightseg))
              retval = rightseg;
           }
         else if (SEG_NORMAL (rightseg)
#ifdef DIFF_EXPR_OK
                 && op_left != O_subtract
#endif
                 )
           as_bad (_("operation combines symbols in different segments"));
       }

      op_left = op_right;
    }                       /* While next operator is >= this rank.  */

  /* The PA port needs this information.  */
  if (resultP->X_add_symbol)
    symbol_mark_used (resultP->X_add_symbol);

  if (rank == 0 && mode == expr_evaluate)
    resolve_expression (resultP);

  return resultP->X_op == O_constant ? absolute_section : retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void expr_begin ( void  )

Definition at line 1513 of file expr.c.

{
  expr_set_precedence ();

  /* Verify that X_op field is wide enough.  */
  {
    expressionS e;
    e.X_op = O_max;
    assert (e.X_op == O_max);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

symbolS* expr_build_dot ( void  )

Definition at line 162 of file expr.c.

Here is the call graph for this function:

Here is the caller graph for this function:

symbolS* expr_build_uconstant ( offsetT  )

Definition at line 149 of file expr.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void expr_set_precedence ( void  )
int expr_symbol_where ( symbolS *  ,
char **  ,
unsigned int  
)

Definition at line 119 of file expr.c.

{
  register struct expr_symbol_line *l;

  for (l = expr_symbol_lines; l != NULL; l = l->next)
    {
      if (l->sym == sym)
       {
         *pfile = l->file;
         *pline = l->line;
         return 1;
       }
    }

  return 0;
}

Here is the caller graph for this function:

Definition at line 2174 of file expr.c.

{
  expressionS exp;
  operand (&exp, expr_normal);
  return exp.X_add_number;
}

Here is the caller graph for this function:

char get_symbol_end ( void  )

Definition at line 2155 of file expr.c.

{
  char c;

  /* We accept \001 in a name in case this is being called with a
     constructed string.  */
  if (is_name_beginner (c = *input_line_pointer++) || c == '\001')
    {
      while (is_part_of_name (c = *input_line_pointer++)
            || c == '\001')
       ;
      if (is_name_ender (c))
       c = *input_line_pointer++;
    }
  *--input_line_pointer = 0;
  return (c);
}
symbolS* make_expr_symbol ( expressionS expressionP)

Definition at line 65 of file expr.c.

{
  expressionS zero;
  symbolS *symbolP;
  struct expr_symbol_line *n;

  if (expressionP->X_op == O_symbol
      && expressionP->X_add_number == 0)
    return expressionP->X_add_symbol;

  if (expressionP->X_op == O_big)
    {
      /* This won't work, because the actual value is stored in
        generic_floating_point_number or generic_bignum, and we are
        going to lose it if we haven't already.  */
      if (expressionP->X_add_number > 0)
       as_bad (_("bignum invalid"));
      else
       as_bad (_("floating point number invalid"));
      zero.X_op = O_constant;
      zero.X_add_number = 0;
      zero.X_unsigned = 0;
      clean_up_expression (&zero);
      expressionP = &zero;
    }

  /* Putting constant symbols in absolute_section rather than
     expr_section is convenient for the old a.out code, for which
     S_GET_SEGMENT does not always retrieve the value put in by
     S_SET_SEGMENT.  */
  symbolP = symbol_create (FAKE_LABEL_NAME,
                        (expressionP->X_op == O_constant
                         ? absolute_section
                         : expr_section),
                        0, &zero_address_frag);
  symbol_set_value_expression (symbolP, expressionP);

  if (expressionP->X_op == O_constant)
    resolve_symbol_value (symbolP);

  n = (struct expr_symbol_line *) xmalloc (sizeof *n);
  n->sym = symbolP;
  as_where (&n->file, &n->line);
  n->next = expr_symbol_lines;
  expr_symbol_lines = n;

  return symbolP;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1888 of file expr.c.

{
  /* Help out with CSE.  */
  valueT final_val = expressionP->X_add_number;
  symbolS *add_symbol = expressionP->X_add_symbol;
  symbolS *op_symbol = expressionP->X_op_symbol;
  operatorT op = expressionP->X_op;
  valueT left, right;
  segT seg_left, seg_right;
  fragS *frag_left, *frag_right;
  bfd_vma frag_off;

  switch (op)
    {
    default:
      return 0;

    case O_constant:
    case O_register:
      left = 0;
      break;

    case O_symbol:
    case O_symbol_rva:
      if (!snapshot_symbol (&add_symbol, &left, &seg_left, &frag_left))
       return 0;

      break;

    case O_uminus:
    case O_bit_not:
    case O_logical_not:
      if (!snapshot_symbol (&add_symbol, &left, &seg_left, &frag_left))
       return 0;

      if (seg_left != absolute_section)
       return 0;

      if (op == O_logical_not)
       left = !left;
      else if (op == O_uminus)
       left = -left;
      else
       left = ~left;
      op = O_constant;
      break;

    case O_multiply:
    case O_divide:
    case O_modulus:
    case O_left_shift:
    case O_right_shift:
    case O_bit_inclusive_or:
    case O_bit_or_not:
    case O_bit_exclusive_or:
    case O_bit_and:
    case O_add:
    case O_subtract:
    case O_eq:
    case O_ne:
    case O_lt:
    case O_le:
    case O_ge:
    case O_gt:
    case O_logical_and:
    case O_logical_or:
      if (!snapshot_symbol (&add_symbol, &left, &seg_left, &frag_left)
         || !snapshot_symbol (&op_symbol, &right, &seg_right, &frag_right))
       return 0;

      /* Simplify addition or subtraction of a constant by folding the
        constant into X_add_number.  */
      if (op == O_add)
       {
         if (seg_right == absolute_section)
           {
             final_val += right;
             op = O_symbol;
             break;
           }
         else if (seg_left == absolute_section)
           {
             final_val += left;
             left = right;
             seg_left = seg_right;
             add_symbol = op_symbol;
             op = O_symbol;
             break;
           }
       }
      else if (op == O_subtract)
       {
         if (seg_right == absolute_section)
           {
             final_val -= right;
             op = O_symbol;
             break;
           }
       }

      /* Equality and non-equality tests are permitted on anything.
        Subtraction, and other comparison operators are permitted if
        both operands are in the same section.
        Shifts by constant zero are permitted on anything.
        Multiplies, bit-ors, and bit-ands with constant zero are
        permitted on anything.
        Multiplies and divides by constant one are permitted on
        anything.
        Binary operations with both operands being the same register
        or undefined symbol are permitted if the result doesn't depend
        on the input value.
        Otherwise, both operands must be absolute.  We already handled
        the case of addition or subtraction of a constant above.  */
      frag_off = 0;
      if (!(seg_left == absolute_section
              && seg_right == absolute_section)
         && !(op == O_eq || op == O_ne)
         && !((op == O_subtract
              || op == O_lt || op == O_le || op == O_ge || op == O_gt)
              && seg_left == seg_right
              && (finalize_syms
                 || frag_offset_fixed_p (frag_left, frag_right, &frag_off))
              && (seg_left != reg_section || left == right)
              && (seg_left != undefined_section || add_symbol == op_symbol)))
       {
         if ((seg_left == absolute_section && left == 0)
             || (seg_right == absolute_section && right == 0))
           {
             if (op == O_bit_exclusive_or || op == O_bit_inclusive_or)
              {
                if (seg_right != absolute_section || right != 0)
                  {
                    seg_left = seg_right;
                    left = right;
                    add_symbol = op_symbol;
                  }
                op = O_symbol;
                break;
              }
             else if (op == O_left_shift || op == O_right_shift)
              {
                if (seg_left != absolute_section || left != 0)
                  {
                    op = O_symbol;
                    break;
                  }
              }
             else if (op != O_multiply
                     && op != O_bit_or_not && op != O_bit_and)
               return 0;
           }
         else if (op == O_multiply
                 && seg_left == absolute_section && left == 1)
           {
             seg_left = seg_right;
             left = right;
             add_symbol = op_symbol;
             op = O_symbol;
             break;
           }
         else if ((op == O_multiply || op == O_divide)
                 && seg_right == absolute_section && right == 1)
           {
             op = O_symbol;
             break;
           }
         else if (left != right
                 || ((seg_left != reg_section || seg_right != reg_section)
                     && (seg_left != undefined_section
                        || seg_right != undefined_section
                        || add_symbol != op_symbol)))
           return 0;
         else if (op == O_bit_and || op == O_bit_inclusive_or)
           {
             op = O_symbol;
             break;
           }
         else if (op != O_bit_exclusive_or && op != O_bit_or_not)
           return 0;
       }

      right += frag_off / OCTETS_PER_BYTE;
      switch (op)
       {
       case O_add:                 left += right; break;
       case O_subtract:            left -= right; break;
       case O_multiply:            left *= right; break;
       case O_divide:
         if (right == 0)
           return 0;
         left = (offsetT) left / (offsetT) right;
         break;
       case O_modulus:
         if (right == 0)
           return 0;
         left = (offsetT) left % (offsetT) right;
         break;
       case O_left_shift:          left <<= right; break;
       case O_right_shift:         left >>= right; break;
       case O_bit_inclusive_or:    left |= right; break;
       case O_bit_or_not:          left |= ~right; break;
       case O_bit_exclusive_or:    left ^= right; break;
       case O_bit_and:                    left &= right; break;
       case O_eq:
       case O_ne:
         left = (left == right
                && seg_left == seg_right
                && (finalize_syms || frag_left == frag_right)
                && (seg_left != undefined_section
                    || add_symbol == op_symbol)
                ? ~ (valueT) 0 : 0);
         if (op == O_ne)
           left = ~left;
         break;
       case O_lt:
         left = (offsetT) left <  (offsetT) right ? ~ (valueT) 0 : 0;
         break;
       case O_le:
         left = (offsetT) left <= (offsetT) right ? ~ (valueT) 0 : 0;
         break;
       case O_ge:
         left = (offsetT) left >= (offsetT) right ? ~ (valueT) 0 : 0;
         break;
       case O_gt:
         left = (offsetT) left >  (offsetT) right ? ~ (valueT) 0 : 0;
         break;
       case O_logical_and:  left = left && right; break;
       case O_logical_or:   left = left || right; break;
       default:             abort ();
       }

      op = O_constant;
      break;
    }

  if (op == O_symbol)
    {
      if (seg_left == absolute_section)
       op = O_constant;
      else if (seg_left == reg_section && final_val == 0)
       op = O_register;
      else if (add_symbol != expressionP->X_add_symbol)
       final_val += left;
      expressionP->X_add_symbol = add_symbol;
    }
  expressionP->X_op = op;

  if (op == O_constant || op == O_register)
    final_val += left;
  expressionP->X_add_number = final_val;

  return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 178 of file expr.c.

Definition at line 180 of file expr.c.