42 lines
1.0 KiB
C
42 lines
1.0 KiB
C
#include <stdbool.h>
|
|
#include "a64instruction_global.h"
|
|
#include "global.h"
|
|
|
|
typedef enum {
|
|
a64inst_UNCONDITIONAL = 0,
|
|
a64inst_REGISTER = 3,
|
|
a64inst_CONDITIONAL = 1
|
|
} 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;
|