OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [FT64v5/] [software/] [CC64/] [source/] [glo.cpp] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 48 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2012-2018  Robert Finch, Waterloo
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch<remove>@finitron.ca
6
//       ||
7
//
8
// CC64 - 'C' derived language compiler
9
//  - 64 bit CPU
10
//
11
// This source file is free software: you can redistribute it and/or modify 
12
// it under the terms of the GNU Lesser General Public License as published 
13
// by the Free Software Foundation, either version 3 of the License, or     
14
// (at your option) any later version.                                      
15
//                                                                          
16
// This source file is distributed in the hope that it will be useful,      
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
19
// GNU General Public License for more details.                             
20
//                                                                          
21
// You should have received a copy of the GNU General Public License        
22
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
23
//                                                                          
24
// ============================================================================
25
//
26
#include "stdafx.h"
27
/*      global definitions      */
28
 
29
CPU cpu;
30
int pass;
31
int maxPn = 15;
32
int gCpu = 7;
33
int regPC = 254;
34
int regSP = 31;
35
int regFP = 30;
36
int regLR = 29;
37
int regXLR = 28;
38
int regGP = 27;
39
int regTP = 26;
40
int regCLP = 25;                // class pointer
41
int regPP = 24;                                 // program pointer
42
int regZero = 0;
43
int regFirstTemp = 3;
44
int regLastTemp = 10;
45
int regFirstRegvar = 11;
46
int regLastRegvar = 17;
47
int regFirstArg = 18;
48
int regLastArg = 22;
49
int pregSP = 31;
50
int pregFP = 30;
51
int pregLR = 29;
52
int pregXLR = 28;
53
int pregGP = 27;
54
int pregTP = 26;
55
int pregCLP = 25;                // class pointer
56
int pregPP = 24;                                        // program pointer
57
int pregZero = 0;
58
int pregFirstTemp = 3;
59
int pregLastTemp = 10;
60
int pregFirstRegvar = 11;
61
int pregLastRegvar = 17;
62
int pregFirstArg = 18;
63
int pregLastArg = 22;
64
int farcode = 0;
65
int wcharSupport = 1;
66
int verbose = 0;
67
int use_gp = 0;
68
int address_bits = 32;
69
int maxVL = 64;
70
 
71
int sizeOfWord = 8;
72
int sizeOfFP = 8;
73
int sizeOfFPS = 8;
74
int sizeOfFPD = 8;
75
int sizeOfFPT = 12;
76
int sizeOfFPQ = 16;
77
int sizeOfPtr = 8;
78
 
79
std::ifstream *ifs;
80
txtoStream ofs;
81
txtoStream lfs;
82
txtoStream dfs;
83
/*
84
FILE            *input = 0,
85
                *list = 0,
86
                *output = 0;*/
87
FILE                    *outputG = 0;
88
int incldepth = 0;
89
int             lineno = 0;
90
int             nextlabel = 0;
91
int             lastch = 0;
92
int             lastst = 0;
93
char            lastid[128] = "";
94
char            lastkw[128] = "";
95
char            laststr[MAX_STRLEN + 1] = "";
96
int64_t                 ival = 0;
97
double          rval = 0.0;
98
Float128                rval128;
99
char float_precision = 'd';
100
//FloatTriple     FAC1,FAC2;
101
//FLOAT           rval = {0,0,0,0,0,0};
102
int parseEsc = TRUE;
103
 
104
TABLE           gsyms[257];// = {0,0},
105
 
106
SYM             *lasthead = (SYM *)NULL;
107
Float128                *quadtab = nullptr;
108
struct slit     *strtab = (struct slit *)NULL;
109
struct clit             *casetab = (struct clit *)NULL;
110
int             lc_static = 0;
111
int             lc_auto = 0;
112
int                             lc_thread = 0;
113
Statement    *bodyptr = 0;
114
int             global_flag = 1;
115
TABLE           defsyms;
116
int64_t         save_mask = 0;          /* register save mask */
117
int64_t         fpsave_mask = 0;
118
TYP             tp_int, tp_econst;
119
bool dogen = true;
120
int isKernel = FALSE;
121
int isPascal = FALSE;
122
int isOscall = FALSE;
123
int isInterrupt = FALSE;
124
int isTask = FALSE;
125
int isNocall = FALSE;
126
int optimize = TRUE;
127
int opt_noregs = FALSE;
128
int opt_nopeep;
129
int opt_noexpr = FALSE;
130
int opt_nocgo = FALSE;
131
int opt_size = FALSE;
132
int opt_vreg = FALSE;
133
int exceptions = FALSE;
134
int mixedSource = FALSE;
135
Function *currentFn = (Function *)NULL;
136
int callsFn = FALSE;
137
int stmtdepth = 0;
138
 
139
char nmspace[20][100];
140
int bsave_mask;
141
short int loop_active;
142
 
143
 
144
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.