#include #include "a64instruction_global.h" #include "a64instruction_DP.h" // Denotes the type of data processing operation typedef enum { a64inst_DPR_ARITHMLOGIC, a64inst_DPR_MULTIPLY } a64inst_DPROpType; // Denotes the logical operations supported by the architecture typedef enum { a64inst_AND = 0, a64inst_OR = 1, a64inst_XOR = 2, a64inst_AND_FLAGGED = 3 } a64inst_logicOp; // Denotes the different kinds of shifts supported by the architecture typedef enum { a64inst_LSL = 0, a64inst_LSR = 1, a64inst_ASR = 2, a64inst_ROR = 3 } a64inst_ShiftType; // Holds data specific to arithmetic/logic register data processing instructions typedef struct { enum { a64inst_DPR_ARITHM = 0, a64inst_DPR_LOGIC = 1 } type; a64inst_ShiftType shiftType; bool negShiftedSrc2; // Guaranteed to be 0 for arithmetic instructions } a64inst_DPRegister_ArithmLogicData; // Holds data specific to multiply register data processing instructions typedef struct { bool negProd; a64inst_regSpecifier summand; } a64inst_DPRegister_MultiplyData; // Holds data for register data processing instructions typedef struct { a64inst_regType regType; a64inst_DPROpType DPROpType; union { a64inst_logicOp logicOp; a64inst_arithmOp arithmOp; } processOp; a64inst_regSpecifier src2; union { a64inst_DPRegister_ArithmLogicData arithmLogicData; a64inst_DPRegister_MultiplyData multiplydata; } processOpData; a64inst_regSpecifier src1; a64inst_regSpecifier dest; } a64inst_DPRegisterData;