|
|
1.1 ! root 1: /* ! 2: * This routine allocates temporary ! 3: * locations on the stack, adjusting the stack ! 4: * frame temporaty location if necessary. ! 5: */ ! 6: #ifdef vax ! 7: #include "INC$LIB:cc1.h" ! 8: #else ! 9: #include "cc1.h" ! 10: #endif ! 11: ! 12: /* ! 13: * Allocate a new temporary and ! 14: * return a pointer to a TREE node that describes ! 15: * it. The type is set from the type of the node that ! 16: * is going to be stored. The "flag" is true if the ! 17: * node needs to be allocated. ! 18: */ ! 19: TREE * ! 20: tempnode(tp, flag) ! 21: register TREE *tp; ! 22: { ! 23: register TREE *tp1; ! 24: register TYPE ntype; ! 25: register int nbase; ! 26: ! 27: if (flag != 0) ! 28: curtemp += pertype[tp->t_type].p_size; ! 29: ntype = SPTR; ! 30: nbase = BP; ! 31: #if !ONLYSMALL ! 32: if (notvariant(VSMALL)) { ! 33: ntype = LPTR; ! 34: nbase = SSBP; ! 35: } ! 36: #endif ! 37: tp1 = makenode(REG, ntype); ! 38: tp1->t_reg = nbase; ! 39: tp1 = leafnode(tp1); ! 40: tp1 = leftnode(SUB, tp1, ntype, 0); ! 41: tp1->t_rp = ivalnode(curtemp); ! 42: tp1 = leftnode(STAR, tp1, tp->t_type, tp->t_size); ! 43: return (tp1); ! 44: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.