4 static void _genLabel(iCode *ic)
6 iemit("!tlabeldef", IC_LABEL(ic)->key + 100);
9 static void _genGoto(iCode *ic)
11 iemit("jp !tlabel", IC_LABEL(ic)->key+100);
14 static void _genFunction(iCode *ic)
16 symbol *sym = OP_SYMBOL(IC_LEFT(ic));
18 // Create the function header
19 iemit("!functionheader", sym->name);
20 iemit("!functionlabeldef", sym->rname);
23 iemit("!enterx", sym->stack);
30 static void _genReturn(iCode *ic)
33 // Has a return value. Load it up.
34 iemit("; PENDING: call the generic loader to setup the return value.");
37 if (ic->next && ic->next->op == LABEL && IC_LABEL(ic->next) == returnLabel) {
38 // The next label is the return label. Dont bother emitting a jump.
41 iemit("jp !tlabel", returnLabel->key+100);
45 static EMITTER _base_emitters[] = {
48 { FUNCTION, _genFunction },
49 { RETURN, _genReturn },
53 void izt_initBaseEmitters(hTab **into)
55 izt_addEmittersToHTab(into, _base_emitters);