libudis86/decode.c
static int
decode_operands(struct ud* u)
{
  decode_operand(
	  u,
	  &u->operand[0],
	  u->itab_entry->operand1.type,
	  u->itab_entry->operand1.size
  );

  u->operand[0].access = u->itab_entry->access1;

  if( u->operand[0].access == UD_ACCESS_NONE && u->operand[0].type == UD_OP_IMM )
	u->operand[0].access = UD_ACCESS_READ;

  if( u->operand[0].type != UD_NONE )
  {
	  decode_operand(
		  u,
		  &u->operand[1],
		  u->itab_entry->operand2.type,
		  u->itab_entry->operand2.size
	  );

	  u->operand[1].access = u->itab_entry->access2;

	  if( u->operand[1].access == UD_ACCESS_NONE && u->operand[1].type == UD_OP_IMM )
		u->operand[1].access = UD_ACCESS_READ;
  }

  if( u->operand[1].type != UD_NONE )
  {
	  decode_operand(
		  u,
		  &u->operand[2],
		  u->itab_entry->operand3.type,
		  u->itab_entry->operand3.size
	  );

	  u->operand[2].access = u->itab_entry->access3;

	  if( u->operand[2].access == UD_ACCESS_NONE && u->operand[2].type == UD_OP_IMM )
		u->operand[2].access = UD_ACCESS_READ;
  }

  if( u->operand[2].type != UD_NONE )
  {
	  decode_operand(
		  u,
		  &u->operand[3],
		  u->itab_entry->operand4.type,
		  u->itab_entry->operand4.size
	  );

	  u->operand[3].access = u->itab_entry->access4;

	  if( u->operand[3].access == UD_ACCESS_NONE && u->operand[3].type == UD_OP_IMM )
		u->operand[3].access = UD_ACCESS_READ;
  }

  return 0;
}
/* 
 * decode_operands
 *
 *    Disassemble upto 3 operands of the current instruction being
 *    disassembled. By the end of the function, the operand fields
 *    of the ud structure will have been filled.
 */
decode_operands
Disassemble upto 3 operands of the current instruction being
disassembled. By the end of the function, the operand fields
of the ud structure will have been filled.
decode_operands Disassemble upto 3 operands of the current instruction being disassembled . By the end of the function the operand fields of the ud structure will have been filled .
static int
decode_operands(struct ud* u)
{
  decode_operand(
	  u,
	  &u->operand[0],
	  u->itab_entry->operand1.type,
	  u->itab_entry->operand1.size
  );
  u->operand[0].access = u->itab_entry->access1;
  if( u->operand[0].access == UD_ACCESS_NONE && u->operand[0].type == UD_OP_IMM )
	u->operand[0].access = UD_ACCESS_READ;
  if( u->operand[0].type != UD_NONE )
  {
	  decode_operand(
		  u,
		  &u->operand[1],
		  u->itab_entry->operand2.type,
		  u->itab_entry->operand2.size
	  );
	  u->operand[1].access = u->itab_entry->access2;
	  if( u->operand[1].access == UD_ACCESS_NONE && u->operand[1].type == UD_OP_IMM )
		u->operand[1].access = UD_ACCESS_READ;
  }
  if( u->operand[1].type != UD_NONE )
  {
	  decode_operand(
		  u,
		  &u->operand[2],
		  u->itab_entry->operand3.type,
		  u->itab_entry->operand3.size
	  );
	  u->operand[2].access = u->itab_entry->access3;
	  if( u->operand[2].access == UD_ACCESS_NONE && u->operand[2].type == UD_OP_IMM )
		u->operand[2].access = UD_ACCESS_READ;
  }
  if( u->operand[2].type != UD_NONE )
  {
	  decode_operand(
		  u,
		  &u->operand[3],
		  u->itab_entry->operand4.type,
		  u->itab_entry->operand4.size
	  );
	  u->operand[3].access = u->itab_entry->access4;
	  if( u->operand[3].access == UD_ACCESS_NONE && u->operand[3].type == UD_OP_IMM )
		u->operand[3].access = UD_ACCESS_READ;
  }
  return 0;
}
static int decode_operands ( struct ud * u ) { decode_operand ( u , & u -> operand [ 0 ] , u -> itab_entry -> operand1 . type , u -> itab_entry -> operand1 . size ) ; u -> operand [ 0 ] . access = u -> itab_entry -> access1 ; if ( u -> operand [ 0 ] . access == UD_ACCESS_NONE && u -> operand [ 0 ] . type == UD_OP_IMM ) u -> operand [ 0 ] . access = UD_ACCESS_READ ; if ( u -> operand [ 0 ] . type != UD_NONE ) { decode_operand ( u , & u -> operand [ 1 ] , u -> itab_entry -> operand2 . type , u -> itab_entry -> operand2 . size ) ; u -> operand [ 1 ] . access = u -> itab_entry -> access2 ; if ( u -> operand [ 1 ] . access == UD_ACCESS_NONE && u -> operand [ 1 ] . type == UD_OP_IMM ) u -> operand [ 1 ] . access = UD_ACCESS_READ ; } if ( u -> operand [ 1 ] . type != UD_NONE ) { decode_operand ( u , & u -> operand [ 2 ] , u -> itab_entry -> operand3 . type , u -> itab_entry -> operand3 . size ) ; u -> operand [ 2 ] . access = u -> itab_entry -> access3 ; if ( u -> operand [ 2 ] . access == UD_ACCESS_NONE && u -> operand [ 2 ] . type == UD_OP_IMM ) u -> operand [ 2 ] . access = UD_ACCESS_READ ; } if ( u -> operand [ 2 ] . type != UD_NONE ) { decode_operand ( u , & u -> operand [ 3 ] , u -> itab_entry -> operand4 . type , u -> itab_entry -> operand4 . size ) ; u -> operand [ 3 ] . access = u -> itab_entry -> access4 ; if ( u -> operand [ 3 ] . access == UD_ACCESS_NONE && u -> operand [ 3 ] . type == UD_OP_IMM ) u -> operand [ 3 ] . access = UD_ACCESS_READ ; } return 0 ; }
decode_operands
    Disassemble upto 3 operands of the current instruction being
    disassembled.
decode_operands Disassemble upto 3 operands of the current instruction being disassembled .