37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#ifndef __A64INSTRUCTION__
|
|
#define __A64INSTRUCTION__
|
|
#include "a64instruction_DPImmediate.h"
|
|
#include "a64instruction_DPRegister.h"
|
|
#include "a64instruction_Branch.h"
|
|
#include "a64instruction_SingleTransfer.h"
|
|
#include "a64instruction_Label.h"
|
|
#include "a64instruction_Directive.h"
|
|
|
|
// Define the types of instructions in subset of the AArch64 Instruction Set implemented.
|
|
// Each type is defined by the format of the instruction's operand(s).
|
|
typedef enum {
|
|
a64inst_DPIMMEDIATE,
|
|
a64inst_DPREGISTER,
|
|
a64inst_SINGLETRANSFER,
|
|
a64inst_LOADLITERAL,
|
|
a64inst_BRANCH,
|
|
a64inst_HALT,
|
|
a64inst_LABEL,
|
|
a64inst_DIRECTIVE
|
|
} a64inst_type;
|
|
|
|
// Structure the holds the type and operand data of an instruction
|
|
typedef struct {
|
|
a64inst_type type;
|
|
union {
|
|
a64inst_DPImmediateData DPImmediateData;
|
|
a64inst_DPRegisterData DPRegisterData;
|
|
a64inst_BranchData BranchData;
|
|
a64inst_SingleTransferData SingleTransferData;
|
|
a64inst_LabelData LabelData;
|
|
a64inst_DirectiveData DirectiveData;
|
|
} data;
|
|
} a64inst_instruction;
|
|
|
|
#endif
|