From 43f662221b77a5b04582fed63a8d02c3a5df9191 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 28 Sep 2011 10:07:37 +0000 Subject: [PATCH] Instructions can be encoded and decoded with up to five operands --- include/Asm/arch.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/Asm/arch.h b/include/Asm/arch.h index e847f5d..3a6031c 100644 --- a/include/Asm/arch.h +++ b/include/Asm/arch.h @@ -81,11 +81,11 @@ typedef enum _ArchOperandType # define AOI_REFERS_FUNCTION 0x2 /* macros */ -# define AO_0() AOT_NONE, AOT_NONE, AOT_NONE -# define AO_1(op1) op1, AOT_NONE, AOT_NONE -# define AO_2(op1, op2) op1, op2, AOT_NONE +# define AO_0() AOT_NONE, AOT_NONE, AOT_NONE, 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, AOT_NONE, AOT_NONE # 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_OFFSET(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 op2; ArchOperandDefinition op3; + ArchOperandDefinition op4; + ArchOperandDefinition op5; } ArchInstruction; typedef struct _ArchInstructionCall { char const * name; - ArchOperand operands[3]; + ArchOperand operands[5]; uint32_t operands_cnt; /* meta information */