FreeBSD/contrib/binutils/gas/config/tc-mips.c
/* Parse string STR as a 16-bit relocatable operand.  Store the
   expression in *EP and the relocations in the array starting
   at RELOC.  Return the number of relocation operators used.

   On exit, EXPR_END points to the first character after the expression.  */
Parse string STR as a 16-bit relocatable operand.  Store the
expression in *EP and the relocations in the array starting
at RELOC.  Return the number of relocation operators used.

On exit, EXPR_END points to the first character after the expression.
Parse string STR as a 16 - bit relocatable operand . Store the expression in * EP and the relocations in the array starting at RELOC . Return the number of relocation operators used . On exit EXPR_END points to the first character after the expression .
static size_t
my_getSmallExpression (expressionS *ep, bfd_reloc_code_real_type *reloc,
		       char *str)
{
  bfd_reloc_code_real_type reversed_reloc[3];
  size_t reloc_index, i;
  int crux_depth, str_depth;
  char *crux;
  reloc_index = -1;
  str_depth = 0;
  do
    {
      reloc_index++;
      crux = str;
      crux_depth = str_depth;
      while (*str == ' ' || *str == '\t' || *str == '(')
	if (*str++ == '(')
	  str_depth++;
    }
  while (*str == '%'
	 && reloc_index < (HAVE_NEWABI ? 3 : 1)
	 && parse_relocation (&str, &reversed_reloc[reloc_index]));
  my_getExpression (ep, crux);
  str = expr_end;
  while (crux_depth > 0 && (*str == ')' || *str == ' ' || *str == '\t'))
    if (*str++ == ')')
      crux_depth--;
  if (crux_depth > 0)
    as_bad ("unclosed '('");
  expr_end = str;
  if (reloc_index != 0)
    {
      prev_reloc_op_frag = frag_now;
      for (i = 0; i < reloc_index; i++)
	reloc[i] = reversed_reloc[reloc_index - 1 - i];
    }
  return reloc_index;
}
static size_t my_getSmallExpression ( expressionS * ep , bfd_reloc_code_real_type * reloc , char * str ) { bfd_reloc_code_real_type reversed_reloc [ 3 ] ; size_t reloc_index , i ; int crux_depth , str_depth ; char * crux ; reloc_index = -1 ; str_depth = 0 ; do { reloc_index ++ ; crux = str ; crux_depth = str_depth ; while ( * str == ' ' || * str == ' \t ' || * str == ' ' ) if ( * str ++ == ' ' ) str_depth ++ ; } while ( * str == ' ' && reloc_index < ( HAVE_NEWABI ? 3 : 1 ) && parse_relocation ( & str , & reversed_reloc [ reloc_index ] ) ) ; my_getExpression ( ep , crux ) ; str = expr_end ; while ( crux_depth > 0 && ( * str == ' ' || * str == ' ' || * str == ' \t ' ) ) if ( * str ++ == ' ' ) crux_depth -- ; if ( crux_depth > 0 ) as_bad ( " " ) ; expr_end = str ; if ( reloc_index != 0 ) { prev_reloc_op_frag = frag_now ; for ( i = 0 ; i < reloc_index ; i ++ ) reloc [ i ] = reversed_reloc [ reloc_index - 1 - i ] ; } return reloc_index ; }
Parse string STR as a 16-bit relocatable operand.
Parse string STR as a 16 - bit relocatable operand .
/* Search for the start of the main expression, recoding relocations
     in REVERSED_RELOC.  End the loop with CRUX pointing to the start
     of the main expression and with CRUX_DEPTH containing the number
     of open brackets at that point.  */ /* Skip over whitespace and brackets, keeping count of the number
	 of brackets.  */ /* Match every open bracket.  */