1
0
Fork 0
forked from fun/fun

Added some crypto 100% implemented in Fun. (0.11.0)

This commit is contained in:
Johannes Findeisen 2025-09-29 02:36:57 +02:00
commit 12a5646d56
25 changed files with 1926 additions and 12 deletions

View file

@ -33,7 +33,8 @@ static const char *opcode_names[] = {
"ENUMERATE","ZIP",
"MIN","MAX","CLAMP","ABS","POW","RANDOM_SEED","RANDOM_INT",
"MAKE_MAP","KEYS","VALUES","HAS_KEY",
"READ_FILE","WRITE_FILE","ENV"
"READ_FILE","WRITE_FILE","ENV",
"BAND","BOR","BXOR","BNOT","SHL","SHR","ROTL","ROTR"
};
typedef struct {
@ -76,7 +77,7 @@ void vm_dump_globals(VM *vm);
void vm_run(VM *vm, Bytecode *entry);
static inline int opcode_is_valid(int op) {
return op >= OP_NOP && op <= OP_ENV; // all current opcodes
return op >= OP_NOP && op <= OP_ROTR; // all current opcodes
}
#endif