fpc/compiler/fpcdefs.inc
pierre bc0c94c204 fpcdefs.inc: Set fpc_compiler_has_fixup_jmps for powerpcXX and mips CPUs.
psub.pas: Use new fpc_compiler_has_fixup_jmps conditional.
 mips/aasmcpu.pas: MIPS specific fixup_jmps function,
   The insttruction distance calculation is not exact as
   some pseudo-instruction can be expanded to a variable number of real instructions
   real calculation would only be possible if we first 
   convert pseudo-instuctions to real instructions before calling fixup_jmps.

 ncgutil.pas: Revert commit r21791
 ncgcon.pas: Revert commit r21786
 mips/cgcpu.pas: Partial revert of commit r21798, no need to always use A_J,
 as fixup_jmps now handles out of range branches.

git-svn-id: trunk@21822 -
2012-07-09 08:59:13 +00:00

218 lines
4.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}
{ If anyone wants to use interrupt for
a specific target, add a
$define FPC_HAS_SYSTEMS_INTERRUPT_TABLE
to fpcdefs.inc to reactivate
the corresponding code }
{$undef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
{ 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 i386}
{$define cpu32bit}
{$define cpu32bitaddr}
{$define cpu32bitalu}
{$define x86}
{$define cpuflags}
{$define cpuextended}
{$define SUPPORT_MMX}
{$define cpumm}
{$define fewintregisters}
{$define cpurox}
{$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}
{$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}
{$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}
{ 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}
{$endif m68k}
{$ifdef avr}
{$define cpu8bit}
{$define cpu16bitaddr}
{$define cpu8bitalu}
{$define cpuflags}
{$define cpunofpu}
{$define cpunodefaultint}
{$define cpuneedsdiv32helper}
{$define cpuneedsmulhelper}
{$define cpurefshaveindexreg}
{$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}
{$define cputargethasfixedstack}
{$define cpurequiresproperalignment}
{ define cpumm}
{$define cpurefshaveindexreg}
{$define fpc_compiler_has_fixup_jmps}
{$endif mips}
{$ifdef jvm}
{$define cpu32bit}
{$define cpu64bitalu}
{$define cpu32bitaddr}
{$define cpuhighleveltarget}
{$define symansistr}
{$endif}
{$IFDEF MACOS}
{$DEFINE USE_FAKE_SYSUTILS}
{$ENDIF MACOS}
{$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}