Annotation of researchv9/cmd/sun/pcc/machdep2.h, revision 1.1

1.1     ! root        1: /*     @(#)machdep2.h 1.1 86/02/03 SMI */
        !             2: 
        !             3: /*
        !             4:  * Copyright (c) 1985 by Sun Microsystems, Inc.
        !             5:  */
        !             6: 
        !             7: #ifdef VAX
        !             8: extern int fregs;
        !             9: extern int maxargs;
        !            10: #else
        !            11: # define SAVEREGION 8 /* number of bytes for save area */
        !            12: #endif
        !            13: 
        !            14: extern SUTYPE fregs;
        !            15: 
        !            16: #ifdef VAX
        !            17: # define BYTEOFF(x) ((x)&03)
        !            18: #else
        !            19: # define BYTEOFF(x) ((x)&01)
        !            20: #endif
        !            21: # define wdal(k) (BYTEOFF(k)==0)
        !            22: # define BITOOR(x) ((x)>>3)  /* bit offset to oreg offset */
        !            23: 
        !            24: 
        !            25: #ifdef VAX
        !            26: # define REGSZ 16
        !            27: # define TMPREG FP
        !            28: #else
        !            29: # define REGSZ (3*8) /* three banks of eight each */
        !            30: /* # define FREETEMP */ /* define these for temporaries at SP+(offset) */
        !            31: /* # define TMPREG SP */
        !            32: # define TMPREG A6
        !            33: # define TMPMAX (0x7fff*8) /* temps must be addressable by 16-bit offset */
        !            34:                           /* temp addressing is internally in bits      */
        !            35: #endif
        !            36: 
        !            37: #define R2REGS   /* permit double indexing */
        !            38: 
        !            39: # define STOARG(p)     /* just evaluate the arguments, and be done with it... */
        !            40: # define STOFARG(p)
        !            41: # define STOSTARG(p)
        !            42: # define genfcall(a,b) gencall(a,b)
        !            43: 
        !            44: # define NESTCALLS
        !            45: 
        !            46: # define MYREADER(p) myreader(p)
        !            47: int optim2();
        !            48: #ifdef VAX
        !            49: # define special(a, b) 0
        !            50: #endif
        !            51: 
        !            52: 
        !            53: #ifndef VAX
        !            54:        /* shape for constants between -128 and 127 */
        !            55: /* # define SCCON (SPECIAL+100) */
        !            56:        /* shape for constants between 0 and 32767 */
        !            57: # define SICON (SPECIAL+101)
        !            58:        /* shape for constants between 1 and 8 */
        !            59: # define S8CON (SPECIAL+102)
        !            60:        /* shape for appropriate FLD nodes (should be using MULTILEVEL here, but .. */
        !            61: #define SPEC_FLD (SPECIAL+103)
        !            62: #define SPEC_FLT (SPECIAL+104)
        !            63: #define SPEC_DFLT (SPECIAL+105)
        !            64: #define SBASE (SPECIAL+106)
        !            65: #define SXREG (SPECIAL+107)
        !            66: #define SNONPOW2 (SPECIAL+108)
        !            67: #define SFLOAT_SRCE (SPECIAL+109)
        !            68: #define SPEC_PVT (SPECIAL+110)
        !            69: #define SAUTOINC (SPECIAL+111)
        !            70: #define SZEROLB (SPECIAL+112)
        !            71: #define SFZERO (SPECIAL+113)
        !            72: 
        !            73: 
        !            74: #define fltused _fltused
        !            75: extern int fltused, usesky;
        !            76: extern int chk_ovfl;
        !            77: 
        !            78: #define R2UPKFLGS(flags,shortx,ibit,scale)\
        !            79: {      scale = flags&15;\
        !            80:        flags >>= 4;\
        !            81:        ibit = flags&1;\
        !            82:        flags >>= 1;\
        !            83:        shortx = flags&1;\
        !            84: }
        !            85: 
        !            86: #define R2PACKFLGS(flags,shortx,ibit,scale)\
        !            87: {      flags = shortx;\
        !            88:        flags <<= 1;\
        !            89:        flags |= ibit;\
        !            90:        flags <<= 4;\
        !            91:        flags |= scale;\
        !            92: }
        !            93: 
        !            94: /* 
        !            95:  * this stuff is for dealing with compound su-numbers: they are 4 chars
        !            96:  * in a struct. Three are currently used.
        !            97:  * They represent the number of registers of each of the (three) types
        !            98:  * necessary to carry out a calculation.
        !            99:  */
        !           100: 
        !           101: #define SUPRINT( v ) printf(", SU = (%d,%d,%d)\n", v.d, v.a, v.f)
        !           102: #define SUTOOBIG( v ) (v.d>fregs.d || v.a>fregs.a || v.f>fregs.f)
        !           103: #define SUSUM( v ) (v.d + v.a + v.f)
        !           104: #define SUTEST( v ) (SUSUM(v) != 0)
        !           105: #define SUGT( a, b) (SUSUM(a) > SUSUM(b))
        !           106: 
        !           107: 
        !           108: /*
        !           109:  * tags for identifying machine-specific code templates in table.c
        !           110:  */
        !           111: 
        !           112: #define OP68020    0x80000000  /* match only if(use68020)   */
        !           113: #define NO68020    0x40000000  /* match only if(!use68020)  */
        !           114: #define OP68881    0x20000000  /* match only if(use68881)   */
        !           115: #define NO68881    0x10000000  /* match only if(!use68881)  */
        !           116: #define OP68SPEC   0xf0000000  /* mask out all of the above */
        !           117: 
        !           118: #endif not VAX
        !           119: 
        !           120: #define szty(t)        ((t)==DOUBLE? 2 : 1)
        !           121: #define needpair(r,t) ((t)==DOUBLE && !iscreg(r))
        !           122: #define rewfld(p)  1
        !           123: #define callreg(p) D0

unix.superglobalmegacorp.com

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