|
|
1.1 ! root 1: /* ! 2: * This file contains a number ! 3: * of machine specific tree modification ! 4: * functions. These are for the SMALL ! 5: * and LARGE model Intel iAPX-86. ! 6: */ ! 7: #ifdef vax ! 8: #include "INC$LIB:cc1.h" ! 9: #else ! 10: #include "cc1.h" ! 11: #endif ! 12: ! 13: /* ! 14: * This routine figures out ! 15: * the left subgoal context. It watches ! 16: * for `test' instructions on the ! 17: * 8086. ! 18: */ ! 19: getldown(tp, c) ! 20: TREE *tp; ! 21: { ! 22: if (c==MFLOW && (tp->t_rp->t_flag&T_IMM)!=0) ! 23: return (MRADDR); ! 24: return (MRVALUE); ! 25: } ! 26: ! 27: /* ! 28: * This routine figures out the ! 29: * right hand subgoal contexts for the ! 30: * shift instruction. ! 31: */ ! 32: getrdown(tp, c) ! 33: TREE *tp; ! 34: { ! 35: register op; ! 36: ! 37: if ((op=tp->t_rp->t_op)==ICON || op==LCON) ! 38: return (MRADDR); ! 39: return (MRVALUE); ! 40: } ! 41: ! 42: /* ! 43: * Fix up the type of a reordered ! 44: * ADD node. Watch for pointers. ! 45: */ ! 46: fixaddtype(tp) ! 47: TREE *tp; ! 48: { ! 49: register tt; ! 50: register lt, rt; ! 51: ! 52: lt = tp->t_lp->t_type; ! 53: rt = tp->t_rp->t_type; ! 54: if (ispoint(lt)) ! 55: tt = lt; ! 56: else if (ispoint(rt)) ! 57: tt = rt; ! 58: else if (islong(lt)) ! 59: tt = lt; ! 60: else if (islong(rt)) ! 61: tt = rt; ! 62: else ! 63: tt = lt; ! 64: tp->t_type = tt; ! 65: } ! 66: ! 67: /* ! 68: * Zap the type field of tree ! 69: * node `tp' into the type used for ! 70: * offset addressing trees. ! 71: */ ! 72: setofstype(tp) ! 73: TREE *tp; ! 74: { ! 75: #if !ONLYSMALL ! 76: if (notvariant(VSMALL)) ! 77: tp->t_type = LOFS; ! 78: else ! 79: #endif ! 80: tp->t_type = SOFS; ! 81: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.