PageRenderTime 14ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/compiler/jvm/cpuinfo.pas

https://github.com/slibre/freepascal
Pascal | 79 lines | 44 code | 15 blank | 20 comment | 0 complexity | d7c8ded43c02b859db9ac1e68b5ab768 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1{
 2    Copyright (c) 2010 by the Free Pascal development team
 3
 4    Basic Processor information for the Java VM
 5
 6    See the file COPYING.FPC, included in this distribution,
 7    for details about the copyright.
 8
 9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 **********************************************************************}
14
15Unit cpuinfo;
16
17Interface
18
19  uses
20    globtype;
21
22Type
23   bestreal = double;
24   ts32real = single;
25   ts64real = double;
26   ts80real = extended;
27   ts128real = extended;
28   ts64comp = comp;
29
30   pbestreal=^bestreal;
31
32   { possible supported processors for this target }
33   tcputype =
34      (cpu_none,
35       { jvm, same as cpu_none }
36       cpu_jvm,
37       { jvm byte code to be translated into Dalvik bytecode: more type-
38         sensitive }
39       cpu_dalvik
40      );
41
42   tfputype =
43     (fpu_none,
44      fpu_standard
45     );
46
47
48Const
49   { calling conventions supported by the code generator }
50   supported_calling_conventions : tproccalloptions = [
51     pocall_internproc
52   ];
53
54   cputypestr : array[tcputype] of string[9] = ('',
55     'JVM',
56     'JVMDALVIK'
57   );
58
59   fputypestr : array[tfputype] of string[8] = (
60     'NONE',
61     'STANDARD'
62   );
63
64   { Supported optimizations, only used for information }
65   supported_optimizerswitches = genericlevel1optimizerswitches+
66                                 genericlevel2optimizerswitches+
67                                 genericlevel3optimizerswitches-
68                                 { no need to write info about those }
69                                 [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
70                                 [cs_opt_loopunroll,cs_opt_nodecse];
71
72   level1optimizerswitches = genericlevel1optimizerswitches;
73   level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_nodecse];
74   level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
75   level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
76
77Implementation
78
79end.