# 2.11BSD#431 - /usr/src/lib/c2/c2.h

##### Variables

    alasta            X
    alastr            X
    ccloc             X
    conloc            X
    conval            X
    curlp             X
    debug             X
    first             X
    firstr            X
    iaftbr            X
    isn               X
    lasta             X
    lastr             X
    lastseg           X
    line              X
    loopiv            X
    nbrbr             X
    nchange           X
    ncmot             X
    ncomj             X
    njp1              X
    nlit              X
    nredunj           X
    nrevbr            X
    nrlab             X
    nrtst             X
    nsaddr            X
    nskip             X
    nsob              X
    nxjump            X
    ophash            X
    optab             X
    redunm            X
    regs              X
    revbr             X

##### Macros

    ADD               X
    ADDF              X
    ASH               X
    ASL               X
    ASR               X
    BIC               X
    BIS               X
    BIT               X
    BSS               X
    BYTE              X
    CBR               X
    CFCC              X
    CHECK             X
    CLR               X
    CLRF              X
    CMP               X
    CMPF              X
    COM               X
    DATA              X
    DEC               X
    DIV               X
    DIVF              X
    DLABEL            X
    END               X
    EROU              X
    EVEN              X
    FREG              X
    INC               X
    JBR               X
    JEQ               X
    JGE               X
    JGT               X
    JHI               X
    JHIS              X
    JLE               X
    JLO               X
    JLOS              X
    JLT               X
    JMI               X
    JMP               X
    JNE               X
    JPL               X
    JSR               X
    JSW               X
    LABEL             X
    LABHS             X
    LSIZE             X
    MAXCPS            X
    MOV               X
    MOVF              X
    MOVFO             X
    MOVOF             X
    MUL               X
    MULF              X
    NEG               X
    NEGF              X
    NREG              X
    OPHS              X
    RT1               X
    RT2               X
    SOB               X
    SUB               X
    SUBF              X
    SWAB              X
    SXT               X
    TEXT              X
    TST               X
    TSTF              X
    XOR               X

##### struct's

    node              X
    optab             X

       1: /*
       2:  * Header for object code improver
       3:  *
       4:  *	Several character buffers (used to store contents of registers,
       5:  *	constants, etc) needed to be increased in size to handle the
       6:  *	larger symbols passed thru from the compiler.
       7:  */
       8:
       9: #include <stdio.h>
      10:
      11: #define MAXCPS  32
      12:
      13: #ifndef CHECK
      14: #define CHECK(x)
      15: #endif
      16:
      17: #define JBR 1
      18: #define CBR 2
      19: #define JMP 3
      20: #define LABEL   4
      21: #define DLABEL  5
      22: #define EROU    7
      23: #define JSW 9
      24: #define MOV 10
      25: #define CLR 11
      26: #define COM 12
      27: #define INC 13
      28: #define DEC 14
      29: #define NEG 15
      30: #define TST 16
      31: #define ASR 17
      32: #define ASL 18
      33: #define SXT 19
      34: #define CMP 20
      35: #define ADD 21
      36: #define SUB 22
      37: #define BIT 23
      38: #define BIC 24
      39: #define BIS 25
      40: #define MUL 26
      41: #define DIV 27
      42: #define ASH 28
      43: #define XOR 29
      44: #define TEXT    30
      45: #define DATA    31
      46: #define BSS 32
      47: #define EVEN    33
      48: #define MOVF    34
      49: #define MOVOF   35
      50: #define MOVFO   36
      51: #define ADDF    37
      52: #define SUBF    38
      53: #define DIVF    39
      54: #define MULF    40
      55: #define CLRF    41
      56: #define CMPF    42
      57: #define NEGF    43
      58: #define TSTF    44
      59: #define CFCC    45
      60: #define SOB 46
      61: #define JSR 47
      62: #define SWAB    48
      63: #define END 49
      64:
      65: #define JEQ 0
      66: #define JNE 1
      67: #define JLE 2
      68: #define JGE 3
      69: #define JLT 4
      70: #define JGT 5
      71: #define JLO 6
      72: #define JHI 7
      73: #define JLOS    8
      74: #define JHIS    9
      75: #define JPL 10
      76: #define JMI 11
      77:
      78: #define BYTE    100
      79: #define LSIZE   512
      80:
      81: struct node {
      82:     char    op;
      83:     char    subop;
      84:     struct  node    *forw;
      85:     struct  node    *back;
      86:     struct  node    *ref;
      87:     int labno;
      88:     char    *code;
      89:     int refc;
      90: };
      91:
      92: struct optab {
      93:     char    *opstring;
      94:     int opcode;
      95: } optab[];
      96:
      97: char    line[LSIZE];
      98: struct  node    first;
      99: char    *curlp;
     100: int nbrbr;
     101: int nsaddr;
     102: int redunm;
     103: int iaftbr;
     104: int njp1;
     105: int nrlab;
     106: int nxjump;
     107: int ncmot;
     108: int nrevbr;
     109: int loopiv;
     110: int nredunj;
     111: int nskip;
     112: int ncomj;
     113: int nsob;
     114: int nrtst;
     115: int nlit;
     116:
     117: int nchange;
     118: int isn;
     119: int debug;
     120: int lastseg;
     121: char    *lasta;
     122: char    *lastr;
     123: char    *alasta;
     124: char    *alastr;
     125: char    *firstr;
     126: char    revbr[];
     127: char    regs[12][MAXCPS + 1];
     128: char    conloc[MAXCPS + 1];
     129: char    conval[MAXCPS + 1];
     130: char    ccloc[MAXCPS + 1];
     131:
     132: #define RT1 10
     133: #define RT2 11
     134: #define FREG    5
     135: #define NREG    5
     136: #define LABHS   127
     137: #define OPHS    57
     138:
     139: struct optab *ophash[OPHS];
     140: struct  node *nonlab();
     141: char    *copy();
     142: char    *sbrk();
     143: char    *findcon();
     144: struct  node *insertl();
     145: struct  node *codemove();
     146: char    *sbrk();
     147: char    *alloc();

#### Defined variables

alasta defined in line 123; used 4 times

- in /usr/src/lib/c2/c20.c line 115
- in /usr/src/lib/c2/c21.c line 592-594(3)

alastr defined in line 124; used 2 times

- in /usr/src/lib/c2/c20.c line 116
- in /usr/src/lib/c2/c21.c line 592

ccloc defined in line 130; used 8 times

- in /usr/src/lib/c2/c21.c line 183, 218, 253, 303, 361, 616, 1011-1014(2)

conloc defined in line 128; used 6 times

- in /usr/src/lib/c2/c21.c line 615, 655-656(2), 667, 916, 984

conval defined in line 129; used 2 times

- in /usr/src/lib/c2/c21.c line 917, 986

curlp defined in line 99; used 8 times

- in /usr/src/lib/c2/c20.c line 191-195(3), 204, 412, 421, 440-443(2)

debug defined in line 119; used 1 times

- in /usr/src/lib/c2/c20.c line 87

first defined in line 98; used 30 times

- in /usr/src/lib/c2/c20.c line 164, 170, 188, 200, 268, 455-465(3), 480, 491, 602, 700
- in /usr/src/lib/c2/c21.c line 14, 443-445(2), 469, 735-737(2), 819-832(7), 850-856(5)

firstr defined in line 125; used 2 times

- in /usr/src/lib/c2/c20.c line 111, 134

iaftbr defined in line 103; used 2 times

- in /usr/src/lib/c2/c20.c line 139, 534

isn defined in line 118; used 1 times

- in /usr/src/lib/c2/c20.c line 605

lasta defined in line 121; used 5 times

- in /usr/src/lib/c2/c20.c line 111, 134
- in /usr/src/lib/c2/c21.c line 597, 604-605(2)

lastr defined in line 122; used 4 times

- in /usr/src/lib/c2/c20.c line 111, 154
- in /usr/src/lib/c2/c21.c line 597-602(2)

lastseg defined in line 120; used 5 times

- in /usr/src/lib/c2/c20.c line 285
- in /usr/src/lib/c2/c21.c line 821-823(3), 855

line defined in line 97; used 12 times

- in /usr/src/lib/c2/c20.c line 171-174(2), 180, 225, 237, 411-416(3), 435-443(4)

loopiv defined in line 109; used 2 times

- in /usr/src/lib/c2/c20.c line 147, 690

nbrbr defined in line 100; used 2 times

- in /usr/src/lib/c2/c20.c line 138, 496

nchange defined in line 117; used 31 times

- in /usr/src/lib/c2/c20.c line 126-129(2), 490, 502, 517, 533, 548, 583, 642, 691, 725
- in /usr/src/lib/c2/c21.c line 34, 43, 85, 92, 128, 152, 163, 193, 243, 258, 278, 284, 291, 298, 331, 338, 428, 798, 805, 897

ncmot defined in line 107; used 2 times

- in /usr/src/lib/c2/c20.c line 143, 641

ncomj defined in line 112; used 2 times

- in /usr/src/lib/c2/c20.c line 149, 726

njp1 defined in line 104; used 2 times

- in /usr/src/lib/c2/c20.c line 140, 550

nlit defined in line 115; used 2 times

- in /usr/src/lib/c2/c20.c line 153, 355

nredunj defined in line 110; used 3 times

- in /usr/src/lib/c2/c20.c line 148
- in /usr/src/lib/c2/c21.c line 429, 896

nrevbr defined in line 108; used 2 times

- in /usr/src/lib/c2/c20.c line 144
- in /usr/src/lib/c2/c21.c line 458

nrlab defined in line 105; used 3 times

- in /usr/src/lib/c2/c20.c line 141, 689
- in /usr/src/lib/c2/c21.c line 568

nrtst defined in line 114; used 3 times

- in /usr/src/lib/c2/c20.c line 152
- in /usr/src/lib/c2/c21.c line 242, 257

nsaddr defined in line 101; used 7 times

- in /usr/src/lib/c2/c20.c line 146
- in /usr/src/lib/c2/c21.c line 279, 285, 292, 299, 797, 804

nskip defined in line 111; used 2 times

- in /usr/src/lib/c2/c20.c line 150, 519

nsob defined in line 113; used 2 times

- in /usr/src/lib/c2/c20.c line 151
- in /usr/src/lib/c2/c21.c line 481

nxjump defined in line 106; used 2 times

- in /usr/src/lib/c2/c20.c line 142, 581

ophash defined in line 139; used 6 times

- in /usr/src/lib/c2/c20.c line 396-399(3), 422, 432-433(2)

optab defined in line 95; used 2 times

- in /usr/src/lib/c2/c20.c line 290, 395

redunm defined in line 102; used 2 times

- in /usr/src/lib/c2/c20.c line 145
- in /usr/src/lib/c2/c21.c line 33

regs defined in line 127; used 114 times

- in /usr/src/lib/c2/c21.c line 27-28(2), 38-61(15), 80-88(7), 113-127(11), 135-141(7), 148, 155-162(5), 169-172(4), 180, 190, 211-221(4), 230-235(4), 250-253(2), 261, 270-297(20), 314-315(4), 350, 517(2), 614, 624, 648-658(5), 665-666(2), 680-682(2), 694-698(2), 713, 761, 776-779(2), 785-790(3), 911-915(2)

revbr defined in line 126; used 3 times

- in /usr/src/lib/c2/c20.c line 516, 672
- in /usr/src/lib/c2/c21.c line 451

#### Defined struct's

node defined in line 81; used 114 times

- in line 84-86(6), 98(2), 140-145(6)
- in /usr/src/lib/c2/c20.c line 161(2), 170(2), 188(2), 200(2), 264(2), 333-337(4), 449-451(6), 488(2), 564-566(4), 587-591(6), 602(2), 617-622(8), 698(2), 708-710(4)
- in /usr/src/lib/c2/c21.c line 10(2), 413-415(4), 436-438(4), 467(2), 487-489(4), 501(2), 542-545(4), 565(2), 574-576(4), 675(2), 687-690(4), 732(2), 768(2), 813-822(10), 874-876(4)

optab defined in line 92; used 12 times

- in line 139(2)
- in /usr/src/lib/c2/c20.c line 9(2), 265(2), 392(2), 406-409(4)

#### Defined macros

ADD defined in line 35; used 1 times

- in /usr/src/lib/c2/c20.c line 36

ADDF defined in line 51; used 1 times

- in /usr/src/lib/c2/c20.c line 52

ASH defined in line 42; used 2 times

- in /usr/src/lib/c2/c20.c line 43
- in /usr/src/lib/c2/c21.c line 115

ASL defined in line 32; used 1 times

- in /usr/src/lib/c2/c20.c line 33

ASR defined in line 31; used 1 times

- in /usr/src/lib/c2/c20.c line 32

BIC defined in line 38; used 4 times

- in /usr/src/lib/c2/c20.c line 39
- in /usr/src/lib/c2/c21.c line 80, 88, 113

BIS defined in line 39; used 3 times

- in /usr/src/lib/c2/c20.c line 40
- in /usr/src/lib/c2/c21.c line 88, 159

BIT defined in line 37; used 2 times

- in /usr/src/lib/c2/c20.c line 38
- in /usr/src/lib/c2/c21.c line 272

BSS defined in line 46; used 4 times

- in /usr/src/lib/c2/c20.c line 47, 532
- in /usr/src/lib/c2/c21.c line 857-859(2)

BYTE defined in line 78; used 8 times

- in /usr/src/lib/c2/c20.c line 288, 294, 430
- in /usr/src/lib/c2/c21.c line 24, 124, 160, 189, 248

CBR defined in line 18; used 26 times

- in /usr/src/lib/c2/c20.c line 11-22(12), 301, 461, 493, 505, 665
- in /usr/src/lib/c2/c21.c line 28, 89, 132, 320, 358, 423, 447, 471, 890

CFCC defined in line 59; used 3 times

- in /usr/src/lib/c2/c20.c line 60
- in /usr/src/lib/c2/c21.c line 30, 322

CHECK defined in line 14; used 13 times

- in line 13
- in /usr/src/lib/c2/c20.c line 492, 501, 518, 539, 549, 582, 613, 643, 651, 692, 727
- in /usr/src/lib/c2/c21.c line 578

CLR defined in line 25; used 7 times

- in /usr/src/lib/c2/c20.c line 26
- in /usr/src/lib/c2/c21.c line 39, 81, 123, 156, 189, 212

CLRF defined in line 55; used 1 times

- in /usr/src/lib/c2/c20.c line 56

CMP defined in line 34; used 3 times

- in /usr/src/lib/c2/c20.c line 35
- in /usr/src/lib/c2/c21.c line 308, 886

CMPF defined in line 56; used 1 times

- in /usr/src/lib/c2/c20.c line 57

COM defined in line 26; used 1 times

- in /usr/src/lib/c2/c20.c line 27

DATA defined in line 45; used 5 times

- in /usr/src/lib/c2/c20.c line 46, 531
- in /usr/src/lib/c2/c21.c line 833, 857-859(2)

DEC defined in line 28; used 2 times

- in /usr/src/lib/c2/c20.c line 29
- in /usr/src/lib/c2/c21.c line 470

DIV defined in line 41; used 2 times

- in /usr/src/lib/c2/c20.c line 42
- in /usr/src/lib/c2/c21.c line 171

DIVF defined in line 53; used 1 times

- in /usr/src/lib/c2/c20.c line 54

DLABEL defined in line 21; used 2 times

- in /usr/src/lib/c2/c20.c line 177, 524

END defined in line 63; used 4 times

- in /usr/src/lib/c2/c20.c line 64, 215, 244, 525

EROU defined in line 22; used 3 times

- in /usr/src/lib/c2/c20.c line 24, 213, 525

EVEN defined in line 47; used 1 times

- in /usr/src/lib/c2/c20.c line 48

FREG defined in line 134; never used
INC defined in line 27; used 1 times

- in /usr/src/lib/c2/c20.c line 28

JBR defined in line 17; used 72 times

- in /usr/src/lib/c2/c20.c line 10, 301, 461, 493-495(2), 505, 522, 556, 576, 626-631(2), 638, 701-703(2)
- in /usr/src/lib/c2/c21.c line 333, 398-409(56), 447

JEQ defined in line 65; used 8 times

- in /usr/src/lib/c2/c20.c line 11, 67
- in /usr/src/lib/c2/c21.c line 398(3), 404-406(3)

JGE defined in line 68; used 25 times

- in /usr/src/lib/c2/c20.c line 14, 67
- in /usr/src/lib/c2/c21.c line 398-408(23)

JGT defined in line 70; used 6 times

- in /usr/src/lib/c2/c20.c line 16, 67
- in /usr/src/lib/c2/c21.c line 403-404(4)

JHI defined in line 72; used 3 times

- in /usr/src/lib/c2/c20.c line 18, 67
- in /usr/src/lib/c2/c21.c line 404

JHIS defined in line 74; used 3 times

- in /usr/src/lib/c2/c20.c line 20, 67
- in /usr/src/lib/c2/c21.c line 404

JLE defined in line 67; used 22 times

- in /usr/src/lib/c2/c20.c line 13, 67
- in /usr/src/lib/c2/c21.c line 398-409(20)

JLO defined in line 71; used 3 times

- in /usr/src/lib/c2/c20.c line 17, 67
- in /usr/src/lib/c2/c21.c line 404

JLOS defined in line 73; used 3 times

- in /usr/src/lib/c2/c20.c line 19, 67
- in /usr/src/lib/c2/c21.c line 404

JLT defined in line 69; used 10 times

- in /usr/src/lib/c2/c20.c line 15, 67
- in /usr/src/lib/c2/c21.c line 402-409(8)

JMI defined in line 76; used 3 times

- in /usr/src/lib/c2/c20.c line 22, 67
- in /usr/src/lib/c2/c21.c line 404

JMP defined in line 19; used 5 times

- in /usr/src/lib/c2/c20.c line 23, 522, 556, 631, 638

JNE defined in line 66; used 24 times

- in /usr/src/lib/c2/c20.c line 12, 67
- in /usr/src/lib/c2/c21.c line 399-409(21), 471

JPL defined in line 75; used 3 times

- in /usr/src/lib/c2/c20.c line 21, 67
- in /usr/src/lib/c2/c21.c line 404

JSR defined in line 61; used 1 times

- in /usr/src/lib/c2/c20.c line 62

JSW defined in line 23; used 4 times

- in /usr/src/lib/c2/c20.c line 441, 461, 482, 493

LABEL defined in line 20; used 17 times

- in /usr/src/lib/c2/c20.c line 172, 231, 456, 466, 481, 509, 523, 542, 571-572(2), 593-597(2), 603, 628, 658, 715
- in /usr/src/lib/c2/c21.c line 579

LABHS defined in line 136; used 4 times

- in /usr/src/lib/c2/c20.c line 450-457(3), 463

LSIZE defined in line 79; used 2 times

- in line 97
- in /usr/src/lib/c2/c20.c line 237

MAXCPS defined in line 11; used 5 times

- in line 127-130(4)
- in /usr/src/lib/c2/c21.c line 232

MOV defined in line 24; used 5 times

- in /usr/src/lib/c2/c20.c line 25
- in /usr/src/lib/c2/c21.c line 132, 240, 248, 550

MOVF defined in line 48; used 1 times

- in /usr/src/lib/c2/c20.c line 49

MOVFO defined in line 50; used 1 times

- in /usr/src/lib/c2/c20.c line 51

MOVOF defined in line 49; used 1 times

- in /usr/src/lib/c2/c20.c line 50

MUL defined in line 40; used 1 times

- in /usr/src/lib/c2/c20.c line 41

MULF defined in line 54; used 1 times

- in /usr/src/lib/c2/c20.c line 55

NEG defined in line 29; used 1 times

- in /usr/src/lib/c2/c20.c line 30

NEGF defined in line 57; used 1 times

- in /usr/src/lib/c2/c20.c line 58

NREG defined in line 135; used 13 times

- in /usr/src/lib/c2/c21.c line 21, 68, 199, 225, 265, 613, 652, 664, 712, 780-783(4)

OPHS defined in line 137; used 5 times

- in line 139
- in /usr/src/lib/c2/c20.c line 396-398(2), 422, 432

RT1 defined in line 132; used 57 times

- in /usr/src/lib/c2/c21.c line 27, 38-47(4), 57-60(3), 80-88(5), 113-127(7), 140, 148, 155, 161-162(2), 169, 190, 211-221(4), 230-235(4), 253, 261, 270-277(5), 283-297(5), 314-318(3), 350, 517, 680, 694, 779, 785, 892

RT2 defined in line 133; used 48 times

- in /usr/src/lib/c2/c21.c line 28, 40-41(2), 48-61(5), 82-83(2), 116-122(4), 135-141(6), 158-162(2), 170-171(2), 180, 250, 271-282(6), 289-296(4), 311-318(4), 517, 682, 698, 776, 787-790(2), 885, 893

SOB defined in line 60; used 2 times

- in /usr/src/lib/c2/c20.c line 61
- in /usr/src/lib/c2/c21.c line 477

SUB defined in line 36; used 1 times

- in /usr/src/lib/c2/c20.c line 37

SUBF defined in line 52; used 1 times

- in /usr/src/lib/c2/c20.c line 53

SWAB defined in line 62; used 2 times

- in /usr/src/lib/c2/c20.c line 63
- in /usr/src/lib/c2/c21.c line 126

SXT defined in line 33; used 3 times

- in /usr/src/lib/c2/c20.c line 34
- in /usr/src/lib/c2/c21.c line 29, 321

TEXT defined in line 44; used 5 times

- in /usr/src/lib/c2/c20.c line 45
- in /usr/src/lib/c2/c21.c line 821, 835, 857-859(2)

TST defined in line 30; used 12 times

- in /usr/src/lib/c2/c20.c line 31
- in /usr/src/lib/c2/c21.c line 231, 274, 281, 288, 294, 308-309(2), 348, 422-423(2), 883

TSTF defined in line 58; used 1 times

- in /usr/src/lib/c2/c20.c line 59

XOR defined in line 43; used 1 times

- in /usr/src/lib/c2/c20.c line 44

#### Usage of this include

c2.h used 2 times

- in /usr/src/lib/c2/c20.c line 7
- in /usr/src/lib/c2/c21.c line 6

Last modified: 1994-01-03 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1531 |