ARMv8/src/a64instruction.h
2024-06-04 15:09:53 +01:00

31 lines
896 B
C

#ifndef __A64INSTRUCTION__
#define __A64INSTRUCTION__
#include "a64instruction_DPImmediate.h"
#include "a64instruction_DPRegister.h"
#include "a64instruction_Branch.h"
#include "a64instruction_SingleTransfer.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_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;
} data;
} a64inst_instruction;
#endif