59 lines
841 B
C
59 lines
841 B
C
#ifndef OPCODE_H
|
|
#define OPCODE_H
|
|
|
|
#include "opcodeList.h"
|
|
#include "types.h"
|
|
|
|
typedef union BIG opcode_t {
|
|
struct BIG {
|
|
unsigned nArgs:2;
|
|
unsigned op:6;
|
|
unsigned arg0:8;
|
|
unsigned arg1:8;
|
|
};
|
|
struct BIG {
|
|
unsigned:8;
|
|
unsigned char args[2];
|
|
};
|
|
struct BIG {
|
|
unsigned:8;
|
|
signed imm:16;
|
|
};
|
|
char bytes[3];
|
|
} opcode_t;
|
|
|
|
typedef union BIG opcode_ext_t {
|
|
struct BIG {
|
|
unsigned nArgs:2;
|
|
unsigned ext:6;
|
|
unsigned op:8;
|
|
unsigned arg0:8;
|
|
unsigned arg1:8;
|
|
};
|
|
struct BIG {
|
|
unsigned:16;
|
|
unsigned char args[2];
|
|
};
|
|
struct BIG {
|
|
unsigned:16;
|
|
signed imm:16;
|
|
};
|
|
char bytes[4];
|
|
} opcode_ext_t;
|
|
|
|
typedef struct opcode_data_t {
|
|
char nArgs;
|
|
char ext;
|
|
unsigned char op;
|
|
unsigned char argc;
|
|
union {
|
|
struct {
|
|
proc_object_t arg0;
|
|
proc_object_t arg1;
|
|
};
|
|
proc_object_t args[2];
|
|
};
|
|
} opcode_data_t;
|
|
|
|
#endif
|