#pragma once #include "arch.h" static inline const char* op_str(Op op) { switch (op) { case Op_Nop: return "nop"; case Op_Hlt: return "hlt"; case Op_Jmp: return "jmp"; case Op_Jnz: return "jnz"; case Op_Test: return "test"; case Op_Cmp: return "cmp"; case Op_Mov8: return "mov8"; case Op_Mov16: return "mov16"; case Op_In: return "in"; case Op_Out: return "out"; case Op_Call: return "call"; case Op_Ret: return "ret"; case Op_Lit: return "lit"; case Op_Int: return "int"; case Op_Or: return "or"; case Op_Xor: return "xor"; case Op_And: return "and"; case Op_Shl: return "shl"; case Op_RShl: return "rshl"; case Op_Shr: return "shr"; case Op_RShr: return "rshr"; case Op_Add: return "add"; case Op_Sub: return "sub"; case Op_RSub: return "rsub"; case Op_Mul: return "mul"; case Op_IMul: return "imul"; case Op_Div: return "div"; case Op_IDiv: return "idiv"; case Op_RDiv: return "rdiv"; case Op_RIDiv: return "ridiv"; case Op_Mod: return "mod"; case Op_RMod: return "rmod"; } return "---"; }