Annotation of coherent/b/bin/c/n1/i386/mtree4.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * n1/i386/mtree4.c
                      3:  * Machine specific tree modification functions.
                      4:  * i386.
                      5:  */
                      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 the left subgoal context.
                     15:  * It watches for 'test' instructions on the 8086.
                     16:  */
                     17: getldown(tp, c)
                     18: TREE *tp;
                     19: {
                     20:        return (c==MFLOW && (tp->t_rp->t_flag&T_IMM)!=0) ? MRADDR : MRVALUE;
                     21: }
                     22: 
                     23: /*
                     24:  * This routine figures out the right hand subgoal contexts
                     25:  * for the shift instruction.
                     26:  */
                     27: getrdown(tp, c)
                     28: TREE *tp;
                     29: {
                     30:        register int op;
                     31: 
                     32:        return ((op=tp->t_rp->t_op)==ICON || op==LCON) ? MRADDR : MRVALUE;
                     33: }
                     34: 
                     35: /*
                     36:  * Fix up the type of a reordered ADD node.
                     37:  * Watch for pointers.
                     38:  */
                     39: fixaddtype(tp)
                     40: TREE *tp;
                     41: {
                     42:        register tt;
                     43:        register lt, rt;
                     44: 
                     45:        lt = tp->t_lp->t_type;
                     46:        rt = tp->t_rp->t_type;
                     47:        if (ispoint(lt))
                     48:                tt = lt;
                     49:        else if (ispoint(rt))
                     50:                tt = rt;
                     51:        else if (islong(lt))
                     52:                tt = lt;
                     53:        else if (islong(rt))
                     54:                tt = rt;
                     55:        else
                     56:                tt = lt;
                     57:        tp->t_type = tt;
                     58: }
                     59: 
                     60: /*
                     61:  * Zap the type field of tree node 'tp'
                     62:  * into the type used for offset addressing trees.
                     63:  */
                     64: setofstype(tp)
                     65: TREE *tp;
                     66: {
                     67:        tp->t_type = OFFS;
                     68: }
                     69: 
                     70: /* end of n1/i386/mtree4.c */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.