FreeBSD/contrib/binutils/gas/config/tc-arm.c
/* Add the literal in the global 'inst'
   structure to the relevent literal pool.  */
Add the literal in the global 'inst'
structure to the relevent literal pool.
Add the literal in the global ' inst ' structure to the relevent literal pool .
static int
add_to_lit_pool (void)
{
  literal_pool * pool;
  unsigned int entry;
  pool = find_or_make_literal_pool ();
  for (entry = 0; entry < pool->next_free_entry; entry ++)
    {
      if ((pool->literals[entry].X_op == inst.reloc.exp.X_op)
	  && (inst.reloc.exp.X_op == O_constant)
	  && (pool->literals[entry].X_add_number
	      == inst.reloc.exp.X_add_number)
	  && (pool->literals[entry].X_unsigned
	      == inst.reloc.exp.X_unsigned))
	break;
      if ((pool->literals[entry].X_op == inst.reloc.exp.X_op)
	  && (inst.reloc.exp.X_op == O_symbol)
	  && (pool->literals[entry].X_add_number
	      == inst.reloc.exp.X_add_number)
	  && (pool->literals[entry].X_add_symbol
	      == inst.reloc.exp.X_add_symbol)
	  && (pool->literals[entry].X_op_symbol
	      == inst.reloc.exp.X_op_symbol))
	break;
    }
  if (entry == pool->next_free_entry)
    {
      if (entry >= MAX_LITERAL_POOL_SIZE)
	{
	  inst.error = _("literal pool overflow");
	  return FAIL;
	}
      pool->literals[entry] = inst.reloc.exp;
      pool->next_free_entry += 1;
    }
  inst.reloc.exp.X_op	      = O_symbol;
  inst.reloc.exp.X_add_number = ((int) entry) * 4;
  inst.reloc.exp.X_add_symbol = pool->symbol;
  return SUCCESS;
}
static int add_to_lit_pool ( void ) { literal_pool * pool ; unsigned int entry ; pool = find_or_make_literal_pool ( ) ; for ( entry = 0 ; entry < pool -> next_free_entry ; entry ++ ) { if ( ( pool -> literals [ entry ] . X_op == inst . reloc . exp . X_op ) && ( inst . reloc . exp . X_op == O_constant ) && ( pool -> literals [ entry ] . X_add_number == inst . reloc . exp . X_add_number ) && ( pool -> literals [ entry ] . X_unsigned == inst . reloc . exp . X_unsigned ) ) break ; if ( ( pool -> literals [ entry ] . X_op == inst . reloc . exp . X_op ) && ( inst . reloc . exp . X_op == O_symbol ) && ( pool -> literals [ entry ] . X_add_number == inst . reloc . exp . X_add_number ) && ( pool -> literals [ entry ] . X_add_symbol == inst . reloc . exp . X_add_symbol ) && ( pool -> literals [ entry ] . X_op_symbol == inst . reloc . exp . X_op_symbol ) ) break ; } if ( entry == pool -> next_free_entry ) { if ( entry >= MAX_LITERAL_POOL_SIZE ) { inst . error = _ ( " " ) ; return FAIL ; } pool -> literals [ entry ] = inst . reloc . exp ; pool -> next_free_entry += 1 ; } inst . reloc . exp . X_op = O_symbol ; inst . reloc . exp . X_add_number = ( ( int ) entry ) * 4 ; inst . reloc . exp . X_add_symbol = pool -> symbol ; return SUCCESS ; }
Add the literal in the global 'inst'
structure to the relevent literal pool.
Add the literal in the global ' inst ' structure to the relevent literal pool .
/* Check if this literal value is already in the pool.  */ /* Do we need to create a new entry?	*/