int gensub(int p1, int p2, int swapped) { int rp = PINT; gentext(); if (cgload2() || !swapped) cgswap(); if (!inttype(p1) && !inttype(p2) && p1 != p2) error("incompatible pointer types in binary '-'", NULL); if (ptr(p1) && !ptr(p2)) { if (needscale(p1)) { if ( (p1 & STCMASK) == STCPTR || (p1 & STCMASK) == UNIPTR ) cgscale2by(objsize(deref(p1), TVARIABLE, 1)); else cgscale2(); } rp = p1; } cgsub(); if (needscale(p1) && needscale(p2)) { if ( (p1 & STCMASK) == STCPTR || (p1 & STCMASK) == UNIPTR ) cgunscaleby(objsize(deref(p1), TVARIABLE, 1)); else cgunscale(); } return rp; }
void genmod(int swapped) { gentext(); if (cgload() || !swapped) cgswap(); cgmod(); }
void gendiv(int swapped) { gentext(); if (cgload() || !swapped) cgswap(); cgdiv(); }
void genshr(int swapped) { gentext(); if (cgload() || !swapped) cgswap(); cgshr(); }
void genshl(int swapped) { gentext(); if (cgload2() || !swapped) cgswap(); cgshl(); }