eDebugPush,
eDebugPop,
eEOC,
- eUnroll2,
+ eVM_IN,
eOP_MAX,
- eDotTmplVal,
};
#define RegSetImm (f_instr)eRegSetImm
#define DebugPush (f_instr)eDebugPush
#define DebugPop (f_instr)eDebugPop
#define EOC (f_instr)eEOC
-#define Unroll2 (f_instr)eUnroll2
+#define VM_IN (f_instr)eVM_IN
#define OP_MAX (f_instr)eOP_MAX
-#define DotTmplVal (f_instr)eDotTmplVal
#ifndef __cplusplus
ANN static inline void dump_opcodes(const VM_Code code) {
gw_out("{Y}┏━━━━┓{0}{-Y} {+}%s{0}\n{Y}┃{0}\n", code->name);
gw_out("{Y}┃{0}{-}% 4lu{0}: EOC ", j);
gw_out("\n");
break;
- case eUnroll2:
- gw_out("{Y}┃{0}{-}% 4lu{0}: Unroll2 ", j);
+ case eVM_IN:
+ gw_out("{Y}┃{0}{-}% 4lu{0}: VM_IN ", j);
gw_out("\n");
break;
case eOP_MAX:
gw_out("{Y}┃{0}{-}% 4lu{0}: OP_MAX ", j);
- gw_out(" {-R}%-14p{0}", instr->m_val);
- gw_out("\n");
- break;
- case eDotTmplVal:
- gw_out("{Y}┃{0}{-}% 4lu{0}: DotTmplVal ", j);
gw_out("\n");
break;
}
const m_uint end = emit_code_size(emit);
for (m_uint i = 1; i < loop->n; ++i) CHECK_BB(unroll_run(emit, loop));
unroll->m_val2 = end - start;
- const Instr unroll2 = emit_add_instr(emit, Unroll2);
+ const Instr unroll2 = emit_add_instr(emit, VM_IN);
unroll2->m_val = (m_uint)unroll;
scoped_end(emit);
return GW_OK;
&&unionother, &&unionaddr, &&staticint, &&staticfloat, &&staticother,
&&dotfunc, &&gacktype, &&gackend, &&gack, &&try_ini,
&&try_end, &&handleeffect, &&performeffect, &&noop, &&debugline,
- &&debugvalue, &&debugpush, &&debugpop, &&eoc, &&unroll2, &&other,
- &®pushimm};
+ &&debugvalue, &&debugpush, &&debugpop, &&eoc, &&vmin, &&other};
+// &®pushimm};
if(!prepare_code) {
PRAGMA_PUSH()
gack:
VM_OUT
gack(shred, VAL);
- goto in;
+ goto vmin;
try_ini:
if (!shred->info->frame.ptr) // ???
vector_init(&shred->info->frame);
DISPATCH();
other:
VM_OUT((f_instr)VAL2)(shred, (Instr)VAL);
- unroll2:
- in:
+ vmin:
if (!s->curr) break;
bytecode = (code = shred->code)->bytecode;
reg = shred->reg;
&&_unionother, &&_unionaddr, &&_staticint, &&_staticfloat, &&_staticother,
&&_dotfunc, &&_gacktype, &&_gackend, &&_gack, &&_try_ini,
&&_try_end, &&_handleeffect, &&_performeffect, &&_noop, &&_debugline,
- &&_debugvalue, &&_debugpush, &&_debugpop, &&_eoc, &&_unroll2, &&_other,
- &&_regpushimm};
+ &&_debugvalue, &&_debugpush, &&_debugpop, &&_eoc, &&_vmin, &&_other};
#define PREPARE(a) \
_##a: \
prepare_code += BYTECODE_SZ;\
goto *_dispatch[*(m_bit*)prepare_code];
}
- PREPARE(unroll2);
+ PREPARE(vmin);
PREPARE(debugline);
PREPARE(debugvalue);
PREPARE(debugpush);