unsigned char need_modrm;
print_insn_i386 (pc, info)     bfd_vma pc;     disassemble_info *info;{  struct dis386 *dp;  int i;  int enter_instruction;  char *first, *second, *third;  int needcomma;    struct dis_private priv;  bfd_byte *inbuf = priv.the_buffer;  info->private_data = (PTR) &priv;  priv.max_fetched = priv.the_buffer;  priv.insn_start = pc;  if (setjmp (priv.bailout) != 0)    /* Error return.  */    return -1;  obuf[0] = 0;  op1out[0] = 0;  op2out[0] = 0;  op3out[0] = 0;  op_index[0] = op_index[1] = op_index[2] = -1;  the_info = info;  start_pc = pc;  start_codep = inbuf;  codep = inbuf;    ckprefix ();  FETCH_DATA (info, codep + 1);  if (*codep == 0xc8)    enter_instruction = 1;  else    enter_instruction = 0;    obufp = obuf;    if (prefixes & PREFIX_REPZ)    oappend ("repz ");  if (prefixes & PREFIX_REPNZ)    oappend ("repnz ");  if (prefixes & PREFIX_LOCK)    oappend ("lock ");    if ((prefixes & PREFIX_FWAIT)      && ((*codep < 0xd8) || (*codep > 0xdf)))    {      /* fwait not followed by floating point instruction */      (*info->fprintf_func) (info->stream, "fwait");      return (1);    }    /* these would be initialized to 0 if disassembling for 8086 or 286 */  dflag = 1;  aflag = 1;    if (prefixes & PREFIX_DATA)    dflag ^= 1;    if (prefixes & PREFIX_ADR)    {      aflag ^= 1;      oappend ("addr16 ");    }    if (*codep == 0x0f)    {      FETCH_DATA (info, codep + 2);      dp = &dis386_twobyte[*++codep];    }  else    dp = &dis386[*codep];  codep++;  /* Fetch the mod/reg/rm byte.  FIXME: We should be only fetching     this if we need it.  As it is, this code loses if there is a     one-byte instruction (without a mod/reg/rm byte) at the end of     the address space.  */  FETCH_DATA (info, codep + 1);  mod = (*codep >> 6) & 3;  reg = (*codep >> 3) & 7;  rm = *codep & 7;  if (dp->name == NULL && dp->bytemode1 == FLOATCODE)    {      dofloat ();    }  else    {      if (dp->name == NULL)	dp = &grps[dp->bytemode1][reg];            putop (dp->name);            obufp = op1out;      op_ad = 2;      if (dp->op1)	(*dp->op1)(dp->bytemode1);            obufp = op2out;      op_ad = 1;      if (dp->op2)	(*dp->op2)(dp->bytemode2);            obufp = op3out;      op_ad = 0;      if (dp->op3)	(*dp->op3)(dp->bytemode3);    }    obufp = obuf + strlen (obuf);  for (i = strlen (obuf); i < 6; i++)    oappend (" ");  oappend (" ");  (*info->fprintf_func) (info->stream, "%s", obuf);    /* enter instruction is printed with operands in the   * same order as the intel book; everything else   * is printed in reverse order    */  if (enter_instruction)    {      first = op1out;      second = op2out;      third = op3out;      op_ad = op_index[0];      op_index[0] = op_index[2];      op_index[2] = op_ad;    }  else    {      first = op3out;      second = op2out;      third = op1out;    }  needcomma = 0;  if (*first)    {      if (op_index[0] != -1)	(*info->print_address_func) (op_address[op_index[0]], info);      else	(*info->fprintf_func) (info->stream, "%s", first);      needcomma = 1;    }  if (*second)    {      if (needcomma)	(*info->fprintf_func) (info->stream, ",");      if (op_index[1] != -1)	(*info->print_address_func) (op_address[op_index[1]], info);      else	(*info->fprintf_func) (info->stream, "%s", second);      needcomma = 1;    }  if (*third)    {      if (needcomma)	(*info->fprintf_func) (info->stream, ",");      if (op_index[2] != -1)	(*info->print_address_func) (op_address[op_index[2]], info);      else	(*info->fprintf_func) (info->stream, "%s", third);    }  return (codep - inbuf);}