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 
15 Unit cpuinfo;
16 
17 {$i fpcdefs.inc}
18 
19 Interface
20 
21   uses
22     globtype;
23 
24 Type
25    bestreal = double;
26 {$if FPC_FULLVERSION>20700}
27    bestrealrec = TDoubleRec;
28 {$endif FPC_FULLVERSION>20700}
29    ts32real = single;
30    ts64real = double;
31    ts80real = extended;
32    ts128real = extended;
33    ts64comp = comp;
34 
35    pbestreal=^bestreal;
36 
37    { possible supported processors for this target }
38    tcputype =
39       (cpu_none,
40        { jvm, same as cpu_none }
41        cpu_jvm,
42        { jvm byte code to be translated into Dalvik bytecode: more type-
43          sensitive }
44        cpu_dalvik
45       );
46 
47    tfputype =
48      (fpu_none,
49       fpu_standard
50      );
51 
52    tcontrollertype =
53      (ct_none
54      );
55 
56    tcontrollerdatatype = record
57       controllertypestr, controllerunitstr: string[20];
58       cputype: tcputype; fputype: tfputype;
59       flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword;
60    end;
61 
62 
63 Const
64    { Is there support for dealing with multiple microcontrollers available }
65    { for this platform? }
66    ControllerSupport = false;
67 
68    { We know that there are fields after sramsize
69      but we don't care about this warning }
70    {$PUSH}
71     {$WARN 3177 OFF}
72    embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
73    (
74       (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
75    {$POP}
76 
77    { calling conventions supported by the code generator }
78    supported_calling_conventions : tproccalloptions = [
79      pocall_internproc
80    ];
81 
82    cputypestr : array[tcputype] of string[9] = ('',
83      'JVM',
84      'JVMDALVIK'
85    );
86 
87    fputypestr : array[tfputype] of string[8] = (
88      'NONE',
89      'STANDARD'
90    );
91 
92    { Supported optimizations, only used for information }
93    supported_optimizerswitches = genericlevel1optimizerswitches+
94                                  genericlevel2optimizerswitches+
95                                  genericlevel3optimizerswitches-
96                                  { no need to write info about those }
97                                  [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
98                                  [cs_opt_loopunroll,cs_opt_nodecse];
99 
100    level1optimizerswitches = genericlevel1optimizerswitches;
101    level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_nodecse];
102    level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
103    level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
104 
105 Implementation
106 
107 end.
108