opcodes + refined int structure
This commit is contained in:
@@ -23,10 +23,11 @@
|
||||
#include "globals.h"
|
||||
|
||||
#define OPCODE struct __opcode
|
||||
struct __int_data;
|
||||
|
||||
#define OP_STRUCT_FIELD(name) struct __op_##name name;
|
||||
#define OP_ENUM_FIELD(name) name ,
|
||||
#define OP_FUNC_DECL(name) void opfunc_##name (OPCODE);
|
||||
#define OP_FUNC_DECL(name) void opfunc_##name (OPCODE, struct __int_data *);
|
||||
|
||||
/** A single bytecode instruction is 32bit wide and has an 8bit opcode field
|
||||
and several operand of 8 of 16 bit.*/
|
||||
@@ -35,7 +36,7 @@
|
||||
#define T_IDX uint8_t /** index values */
|
||||
|
||||
OPCODE;
|
||||
typedef void (*opfunc)(OPCODE);
|
||||
typedef void (*opfunc)(OPCODE, struct __int_data *);
|
||||
|
||||
#define OP_LOOPS(op) \
|
||||
op(loop_inf) \
|
||||
@@ -57,7 +58,8 @@ typedef void (*opfunc)(OPCODE);
|
||||
op(varg_2_end) \
|
||||
op(varg_3) \
|
||||
op(varg_3_end) \
|
||||
op(retval)
|
||||
op(retval)\
|
||||
op(ret)
|
||||
|
||||
#define OP_ASSIGNMENTS(op) \
|
||||
op(assignment) \
|
||||
@@ -147,7 +149,7 @@ OPCODE
|
||||
}
|
||||
__packed;
|
||||
|
||||
void save_op_data (OPCODE);
|
||||
void save_op_data (int, OPCODE);
|
||||
|
||||
#endif /* OPCODES_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user