1 { 2 Copyright (c) 1998-2002 by Florian Klaempfl 3 4 Basic Processor information for the SPARC 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 20 **************************************************************************** 21 } 22 unit cpuinfo; 23 24 {$i fpcdefs.inc} 25 26 interface 27 28 uses 29 globtype; 30 31 type 32 bestreal = double; 33 {$if FPC_FULLVERSION>20700} 34 bestrealrec = TDoubleRec; 35 {$endif FPC_FULLVERSION>20700} 36 ts32real = single; 37 ts64real = double; 38 ts80real = extended; 39 ts128real = type extended; 40 ts64comp = type extended; 41 pbestreal=^bestreal; 42 43 { possible supported processors for this target } 44 tcputype=(cpu_none, 45 cpu_SPARC_V7, 46 cpu_SPARC_V8, 47 cpu_SPARC_V9 48 ); 49 50 tfputype =(fpu_none, 51 fpu_soft, 52 fpu_hard 53 ); 54 55 tcontrollertype =(ct_none 56 ); 57 58 tcontrollerdatatype = record 59 controllertypestr, controllerunitstr: string[20]; 60 cputype: tcputype; fputype: tfputype; 61 flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword; 62 end; 63 64 65 Const 66 { Is there support for dealing with multiple microcontrollers available } 67 { for this platform? } 68 ControllerSupport = false; 69 70 { We know that there are fields after sramsize 71 but we don't care about this warning } 72 {$PUSH} 73 {$WARN 3177 OFF} 74 embedded_controllers : array [tcontrollertype] of tcontrollerdatatype = 75 ( 76 (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0)); 77 {$POP} 78 79 { calling conventions supported by the code generator } 80 supported_calling_conventions : tproccalloptions = [ 81 pocall_internproc, 82 pocall_stdcall, 83 pocall_safecall, 84 pocall_cdecl, 85 pocall_cppdecl 86 ]; 87 88 cputypestr : array[tcputype] of string[10] = ('', 89 'SPARCV7', 90 'SPARCV8', 91 'SPARCV9' 92 ); 93 94 fputypestr : array[tfputype] of string[6] = ('', 95 'SOFT', 96 'HARD' 97 ); 98 99 { Supported optimizations, only used for information } 100 supported_optimizerswitches = genericlevel1optimizerswitches+ 101 genericlevel2optimizerswitches+ 102 genericlevel3optimizerswitches- 103 { no need to write info about those } 104 [cs_opt_level1,cs_opt_level2,cs_opt_level3]+ 105 [cs_opt_regvar,cs_opt_loopunroll, 106 cs_opt_tailrecursion,cs_opt_nodecse, 107 cs_opt_reorder_fields,cs_opt_fastmath]; 108 109 level1optimizerswitches = genericlevel1optimizerswitches; 110 level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + 111 [cs_opt_regvar,cs_opt_tailrecursion,cs_opt_nodecse]; 112 level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}]; 113 level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + []; 114 115 implementation 116 117 end. 118