Added structs to represent labels and directives for assembler
This commit is contained in:
parent
379dedc6ce
commit
120b492a48
@ -4,6 +4,8 @@
|
||||
#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).
|
||||
@ -13,7 +15,9 @@ typedef enum {
|
||||
a64inst_SINGLETRANSFER,
|
||||
a64inst_LOADLITERAL,
|
||||
a64inst_BRANCH,
|
||||
a64inst_HALT
|
||||
a64inst_HALT,
|
||||
a64inst_LABEL,
|
||||
a64inst_DIRECTIVE
|
||||
} a64inst_type;
|
||||
|
||||
// Structure the holds the type and operand data of an instruction
|
||||
@ -24,6 +28,8 @@ typedef struct {
|
||||
a64inst_DPRegisterData DPRegisterData;
|
||||
a64inst_BranchData BranchData;
|
||||
a64inst_SingleTransferData SingleTransferData;
|
||||
a64inst_LabelData LabelData;
|
||||
a64inst_DirectiveData DirectiveData;
|
||||
} data;
|
||||
} a64inst_instruction;
|
||||
|
||||
|
||||
5
src/a64instruction_Directive.h
Normal file
5
src/a64instruction_Directive.h
Normal file
@ -0,0 +1,5 @@
|
||||
include "global.h"
|
||||
|
||||
typedef struct {
|
||||
dword value;
|
||||
} a64inst_DirectiveData;
|
||||
3
src/a64instruction_Label.h
Normal file
3
src/a64instruction_Label.h
Normal file
@ -0,0 +1,3 @@
|
||||
typedef struct {
|
||||
char* label;
|
||||
} a64inst_LabelData;
|
||||
Loading…
Reference in New Issue
Block a user