unsigned short selector; 
static long pm_address(u_char FPU_modrm, u_char segment,		       struct address *addr, long offset){   struct desc_struct descriptor;  unsigned long base_address, limit, address, seg_top;  unsigned short selector;  segment--;#ifdef PARANOID  /* segment is unsigned, so this also detects if segment was 0: */  if ( segment > PREFIX_SS_ )    {      EXCEPTION(EX_INTERNAL|0x132);      math_abort(FPU_info,SIGSEGV);    }#endif /* PARANOID */  switch ( segment )    {      /* fs and gs aren't used by the kernel, so they still have their	 user-space values. */    case PREFIX_FS_-1:      /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register	 in the assembler statement. */      __asm__("mov %%fs,%0":"=r" (selector));      addr->selector = selector;      break;    case PREFIX_GS_-1:      /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register	 in the assembler statement. */      __asm__("mov %%gs,%0":"=r" (selector));      addr->selector = selector;      break;    default:      addr->selector = PM_REG_(segment);    }  descriptor = LDT_DESCRIPTOR(PM_REG_(segment));  base_address = SEG_BASE_ADDR(descriptor);  address = base_address + offset;  limit = base_address	+ (SEG_LIMIT(descriptor)+1) * SEG_GRANULARITY(descriptor) - 1;  if ( limit < base_address ) limit = 0xffffffff;  if ( SEG_EXPAND_DOWN(descriptor) )    {      if ( SEG_G_BIT(descriptor) )	seg_top = 0xffffffff;      else	{	  seg_top = base_address + (1 << 20);	  if ( seg_top < base_address ) seg_top = 0xffffffff;	}      access_limit =	(address <= limit) || (address >= seg_top) ? 0 :	  ((seg_top-address) >= 255 ? 255 : seg_top-address);    }  else    {      access_limit =	(address > limit) || (address < base_address) ? 0 :	  ((limit-address) >= 254 ? 255 : limit-address+1);    }  if ( SEG_EXECUTE_ONLY(descriptor) ||      (!SEG_WRITE_PERM(descriptor) && (FPU_modrm & FPU_WRITE_BIT)) )    {      access_limit = 0;    }  return address;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d37e7e3fd851428dede4d05d3e69d03795a744a/get_address.c/buggy/arch/i386/math-emu/get_address.c