Branch: Tag:

2000-04-21

2000-04-21 00:29:48 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more opcodes formalized..

Rev: src/interpret.c:1.145
Rev: src/interpret_functions.h:1.15
Rev: src/interpreter.h:1.43
Rev: src/lex.c:1.77
Rev: src/peep.c:1.31

1: +    #undef GET_ARG   #undef GET_ARG2   
151:    INT32 arg1=GET_ARG(); \    INT32 arg2=GET_ARG2();    +    #define OPCODE0_TAIL(OP,DESC) CASE(OP);   #define OPCODE1_TAIL(OP,DESC) CASE(OP);   #define OPCODE2_TAIL(OP,DESC) CASE(OP);    -  + #define OPCODE0_JUMP(OP,DESC) CASE(OP); {    -  + /* These are something of a special case as they +  * requires a POINTER stored explicitly after +  * the instruction itself. +  */ + #define OPCODE1_JUMP(OP,DESC) CASE(OP); { \ +  INT32 arg1=GET_ARG(); \ +  + #define OPCODE2_JUMP(OP,DESC) CASE(OP); { \ +  INT32 arg1=GET_ARG(); \ +  INT32 arg2=GET_ARG2(); +  + #define OPCODE0_TAILJUMP(OP,DESC) CASE(OP); + #define OPCODE1_TAILJUMP(OP,DESC) CASE(OP); + #define OPCODE2_TAILJUMP(OP,DESC) CASE(OP); +  +  +    #define BREAK break; }      #include "interpret_functions.h"