Annotation of cci/usr/src/lib/c2/c2.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Header for object code improver
        !             3:  */
        !             4: 
        !             5: /* tokens */
        !             6: #define JBR    1
        !             7: #define CBR    2
        !             8: #define JMP    3
        !             9: #define LABEL  4
        !            10: #define DLABEL 5
        !            11: #define EROU   6
        !            12: #define JSW    7
        !            13: #define MOV    8
        !            14: #define CLR    9
        !            15: #define INC    10
        !            16: #define DEC    11
        !            17: #define TST    12
        !            18: #define PUSH   13
        !            19: #define CVT    14
        !            20: #define CMP    15
        !            21: #define ADD    16
        !            22: #define SUB    17
        !            23: #define BIT    18
        !            24: #define AND    19
        !            25: #define OR     20
        !            26: #define XOR    21
        !            27: #define COM    22
        !            28: #define NEG    23
        !            29: #define MUL    24
        !            30: #define DIV    25
        !            31: #define EDIV   26
        !            32: #define SHAL   27
        !            33: #define SHAR   28
        !            34: #define SHL    29
        !            35: #define SHR    30
        !            36: #define CALLF  31
        !            37: #define CALLS  32
        !            38: #define RET    33
        !            39: #define CASE   34
        !            40: #define TEXT   35
        !            41: #define DATA   36
        !            42: #define BSS    37
        !            43: #define ALIGN  38
        !            44: #define END    39
        !            45: #define MOVZ   40
        !            46: #define WGEN   41
        !            47: #define ADDA   42
        !            48: #define SUBA   43
        !            49: #define AOBLEQ 44
        !            50: #define AOBLSS 45
        !            51: #define MOVA   46
        !            52: #define PUSHA  47
        !            53: #define LGEN   48
        !            54: #define SET    49
        !            55: #define MOVBLK 50
        !            56: #define MFPR   51
        !            57: #define MTPR   52
        !            58: #define PROBE  53
        !            59: #define MOVO   54
        !            60: #define LCOMM  55
        !            61: #define COMM   56
        !            62: 
        !            63: #define        JEQ     0
        !            64: #define        JNE     1
        !            65: #define        JLE     2
        !            66: #define        JGE     3
        !            67: #define        JLT     4
        !            68: #define        JGT     5
        !            69: /* rearranged for unsigned branches so that jxxu = jxx + 6 */
        !            70: #define        JLOS    8
        !            71: #define        JHIS    9
        !            72: #define        JLO     10
        !            73: #define        JHI     11
        !            74: 
        !            75: #define JBC 12
        !            76: #define JBS 13
        !            77: 
        !            78: #define        BYTE    1
        !            79: #define        WORD    2
        !            80: #define LONG   3
        !            81: #define QUAD   4
        !            82: #define OP2    7
        !            83: #define OP3    8
        !            84: #define OPB    9
        !            85: #define OPX    10
        !            86: 
        !            87: /* #define T(a,b) (a|((b)<<8)) NUXI problems */
        !            88: #define U(a,b) (a|((b)<<4))
        !            89: 
        !            90: #define C2_ASIZE 128
        !            91: 
        !            92: struct optab {
        !            93:        char    opstring[7];
        !            94:        char    opcod;
        !            95:        unsigned char   subopcod;
        !            96: } optab[];
        !            97: 
        !            98: struct node {
        !            99:        char    op;
        !           100:        unsigned char   subop;
        !           101:        short   refc;
        !           102:        struct  node    *forw;
        !           103:        struct  node    *back;
        !           104:        struct  node    *ref;
        !           105:        char    *code;
        !           106:        struct  optab   *pop;
        !           107:        long    labno;
        !           108:        short   seq;
        !           109: };
        !           110: 
        !           111: /* struct { NUXI problems
        !           112:        short   combop;
        !           113: }; */
        !           114: 
        !           115: char   line[512];
        !           116: struct node    first;
        !           117: char   *curlp;
        !           118: int    nbrbr;
        !           119: int    nsaddr;
        !           120: int    redunm;
        !           121: int    iaftbr;
        !           122: int    njp1;
        !           123: int    nrlab;
        !           124: int    nxjump;
        !           125: int    ncmot;
        !           126: int    nrevbr;
        !           127: int    loopiv;
        !           128: int    nredunj;
        !           129: int    nskip;
        !           130: int    ncomj;
        !           131: int    naob;
        !           132: int    nrtst;
        !           133: int    nbj;
        !           134: 
        !           135: int    nchange;
        !           136: int    isn;
        !           137: int    debug;
        !           138: char   *lasta;
        !           139: char   *lastr;
        !           140: char   *firstr;
        !           141: char   revbr[];
        !           142: #define        NREG    13
        !           143: char   *regs[NREG+5]; /* 0-12, 4 for operands, 1 for running off end */
        !           144: char   conloc[C2_ASIZE];
        !           145: char   conval[C2_ASIZE];
        !           146: char   ccloc[C2_ASIZE];
        !           147: 
        !           148: #define        RT1     NREG
        !           149: #define        RT2     NREG+1
        !           150: #define RT3    NREG+2
        !           151: #define RT4    NREG+3
        !           152: #define        LABHS   127
        !           153: 
        !           154: char *copy();
        !           155: long getnum();
        !           156: struct node *codemove();
        !           157: struct node *insertl();
        !           158: struct node *nonlab();
        !           159: struct node *alloc();
        !           160: #define COPYCODE

unix.superglobalmegacorp.com

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