o it is already performed in fpc_cpucodeinit
o in libraries, fpc_cpucodeinit first sets Default8087CW to the current x87
control word to avoid them enabling fpu exceptions if the host platform
had first disabled them
git-svn-id: trunk@33993 -
- MSDOS heap in tinyheap.inc modified to use usual
SysGetMem and similar names.
- Use HAS_MEMORYMANAGER (used previously in wince source code,
to specify that a memory manager is defined elsewhere than inside
heap.inc include file.
- Use
- Remove TinyHeapMemoryManager Structure variable completely
heaptrc.pp: remove unneeded macro code after name changes of tinyheap.inc
msdos/system.pp now only defines HAS_MEMORYMANAGER macro
win16/system.pp defines HAS_MEMORYMANAGER and FPC_NO_DEFAULT_HEAP
as it still uses a different memory manager.
__stkbottom variable added for win16 system.pp as it is required
by i8086 specific stack check code.
git-svn-id: trunk@33983 -
are the same in case of open arrays (their size can't be determined at
compile time) -- this is just a sanity check, which can't be performed in
this case
git-svn-id: trunk@33979 -
Move PascalMain external from the si_*.inc files to a new include file si_impl.inc that's included in the implementation sections of the si_*.pp units
git-svn-id: trunk@33970 -
* always register implementation-only, public routines as they might only be called from other units using an external declaration
git-svn-id: trunk@33967 -
* only export the symbol name with the indirect suffix (on Windows the indirect ones will be generated in the module that does the importing on other system's they're not needed anyway)
git-svn-id: trunk@33966 -
compiler/utils/ppuutils/ppudump, readdefinitions:
* with the move of most target specific PPU data into the target specific sym types the location of the library symbol for the Amiga-like systems has changed
git-svn-id: trunk@33965 -
rtl/inc/system.inc:
+ ResHeader variable that provides the public _FPC_ResLocation symbol used by intres.inc; this variable will always be available and without indirect entry information it will simply hook up to FPC_RESLOCATION itself
* SetupEntryInformation: setup FPCResLocation
rtl/inc/intres.inc:
* no need to cater for indirect entry or not anymore
git-svn-id: trunk@33964 -
* FPC_HAS_DYNAMIC_PACKAGES is set if the target does support dynamic packages (currently none, but soon(TM) that should be i386-win32, {i386,x86_64}-linux and all darwin systems)
* FPC_HAS_INDIRECT_VAR_ACCESS is set if assembler code should assume that variables from another unit are accessed indirectly (thus different assembler code should be used)
git-svn-id: trunk@33953 -
Adjust non-Windows resources to work with indirect main information as well.
rtl/inc/systemh.inc, TEntryInformation:
+ new cross platform field ResLocation which stores the pointer to the resources
rtl/inc/intres.inc:
* change the type of ResHeader from PResHdr to PPResHdr (and adjust code that uses it accordingly; Note: the first dereferencing is assumed to be always valid!)
* adjust declaration of ResHeader depending on whether indirect main information is used or not
rtl/darwin/sysinit.pas & rtl/linux/si_impl.inc:
* pass the location of the resources through SysInitEntryInformation
rtl/bsd/system.pp & rtl/linux/system.pp:
+ new public variable FPCResLocation which is setup by SysEntry
rtl/win32/sysinit.inc:
* initialize ResLocation of SysInitEntryInformation as Nil
rtl/win32/system.pp:
* initialize ResLocation of EntryInformation as Nil
........
For systems that support both internal and external resources (in this case only Darwin ones) we need to generate the FPC_RESLOCATION symbol always, because the SysInit unit is resource type agnostic.
ngenutil.pas, tnodeutils:
* InsertResourceInfo: generate FPC_RESLOCATION symbol pointing to 0 in case the program is compiled on Darwin with resources set to external ones (-We)
git-svn-id: trunk@33952 -
Switch Mac OS X to indirect entry information.
compiler/systems/t_bsd.pas, TLinkerBSD:
+ implement InitSysInitUnitName
compiler/system.pas:
* systems_internal_sysinit: add Darwin systems
compiler/hlcgobj.pas, thlcgobj:
* gen_proc_symbol_end: for Darwin systems don't directly call PascalMain for libraries, but FPC_LIBMAIN instead
rtl/darwin:
+ add sysinit.pas unit which contains the executable and library entry points for Darwin
rtl/darwin/Makefile.fpc:
* add sysinit unit
rtl/bsd/sysosh.inc:
+ add a Darwin specific TPlatformEntryInformation (could probably be used for all Unix systems...)
rtl/bsd/system.pp:
* define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin systems once we're no longer bootstrapping with 2.6.x
+ add EntryInformation variable (this could maybe moved to system.inc...)
+ add new procedure SysEntry that is called from the entrypoint and which sets up necessary information required by other parts of the RTL
* the old FPC_SYSTEMMAIN is still in place for bootstrapping
rtl/inc/systemh.inc, TEntryInformation:
* PascalMain is cdecl on non-Windows systems (ToDo: really?)
rtl/inc/system.inc:
* initialstklen is provided by the indirect entry information, so no external here
........
Fix bootstrapping.
rtl/darwin/sysinit.pas:
* enable the code only when no longer bootstrapping with 2.6.x
........
Fix bootstrapping.
rtl/objpas/objpas.pp:
* define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin only while not bootstrapping with 2.6.x
........
rtl/darwin/sysinit.pas:
* reference PASCALMAIN correctly (I wonder how this even worked previously :/ )
git-svn-id: trunk@33949 -
normally returns int64 in FPC), before performing any further calculations -
the result always fits in a longint (the date is range checked against
MaxDateTime and that is well within longint limits). This generates faster
code on non 64-bit targets and also fixes i8086 compilation, which previously
failed on register allocation on this function.
git-svn-id: trunk@33946 -