Add Branch internal structure, w/ T

This commit is contained in:
sBubshait 2024-05-31 16:46:59 +01:00
parent 94815c838c
commit 3ce2d8d0f2

View 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;