mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 02:19:30 +02:00

Therefor the cpu type (-Cp...) "coldfire" was split up into "isaa", "isaa+", "isab" and "isac". The Linux RTL can currently compiled for "68020", "isab" and "isac". For the other three Bcc.L must be handled differently (only Bcc.B/W supported) and for "68000" also EXT.L needs to be handled differently. fpcdefs.inc: + define CPUCAPABILITIES if capabilities can be set for a certain CPU type (currently ARM, AVR and M68k) options.pas: * check for CPUCAPABILITIES instead of specific CPUs assemble.pas: - the handling of the CPU type is already done in m68k/ag68kgas.pas, Tm68kGNUAssembler.MakeCmdLine (and thereby already using the gascputypestr array!) m68k/cpuinfo.pas: - tcputype: remove "cpu_coldfire" + tcputype: add "cpu_isa_a", "cpu_isa_a_p", "cpu_isa_b" and "cpu_isa_c" + add "cpu_coldfire" constant which contains all Coldfire specific cpu types * adjust "cputypestr" and "gascputypestr" + add tcpuflags and cpu_capabilities (DBRA restriction was checked with CPUCOLDFIRE, CAS/TAS will be needed for atomic operations and BRAL restriction was discovered during testing of new cpu types) m68k/cgcpu.pas: * adjust checks for "cpu_coldfire" m68k/n68kadd.pas: * don't use a BRA.L if it is not supported, but (at least for now) a BRA.W aggas.pas: * adjusted check for Coldfire git-svn-id: trunk@25457 -
259 lines
5.9 KiB
PHP
259 lines
5.9 KiB
PHP
{$mode objfpc}
|
|
{$asmmode default}
|
|
{$H-}
|
|
{$goto on}
|
|
{$inline on}
|
|
{$interfaces corba}
|
|
|
|
{ This reduces the memory requirements a lot }
|
|
{$PACKENUM 1}
|
|
{$ifdef FPC_HAS_VARSETS}
|
|
{$ifndef FPC_BIG_ENDIAN}
|
|
{ $define USE_PACKSET1}
|
|
{$endif}
|
|
{$endif FPC_HAS_VARSETS}
|
|
|
|
{$ifdef USE_PACKSET1}
|
|
{$PACKSET 1}
|
|
{$endif USE_PACKSET1}
|
|
|
|
{ We don't use exceptions, so turn off the implicit
|
|
exceptions in the constructors }
|
|
{$IMPLICITEXCEPTIONS OFF}
|
|
|
|
{ Inline small functions, but not when EXTDEBUG is used }
|
|
{$ifndef EXTDEBUG}
|
|
{$define USEINLINE}
|
|
{$endif EXTDEBUG}
|
|
|
|
{$define USEEXCEPT}
|
|
|
|
{ This fake CPU is used to allow incorporation of globtype unit
|
|
into utils/ppudump without any CPU specific code PM }
|
|
{$ifdef generic_cpu}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitaddr}
|
|
{$define cpu32bitalu}
|
|
{$define cpuflags}
|
|
{$define cpuextended}
|
|
{$endif generic_cpu}
|
|
|
|
{$ifdef cpuarm}
|
|
{$packrecords c}
|
|
{$endif cpuarm}
|
|
|
|
{$ifdef i8086}
|
|
{$define cpu16bit}
|
|
{$define cpu16bitaddr}
|
|
{$define cpu16bitalu}
|
|
{$define x86}
|
|
{$define cpuflags}
|
|
{$define cpuextended}
|
|
{//$define SUPPORT_MMX}
|
|
{$define cpumm}
|
|
{$define fewintregisters}
|
|
{//$define cpurox}
|
|
{$define SUPPORT_SAFECALL}
|
|
{$define cpuneedsmulhelper}
|
|
{ TODO: add another define in order to disable the div helper for 16-bit divs? }
|
|
{$define cpuneedsdiv32helper}
|
|
{$define VOLATILE_ES}
|
|
{$define SUPPORT_GET_FRAME}
|
|
{$endif i8086}
|
|
|
|
{$ifdef i386}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitaddr}
|
|
{$define cpu32bitalu}
|
|
{$define x86}
|
|
{$define cpuflags}
|
|
{$define cpuextended}
|
|
{$define SUPPORT_MMX}
|
|
{$define cpumm}
|
|
{$define fewintregisters}
|
|
{$define cpurox}
|
|
{$define SUPPORT_SAFECALL}
|
|
{$define SUPPORT_GET_FRAME}
|
|
{$endif i386}
|
|
|
|
{$ifdef x86_64}
|
|
{$define x86}
|
|
{$define cpuflags}
|
|
{$define cpu64bitalu}
|
|
{$define cpu64bitaddr}
|
|
{$define cpuextended}
|
|
{$define cpufloat128}
|
|
{$define cputargethasfixedstack}
|
|
{$define cpumm}
|
|
{$define cpurox}
|
|
{$define cpurefshaveindexreg}
|
|
{$define SUPPORT_SAFECALL}
|
|
{$define SUPPORT_GET_FRAME}
|
|
{$endif x86_64}
|
|
|
|
{$ifdef ia64}
|
|
{$define cpuflags}
|
|
{$define cpu64bitalu}
|
|
{$define cpu64bitaddr}
|
|
{$define cpuextended}
|
|
{$define cpufloat128}
|
|
{$endif ia64}
|
|
|
|
{$ifdef alpha}
|
|
{$define cpu64bitalu}
|
|
{$define cpu64bitaddr}
|
|
{$define cpurefshaveindexreg}
|
|
{$endif alpha}
|
|
|
|
{$ifdef sparc}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitaddr}
|
|
{$define cpu32bitalu}
|
|
{$define cpuflags}
|
|
{$define cputargethasfixedstack}
|
|
{$define cpurefshaveindexreg}
|
|
{$define SUPPORT_SAFECALL}
|
|
{$endif sparc}
|
|
|
|
{$ifdef powerpc}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitaddr}
|
|
{$define cpu32bitalu}
|
|
{$define cpuflags}
|
|
{$define cputargethasfixedstack}
|
|
{$define cpumm}
|
|
{$define cpurox}
|
|
{$define cpurefshaveindexreg}
|
|
{$define fpc_compiler_has_fixup_jmps}
|
|
{$endif powerpc}
|
|
|
|
{$ifdef powerpc64}
|
|
{$define cpu64bitalu}
|
|
{$define cpu64bitaddr}
|
|
{$define cpuflags}
|
|
{$define cputargethasfixedstack}
|
|
{$define cpumm}
|
|
{$define cpurox}
|
|
{$define cpurefshaveindexreg}
|
|
{$define fpc_compiler_has_fixup_jmps}
|
|
{$endif powerpc64}
|
|
|
|
{$ifdef arm}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitaddr}
|
|
{$define cpu32bitalu}
|
|
{$define cpuflags}
|
|
{$define cpufpemu}
|
|
{$define cpuneedsdiv32helper}
|
|
{$define cpurox}
|
|
{$define cputargethasfixedstack}
|
|
{$define cpurefshaveindexreg}
|
|
{$define cpucapabilities}
|
|
{$define SUPPORT_SAFECALL}
|
|
{$define SUPPORT_GET_FRAME}
|
|
{ default to armel }
|
|
{$if not(defined(CPUARM)) and not(defined(CPUARMEB)) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
|
|
{$define FPC_ARMEL}
|
|
{$endif}
|
|
{ inherit FPC_ARMEL? }
|
|
{$if defined(CPUARMEL) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
|
|
{$define FPC_ARMEL}
|
|
{$endif}
|
|
{ inherit FPC_ARMEB? }
|
|
{$if defined(CPUARMEB) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL)) and not(defined(FPC_ARMHF))}
|
|
{$define FPC_ARMEB}
|
|
{$endif}
|
|
{ inherit FPC_ARMHF? }
|
|
{$if defined(CPUARMHF) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL)) and not(defined(FPC_ARMEB))}
|
|
{$define FPC_ARMHF}
|
|
{$endif}
|
|
{$endif arm}
|
|
|
|
{$ifdef m68k}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitaddr}
|
|
{$define cpu32bitalu}
|
|
{$define cpuflags}
|
|
{$define cpufpemu}
|
|
{$define cpurefshaveindexreg}
|
|
{$define cpucapabilities}
|
|
{$endif m68k}
|
|
|
|
{$ifdef avr}
|
|
{$define cpu8bit}
|
|
{$define cpu16bitaddr}
|
|
{$define cpu8bitalu}
|
|
{$define cpuflags}
|
|
{$define cpunofpu}
|
|
{$define cpunodefaultint}
|
|
{$define cpuneedsdiv32helper}
|
|
{$define cpuneedsmulhelper}
|
|
{$define cpurefshaveindexreg}
|
|
{$define cpucapabilities}
|
|
{$endif avr}
|
|
|
|
{$ifdef mipsel}
|
|
{$define mips}
|
|
{$else not mipsel}
|
|
{ Define both mips and mipseb if mipsel is not defined
|
|
but mips cpu is wanted. }
|
|
{$ifdef mipseb}
|
|
{$define mips}
|
|
{$endif mipseb}
|
|
{$ifdef mips}
|
|
{$define mipseb}
|
|
{$endif mips}
|
|
{$endif mipsel}
|
|
|
|
|
|
{$ifdef mips}
|
|
{$ifndef mips64}
|
|
{$define cpu32bit}
|
|
{$define cpu32bitalu}
|
|
{$define cpu32bitaddr}
|
|
{$else}
|
|
{$error mips64 not yet supported}
|
|
{$endif}
|
|
{$define cpuflags} { Flags are emulated }
|
|
{$define cputargethasfixedstack}
|
|
{$define cpurequiresproperalignment}
|
|
{ define cpumm}
|
|
{$define cpurefshaveindexreg}
|
|
{$define fpc_compiler_has_fixup_jmps}
|
|
{$define SUPPORT_GET_FRAME}
|
|
{$endif mips}
|
|
|
|
{$ifdef jvm}
|
|
{$define cpu32bit}
|
|
{$define cpu64bitalu}
|
|
{$define cpu32bitaddr}
|
|
{$define cpuhighleveltarget}
|
|
{$define symansistr}
|
|
{$define SUPPORT_GET_FRAME}
|
|
{$endif}
|
|
|
|
{$ifdef aarch64}
|
|
{$define cpu64bit}
|
|
{$define cpu64bitaddr}
|
|
{$define cpu64bitalu}
|
|
{$define cpuflags}
|
|
{$define cpurox}
|
|
{$define cputargethasfixedstack}
|
|
{$define cpurefshaveindexreg}
|
|
{$endif aarch64}
|
|
|
|
{$IFDEF MACOS}
|
|
{$DEFINE USE_FAKE_SYSUTILS}
|
|
{$ENDIF MACOS}
|
|
|
|
{ Stabs is not officially supported on 64 bit targets by gdb, except on Mac OS X
|
|
(but there we don't support it)
|
|
}
|
|
{$ifdef cpu64bitaddr}
|
|
{$define NoDbgStabs}
|
|
{$endif}
|
|
|
|
{$if not defined(FPC_HAS_TYPE_EXTENDED) and defined(i386)}
|
|
{$error Cross-compiling from systems without support for an 80 bit extended floating point type to i386 is not yet supported at this time }
|
|
{$endif}
|