FreeBSD/contrib/binutils/gas/config/tc-arm.c
/* Return the size of a relaxable branch instruction.  BITS is the
   size of the offset field in the narrow instruction.  */
Return the size of a relaxable branch instruction.  BITS is the
size of the offset field in the narrow instruction.
Return the size of a relaxable branch instruction . BITS is the size of the offset field in the narrow instruction .
static int
relax_branch (fragS *fragp, asection *sec, int bits, long stretch)
{
  addressT addr;
  offsetT val;
  offsetT limit;
  if (!S_IS_DEFINED(fragp->fr_symbol)
      || sec != S_GET_SEGMENT (fragp->fr_symbol))
    return 4;
  val = relaxed_symbol_addr(fragp, stretch);
  addr = fragp->fr_address + fragp->fr_fix + 4;
  val -= addr;
  limit = 1 << bits;
  if (val >= limit || val < -limit)
    return 4;
  return 2;
}
static int relax_branch ( fragS * fragp , asection * sec , int bits , long stretch ) { addressT addr ; offsetT val ; offsetT limit ; if ( ! S_IS_DEFINED ( fragp -> fr_symbol ) || sec != S_GET_SEGMENT ( fragp -> fr_symbol ) ) return 4 ; val = relaxed_symbol_addr ( fragp , stretch ) ; addr = fragp -> fr_address + fragp -> fr_fix + 4 ; val -= addr ; limit = 1 << bits ; if ( val >= limit || val < - limit ) return 4 ; return 2 ; }
Return the size of a relaxable branch instruction.
Return the size of a relaxable branch instruction .
/* Assume worst case for symbols not known to be in the same section.  */ /* Offset is a signed value *2 */