Mon 16 Mar 11:09:06 CET 2026
This commit is contained in:
parent
b207db59aa
commit
2513a22a7e
41
src/ops.c
Normal file
41
src/ops.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "config.h"
|
||||
#include "types.h"
|
||||
#include "ops.h"
|
||||
|
||||
/*
|
||||
Variable VM instruction operand sizes, must be consistent with ops_t enumeration (ops.h)
|
||||
*/
|
||||
|
||||
const index_t ops_s[] = {
|
||||
0,
|
||||
// ADD=1, DIV, MUL, SUB, NEG, MOD,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
// AND, OR, NOT,
|
||||
0, 0, 0,
|
||||
// EQ, NEQ, LT, GT, LE, GE, CMPS,
|
||||
0, 0, 0, 0, 0, 0, 0,
|
||||
// DROPD, DROPF,
|
||||
index_s, index_s,
|
||||
// PUSHD, PUSHF, NTHD, NTHF, TOF, SETF, SETSP, INCSP,
|
||||
number_s, number_s, index_s, index_s, index_s, index_s, index_s, index_s,
|
||||
// INCHAR, INNUMBER, INSTRING, INARRAY,
|
||||
0, 0, 0, 0,
|
||||
// OUTCHAR, OUTNUMBER, OUTSTRING, OUTARRY,
|
||||
0, 0, 0, 0,
|
||||
// STRING
|
||||
index_s,
|
||||
// JMP JZ, JNZ, TESTRANGE, LOOP,
|
||||
address_s, address_s, address_s, 2*index_s, 0,
|
||||
// READ, WRITE, READS, WRITES, DATA, EVENT, ERR, EMIT,
|
||||
address_s, address_s, address_s, address_s, index_s, address_s, address_s, index_s,
|
||||
// INTERRUPT, RESUME, CALL, CCALL, PROC, FUNC, RETURN, FORK, YIELD
|
||||
index_s, index_s, address_s, index_s, index_s, index_s, index_s, 0, 0,
|
||||
#if HAS_LOCK > 0
|
||||
// LOCK, UNLOCK
|
||||
address_s, address_s,
|
||||
#endif
|
||||
// END, ENV
|
||||
0, index_s
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user