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

Defined variables

ccloc defined in line 116; used 8 times
conloc defined in line 114; used 4 times
conval defined in line 115; used 2 times
curlp defined in line 87; used 8 times
debug defined in line 107; used 1 times
first defined in line 86; used 30 times
firstr defined in line 111; used 2 times
iaftbr defined in line 91; used 2 times
isn defined in line 106; used 1 times
lasta defined in line 109; used 5 times
lastr defined in line 110; used 4 times
lastseg defined in line 108; used 5 times
line defined in line 85; used 12 times
loopiv defined in line 97; used 2 times
nbrbr defined in line 88; used 2 times
nchange defined in line 105; used 19 times
ncmot defined in line 95; used 2 times
ncomj defined in line 100; used 2 times
njp1 defined in line 92; used 2 times
nlit defined in line 103; used 2 times
nredunj defined in line 98; used 2 times
nrevbr defined in line 96; used 2 times
nrlab defined in line 93; used 3 times
nrtst defined in line 102; used 2 times
nsaddr defined in line 89; used 7 times
nskip defined in line 99; used 2 times
nsob defined in line 101; used 2 times
nxjump defined in line 94; used 2 times
ophash defined in line 125; used 6 times
optab defined in line 83; used 2 times
redunm defined in line 90; used 2 times
regs defined in line 113; used 77 times
revbr defined in line 112; used 3 times

Defined struct's

node defined in line 69; used 110 times
optab defined in line 80; used 12 times

Defined macros

ADD defined in line 26; used 1 times
ADDF defined in line 42; used 1 times
ASH defined in line 33; used 1 times
ASL defined in line 23; used 1 times
ASR defined in line 22; used 1 times
BIC defined in line 29; used 3 times
BIS defined in line 30; used 2 times
BIT defined in line 28; used 2 times
BSS defined in line 37; used 3 times
BYTE defined in line 66; used 4 times
CBR defined in line 9; used 21 times
CFCC defined in line 50; used 3 times
CLR defined in line 16; used 4 times
CLRF defined in line 46; used 1 times
CMP defined in line 25; used 3 times
CMPF defined in line 47; used 1 times
COM defined in line 17; used 1 times
DATA defined in line 36; used 5 times
DEC defined in line 19; used 2 times
DIV defined in line 32; used 1 times
DIVF defined in line 44; used 1 times
DLABEL defined in line 12; used 2 times
END defined in line 53; used 4 times
EROU defined in line 13; used 3 times
EVEN defined in line 38; used 1 times
FREG defined in line 120; never used
INC defined in line 18; used 1 times
JBR defined in line 8; used 16 times
JEQ defined in line 55; used 2 times
JGE defined in line 58; used 2 times
JGT defined in line 60; used 2 times
JHI defined in line 62; used 2 times
JHIS defined in line 64; used 2 times
JLE defined in line 57; used 2 times
JLO defined in line 61; used 2 times
JLOS defined in line 63; used 2 times
JLT defined in line 59; used 2 times
JMP defined in line 10; used 5 times
JNE defined in line 56; used 3 times
JSR defined in line 52; used 1 times
JSW defined in line 14; used 4 times
LABEL defined in line 11; used 17 times
LABHS defined in line 122; used 4 times
LSIZE defined in line 67; used 2 times
MOV defined in line 15; used 2 times
MOVF defined in line 39; used 1 times
MOVFO defined in line 41; used 1 times
MOVOF defined in line 40; used 1 times
MUL defined in line 31; used 1 times
MULF defined in line 45; used 1 times
NEG defined in line 20; used 1 times
NEGF defined in line 48; used 1 times
NREG defined in line 121; used 15 times
OPHS defined in line 123; used 5 times
RT1 defined in line 118; used 36 times
RT2 defined in line 119; used 32 times
SOB defined in line 51; used 2 times
SUB defined in line 27; used 1 times
SUBF defined in line 43; used 1 times
SXT defined in line 24; used 3 times
TEXT defined in line 35; used 5 times
TST defined in line 21; used 8 times
TSTF defined in line 49; used 1 times
XOR defined in line 34; used 1 times

Usage of this include

c2.h used 2 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1446
Valid CSS Valid XHTML 1.0 Strict