asm: add instruction opcode/operand definition table
This commit is contained in:
@@ -3,6 +3,26 @@
|
||||
|
||||
#include <ivy/opcode.h>
|
||||
|
||||
enum ivy_instr_operand_type {
|
||||
IVY_OPERAND_NONE = 0,
|
||||
IVY_INSTR_OPERAND_CONST,
|
||||
IVY_INSTR_OPERAND_REGISTER,
|
||||
IVY_INSTR_OPERAND_SELF_INDEX_REG,
|
||||
IVY_INSTR_OPERAND_SELF_INDEX_CONST,
|
||||
IVY_INSTR_OPERAND_POOL_INDEX_REG,
|
||||
IVY_INSTR_OPERAND_POOL_INDEX_CONST,
|
||||
IVY_INSTR_OPERAND_SP_INDEX_REG,
|
||||
IVY_INSTR_OPERAND_SP_INDEX_CONST,
|
||||
IVY_INSTR_OPERAND_BP_INDEX_REG,
|
||||
IVY_INSTR_OPERAND_BP_INDEX_CONST,
|
||||
};
|
||||
|
||||
struct ivy_instr_definition {
|
||||
enum ivy_instr_id i_id;
|
||||
enum ivy_opcopde i_opcode;
|
||||
enum ivy_instr_operand_type i_operand[3];
|
||||
};
|
||||
|
||||
struct ivy_instr {
|
||||
enum ivy_opcode i_op;
|
||||
long i_a0;
|
||||
|
||||
Reference in New Issue
Block a user