aboutsummaryrefslogtreecommitdiff
path: root/src/as_op.h
blob: 3dd546ef589a5bc10e1befc9bba99716a689536e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef FVM_AS_OP_H_
#define FVM_AS_OP_H_

enum op {
    OP_SP, OP_SSP, OP_BP, OP_SBP, OP_PC, OP_RV, OP_SRV,
    OP_IMM, OP_REL,
    OP_LD8, OP_LD16, OP_LD32, OP_LD,
    OP_ST8, OP_ST16, OP_ST32, OP_ST,
    OP_DUP, OP_POP, OP_SWAP, OP_OVER, OP_ROT,
    OP_ADD, OP_SUB, OP_DIV, OP_MUL, OP_MOD,
    OP_SHR, OP_SHL, OP_SAR,
    OP_AND, OP_OR, OP_NOT,
    OP_BITAND, OP_BITOR, OP_XOR, OP_INVERT,
    OP_GT, OP_LT, OP_GE, OP_LE, OP_EQ, OP_NEQ,
    OP_JMP, OP_JZ, OP_JNZ, OP_RET, OP_CALL, OP_SYSCALL,
    OP_FADD, OP_FSUB, OP_FMUL, OP_FDIV,
    OP_FGE, OP_FGT, OP_FLE, OP_FLT, OP_FEQ, OP_FNEQ,
    OP_FTI, OP_ITF,
    OP_EXIT,
    OP_LDARG, OP_LDVAR, OP_STARG, OP_STVAR,
    OP_END
};
typedef enum op op;

enum op str2op(const char *str);
int isOp(const char *str);
int op_size(op op);
int is_pseudo_op(op op);

#endif