Annotation of researchv9/jerq/sgs/optim/defs, revision 1.1.1.1

1.1       root        1: /* @(#) defs: 1.3 3/17/84                              */
                      2: 
                      3: /*      machine dependent include file for IS25 */
                      4: 
                      5: # include <ctype.h>
                      6: 
                      7: 
                      8: #define IMPREGAL
                      9: /*     #define IMPSCRATCH              */
                     10: #define IMPLLSW
                     11: #define IMPTRIAD
                     12: #define IMPIL
                     13: 
                     14: #define LABEL  3
                     15: #define HLABEL 4
                     16: #define JMP    5
                     17: #define RET    6
                     18: #define SWITCH 7
                     19: #define SWITCHT        8
                     20: #define CALL   9
                     21: #define JSB    10
                     22: #define JZ     11
                     23: #define JNZ    12
                     24: #define JPOS   13
                     25: #define JNPOS  14
                     26: #define JNEG   15
                     27: #define JNNEG  16
                     28: #define JE     17
                     29: #define JNE    18
                     30: #define JL     19
                     31: #define JLE    20
                     32: #define JG     21
                     33: #define JGE    22
                     34: #define JLU    23
                     35: #define JLEU   24
                     36: #define JGU    25
                     37: #define JGEU   26
                     38: #define JBC    27
                     39: #define JBS    28
                     40: #define CMPB   29
                     41: #define CMPH   30
                     42: #define CMPW   31
                     43: #define BITW   32
                     44: #define MCOMB  33
                     45: #define MCOMH  34
                     46: #define MCOMW  35
                     47: #define MOVZBH 36
                     48: #define MOVZBW 37
                     49: #define MOVZHW 38
                     50: #define MOVAB  39
                     51: #define MOVAH  40
                     52: #define MOVAW  41
                     53: #define ANDB2  42
                     54: #define ANDH2  43
                     55: #define ANDW2  44
                     56: #define ANDB3  45
                     57: #define ANDH3  46
                     58: #define ANDW3  47
                     59: #define ORB2   48
                     60: #define ORH2   49
                     61: #define ORW2   50
                     62: #define ORB3   51
                     63: #define ORH3   52
                     64: #define ORW3   53
                     65: #define XORB2  54
                     66: #define XORH2  55
                     67: #define XORW2  56
                     68: #define XORB3  57
                     69: #define XORH3  58
                     70: #define XORW3  59
                     71: #define LLSW2  60
                     72: #define LLSW3  61
                     73: #define LRSW2  62
                     74: #define LRSW3  63
                     75: #define MOVB   64
                     76: #define MOVH   65
                     77: #define MOVW   66
                     78: #define MOVBBH 67
                     79: #define MOVBBW 68
                     80: #define MOVBHW 69
                     81: #define MOVTHB 70
                     82: #define MOVTWB 71
                     83: #define MOVTWH 72
                     84: #define MNEGB  73
                     85: #define MNEGH  74
                     86: #define MNEGW  75
                     87: #define ADDB2  76
                     88: #define ADDH2  77
                     89: #define ADDW2  78
                     90: #define ADDB3  79
                     91: #define ADDH3  80
                     92: #define ADDW3  81
                     93: #define SUBB2  82
                     94: #define SUBH2  83
                     95: #define SUBW2  84
                     96: #define SUBB3  85
                     97: #define SUBH3  86
                     98: #define SUBW3  87
                     99: #define MULW2  88
                    100: #define MULW3  89
                    101: #define DIVW2  90
                    102: #define DIVW3  91
                    103: #define MODW2  92
                    104: #define MODW3  93
                    105: #define ALSW2  94
                    106: #define ALSW3  95
                    107: #define ARSW2  96
                    108: #define ARSW3  97
                    109: #define UMULW2 98                      /* unsigned ops set different result
                    110:                                        ** indicators from other arith. ops.
                    111:                                        */
                    112: #define UMULW3 99
                    113: #define UDIVW2 100
                    114: #define UDIVW3 101
                    115: #define UMODW2 102
                    116: #define UMODW3 103
                    117: #define INSV   104
                    118: #define EXTZV  105
                    119: #define MOVBLB 106
                    120: #define MOVBLH 107
                    121: #define MOVBLW 108
                    122: #define INCTST 109
                    123: #define INCPTH 110
                    124: #define INCPTW 111
                    125: #define DECPTH 112
                    126: #define DECPTW 113
                    127: #define ACJL   114
                    128: #define ACJLU  115
                    129: #define ACJLE  116
                    130: #define ACJLEU 117
                    131: #define ATJNZB 118
                    132: #define ATJNZH 119
                    133: #define ATJNZW 120
                    134: #define OTHER  121
                    135: #define PUSHAW 122
                    136: #define PUSHW  123
                    137: #define FADDD2 124
                    138: #define FADDD3 125
                    139: #define FADDS2 126
                    140: #define FADDS3 127
                    141: #define FSUBD2 128
                    142: #define FSUBD3 129
                    143: #define FSUBS2 130
                    144: #define FSUBS3 131
                    145: #define FMULD2 132
                    146: #define FMULD3 133
                    147: #define FMULS2 134
                    148: #define FMULS3 135
                    149: #define FDIVD2 136
                    150: #define FDIVD3 137
                    151: #define FDIVS2 138
                    152: #define FDIVS3 139
                    153: #define FCMPD  140
                    154: #define MOVTDW 141
                    155: #define MOVWD  142
                    156: #define MOVTSW 143
                    157: #define MOVWS  144
                    158: #define MOVDS  145
                    159: #define MOVSD  146
                    160: #define MOVDW  147
                    161: #define MOVSW  148
                    162: #define MOVDD  149
                    163: #define MOVD   150
                    164: #define PUSHD  151
                    165: #define SAVE   152
                    166: #define PUSHZB 153
                    167: #define PUSHZH 154
                    168: #define PUSHBB 155
                    169: #define PUSHBH 156
                    170: 
                    171: /* pseudo ops */
                    172: 
                    173: # define numpops       12
                    174: 
                    175: # define ALIGN 1
                    176: # define BSS   2
                    177: # define BYTE  3
                    178: # define DATA  4
                    179: # define DEF   5
                    180: # define FIL   6
                    181: # define GLOBL 7
                    182: # define LN    8
                    183: # define SET   9
                    184: # define TEXT  10
                    185: # define TV    11
                    186: # define WORD  12
                    187: # define POTHER        0
                    188: 
                    189: /* begin comment character */
                    190: 
                    191: # define CC '#'
                    192: 
                    193: /* predicates and functions */
                    194: 
                    195: # define islabel(p) (p != NULL && (p->op == LABEL || p->op == HLABEL))
                    196: # define ishl(p) (p->opcode[0] != '.' || p->op == HLABEL)
                    197: # define isuncbr(p) (JMP <= p->op && p->op <= SWITCHT)
                    198: # define iscbr(p) (p->op >= JZ && p->op <= JGEU)
                    199: # define isbr(p) (p->op >= JMP && p->op <= JBS && p->op != CALL)
                    200: # ifdef N3B
                    201: # define ishb(p) (p->op == RET)
                    202: # else
                    203: # define ishb(p) (0)
                    204: # endif
                    205: # define isrev(p) (p->op >= JZ && p->op <= JBS)
                    206: # define isret(p) (p->op == RET)
                    207: # define iscompare(p) (p->op == CMPW || p->op == CMPB || p->op == CMPH)
                    208: # define setlab(p) (p->op = LABEL)
                    209: # define setbr(p,l) {p->op = JMP; p->opcode = "jmp"; p->op1 = l;}
                    210: # define bboptim(f,l) 0
                    211: # define mvlivecc(p) (p->back->nlive = (p->back->nlive & ~CONCODES) | (p->nlive & CONCODES))
                    212: # define swplivecc(p,q) { int x; x=(p->nlive & CONCODES); mvlivecc(q); q->nlive = (q->nlive & ~CONCODES) | x; }
                    213: 
                    214: /* maximum number of operands */
                    215: 
                    216: # define MAXOPS 4
                    217: 
                    218: /* register usages */
                    219: 
                    220: # define REGS 0x1fff   /* bit 12 used for condition code analysis */
                    221: # define RETREG 0x0003
                    222: # define LIVEREGS 0x0e00
                    223: 
                    224: /* condition codes */
                    225: 
                    226: # define CONCODES 0x1000
                    227: # define isdeadcc(p) ((p->nlive & CONCODES) == 0)
                    228: 
                    229: /* options */
                    230: 
                    231: # define COMTAIL
                    232: # define LIVEDEAD
                    233: # define PEEPHOLE
                    234: 
                    235: /* line number stuff */
                    236: 
                    237: # define IDTYPE int
                    238: # define IDVAL 0
                    239: 
                    240: /* table sizes */
                    241: 
                    242: /* maximum number of labels referenced in a function,
                    243:    must be relatively prime to 5 */
                    244: # ifdef AR16WR
                    245: # define NUMLBLS 513
                    246: # else
                    247: # define NUMLBLS 917
                    248: # endif
                    249: /* maximum allocatable space (in shorts) */
                    250: # ifdef AR16WR
                    251: # define SPACE 19450
                    252: # else
                    253: # define SPACE 150000
                    254: # endif
                    255: 
                    256: /* The symbol UCODE50 is defined for 3B20's (only) when they are
                    257: ** known to have the UNIX 5.0 microcode.  
                    258: */
                    259: 
                    260: #ifndef UCODE50                        /* allow local definition */
                    261: #if defined(U3B) || defined(N3B)
                    262: #define UCODE50                        /* turn on special instructions */
                    263: #endif /* def U3B */
                    264: #endif /* ndef UCODE50 */
                    265: 
                    266: /* There is an optimization in w2opt.c which removes certain "cmpw"
                    267: ** instructions that follow a "call".  This option requires that
                    268: ** C-callable assembly language routines that return values must
                    269: ** set the result indicators according to the value of the returned
                    270: ** result.  This improvement should only be turned on for systems
                    271: ** which will adhere to that convention.
                    272: */
                    273: 
                    274: #ifndef        CALLCMPW                /* allow local definition */
                    275: #if defined(U3B)               /* presently enabled for 3B20S UNIX */
                    276: #define CALLCMPW               /* enable removal of extra "cmpw" */
                    277: #endif /* defined ... */
                    278: #endif /* ndef CALLCMPW */
                    279: 
                    280: #define spflg(i) ( (i) == 'y' )        /* indicate y flag has suboptions */

unix.superglobalmegacorp.com

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