Instructions can be encoded and decoded with up to five operands

This commit is contained in:
Pierre Pronchery 2011-09-28 10:07:37 +00:00
parent 545be0d170
commit 43f662221b

View File

@ -81,11 +81,11 @@ typedef enum _ArchOperandType
# define AOI_REFERS_FUNCTION 0x2 # define AOI_REFERS_FUNCTION 0x2
/* macros */ /* macros */
# define AO_0() AOT_NONE, AOT_NONE, AOT_NONE # define AO_0() AOT_NONE, AOT_NONE, AOT_NONE, AOT_NONE, AOT_NONE
# define AO_1(op1) op1, AOT_NONE, AOT_NONE # define AO_1(op1) op1, AOT_NONE, AOT_NONE, AOT_NONE, AOT_NONE
# define AO_2(op1, op2) op1, op2, AOT_NONE # define AO_2(op1, op2) op1, op2, AOT_NONE, AOT_NONE, AOT_NONE
# define AO_3(op1, op2, op3) \ # define AO_3(op1, op2, op3) \
op1, op2, op3 op1, op2, op3, AOT_NONE, AOT_NONE
# define AO_GET_FLAGS(operand) ((operand & AOM_FLAGS) >> AOD_FLAGS) # define AO_GET_FLAGS(operand) ((operand & AOM_FLAGS) >> AOD_FLAGS)
# define AO_GET_OFFSET(operand) ((operand & AOM_OFFSET) >> AOD_OFFSET) # define AO_GET_OFFSET(operand) ((operand & AOM_OFFSET) >> AOD_OFFSET)
# define AO_GET_DSIZE(operand) ((operand & AOM_OFFSET) >> AOD_OFFSET) # define AO_GET_DSIZE(operand) ((operand & AOM_OFFSET) >> AOD_OFFSET)
@ -168,12 +168,14 @@ typedef struct _ArchInstruction
ArchOperandDefinition op1; ArchOperandDefinition op1;
ArchOperandDefinition op2; ArchOperandDefinition op2;
ArchOperandDefinition op3; ArchOperandDefinition op3;
ArchOperandDefinition op4;
ArchOperandDefinition op5;
} ArchInstruction; } ArchInstruction;
typedef struct _ArchInstructionCall typedef struct _ArchInstructionCall
{ {
char const * name; char const * name;
ArchOperand operands[3]; ArchOperand operands[5];
uint32_t operands_cnt; uint32_t operands_cnt;
/* meta information */ /* meta information */