Add Branch internal structure, w/ T
This commit is contained in:
parent
94815c838c
commit
3ce2d8d0f2
41
src/a64instruction_Branch.h
Normal file
41
src/a64instruction_Branch.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include <stdbool.h>
|
||||||
|
#include "a64instruction_global.h"
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
a64inst_UNCONDITIONAL = 0,
|
||||||
|
a64inst_REGISTER = 1,
|
||||||
|
a64inst_CONDITIONAL = 2
|
||||||
|
} a64inst_BranchType;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
word unconditionalOffset;
|
||||||
|
} a64inst_Branch_UnconditionalData;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
a64inst_regSpecifier src;
|
||||||
|
} a64inst_Branch_RegisterData;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
EQ = 0, // Equal
|
||||||
|
NE = 1, // Not Equal
|
||||||
|
GE = 10, // Signed greater or equal
|
||||||
|
LT = 11, // Signed less than
|
||||||
|
GT = 12, // Signed greater than
|
||||||
|
LE = 13, // signed less than or equal
|
||||||
|
AL = 14 // Always
|
||||||
|
} a64inst_ConditionType; //a64inst_Branch_ConditionType?
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
a64inst_ConditionType cond;
|
||||||
|
word offset;
|
||||||
|
} a64inst_Branch_ConditionalData;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
a64inst_BranchType BranchType;
|
||||||
|
union {
|
||||||
|
a64inst_Branch_UnconditionalData unconditionalData;
|
||||||
|
a64inst_Branch_RegisterData registerData;
|
||||||
|
a64inst_Branch_ConditionalData conditionalData;
|
||||||
|
} processOpData;
|
||||||
|
} a64inst_BranchData;
|
||||||
Loading…
Reference in New Issue
Block a user