Commit Graph

11933 Commits

Author SHA1 Message Date
michael
789b80f702 * ExecuteInThread added
git-svn-id: trunk@33100 -
2016-02-16 18:59:35 +00:00
michael
ae3b0eab2a * Fix stringlist addstrings so virtual method is preserved (bug id 0029630)
git-svn-id: trunk@33099 -
2016-02-16 18:59:01 +00:00
Jeppe Johansen
1c0c944311 Added x86_64-embedded target. Patch from Benjamin Rosseaux
git-svn-id: trunk@33097 -
2016-02-14 10:57:00 +00:00
sergei
161f812113 * Explicitly typecast (-longint) to longint, otherwise it becomes an int64 on 64-bit targets, causing wrong result of sign(longint). Mantis #29649.
git-svn-id: trunk@33096 -
2016-02-14 10:29:11 +00:00
michael
db19d73ec0 * Add ClearFirst parameter to AddStrings (bug ID 29630)
git-svn-id: trunk@33092 -
2016-02-13 11:03:51 +00:00
svenbarth
6afda909d4 Rework TlsKey handling on Windows so that it works as intended with indirect main information
rtl/inc/system.inc:
  * SetupEntryInformation: call new, optional function OSSetupEntryInformation to handle platform specific entry information initialization
rtl/win/sysosh.inc, TEntryInformationOS:
  + new field TlsKeyAddr which will hold the address to the main binary's TlsKey variable
win32/sysinit.inc:
  + provide the variable holding the TlsKey and pass that on to the entry information record
win32/system.pp:
  + new OS specific entry information initialization (currently only the TlsKey)
win/systhrd.inc:
  * declare TlsKey as a pointer to a DWord value instead of a DWord; on non-indirect entry platforms this is initialized with the address of new variable TlsKeyVar, on indirect entry platforms it will be initialized by the entry information initialization
  * adjust usages of TlsKey from DWord to PDWord
win/systlsdir.inc:
  * TlsKey is now a PDWord and (in sysinit) points to TlsKeyVar
win/syswin.inc:
  * adjust TlsKey usage
inc/heaptrc.pp:
  * TlsKey is now a PDWord, thus adjust the import and the usage

git-svn-id: trunk@33091 -
2016-02-12 17:03:52 +00:00
svenbarth
77cb13c38c Revert r33057. MaxLen is the maximum value that Pos can return and does not need to be adjusted by (Offset - 1). Also there's no buffer that could be overrun as i is not used to access the string's buffer. Fixes failure of tests/test/units/system/tstring.pp
git-svn-id: trunk@33089 -
2016-02-12 16:07:26 +00:00
florian
dfd261f2d6 * embedded heap manager takes care of ReturnNilIfGrowHeapFails
git-svn-id: trunk@33070 -
2016-02-07 18:28:12 +00:00
sergei
9b84581f4c + function copysign(x,y), calculates abs(x)*sign(y), private for unit math (not in interface).
* fixed sinh and arsinh return values at -0.0 and -Inf.

git-svn-id: trunk@33069 -
2016-02-07 15:34:02 +00:00
sergei
a4ed9f3b54 * Improved sign(x) functions to be branchless in most cases. Resolves #14206.
git-svn-id: trunk@33067 -
2016-02-07 11:18:31 +00:00
florian
0695c92b73 * make Dos.GetMsCount a dummy for embedded targets
git-svn-id: trunk@33065 -
2016-02-07 11:16:39 +00:00
Jeppe Johansen
328b6464ed Add debug info to the CPU units by default, to be able to print register contents with GDB.
git-svn-id: trunk@33064 -
2016-02-06 20:16:45 +00:00
michael
eb2e614ae9 * Power no longer in system, but in Math
git-svn-id: trunk@33063 -
2016-02-06 18:57:49 +00:00
michael
39c404d342 * Some fixes from Ondrej Pokorny (bug ID 29538)
git-svn-id: trunk@33062 -
2016-02-06 15:03:28 +00:00
michael
dd00b26c09 * Implement missing functions (Fraction/Exponent/Mantissa/Sign)
git-svn-id: trunk@33060 -
2016-02-06 12:44:23 +00:00
michael
a999f055ef * Implement missing functions (Fraction/Exponent/Mantissa/Sign)
git-svn-id: trunk@33059 -
2016-02-06 12:44:05 +00:00
michael
21920b9cea * Correct string type
git-svn-id: trunk@33058 -
2016-02-06 12:17:41 +00:00
michael
e2733c9a50 * Small correction in POS (prevent moving out of buffer if offset<>1)
git-svn-id: trunk@33057 -
2016-02-06 12:17:13 +00:00
michael
6d051892e5 * Added Offset argument to Pos (exists in wide and ansi/short, forgotten for unicode)
git-svn-id: trunk@33056 -
2016-02-06 12:16:00 +00:00
michael
cf530f117e * Faster stringreplace (bug ID 26864)
git-svn-id: trunk@33055 -
2016-02-06 10:19:56 +00:00
Jonas Maebe
9e3c7f175f * load the address of envp before storing it, so we don't overwrite argv
with envp (fixes bug in fix from r32528, mantis #29587 for FPC 3.0.x
    -- FPC 3.1.1+ uses si_*.inc instead, which already works correctly)

git-svn-id: trunk@33045 -
2016-02-04 11:37:29 +00:00
nickysn
5aa8392e05 * i8086-msdos compilation fixed
git-svn-id: trunk@33043 -
2016-02-04 08:45:20 +00:00
Jonas Maebe
2e64c63993 * fixed dependencies for lineinfo unit after r33007
* also made lnfodwrf dependent on lineinfo for all platforms,
    because both units implicitly depend on the exeinfo unit
    and if both are compiled at the same time they can fall
    over each other while writing its .ppu or .s file

git-svn-id: trunk@33039 -
2016-02-01 22:52:50 +00:00
pierre
fd612990e5 Fix number of frames requested when calling CaptureBackTrace function
git-svn-id: trunk@33038 -
2016-01-31 22:08:15 +00:00
svenbarth
1951b8aaaa Fix threadvar handling. Basically a merge of r31913 of my packages branch.
rtl/inc/system.inc:
  * provide a public alias for SetupEntryInformation so that it can be used in SysInit as well without globally exporting it
rtl/win/systlsdir.inc:
  * Exec_tls_callback: call SetupEntryInformation before initalizing the heap and multithreading so that the threadvar tables can be referenced correctly

git-svn-id: trunk@33035 -
2016-01-30 23:10:35 +00:00
svenbarth
191a293e4a Fix compilation of Mac OS X. Without the cdecl modifier we need the _
rtl/bsd/system.pp:
  * use _PASCALMAIN instead of PASCALMAIN

git-svn-id: trunk@33034 -
2016-01-30 19:38:40 +00:00
michael
fe1e18eb8d * Fixed TRect setwith and setheight (from Ondrej Pokorny)
git-svn-id: trunk@33030 -
2016-01-29 20:50:21 +00:00
Jonas Maebe
9c3cab8224 * replaced pure LGPL Mersenne Twister implementation with a public domain
version

git-svn-id: trunk@33029 -
2016-01-29 18:03:14 +00:00
svenbarth
e3060130a4 Adjustments so that the resource string related tables are provided inside the system unit (both for indirect and direct entry targets).
rtl/inc/system.inc:
  + new variables that hold pointers to the tables
  + new procedure SetupEntryInformation() that should be used in the entry points of indirect entry targets to setup cross target fields
  + for direct entry targets the two resource string tables are imported here and supplied as initialization to the table pointers
objpas/objpas.pp:
  * adjust table declarations so that the pointers provided from the System unit are used
  * adjust usages of the tables as they are now pointers
win32/system.pp:
  * Exe_Entry: use SetupEntryInformation()
win/syswin.inc:
  * Dll_Entry: use SetupEntryInformation()

git-svn-id: trunk@33028 -
2016-01-29 17:19:33 +00:00
svenbarth
7b67ead440 Pass further main program data through the indirect entry information.
rtl/inc/systemh.inc:
  + TEntryInformation: add Pointer fields ResourceStringTables, ResStrInitTables, WideInitTables (for targets with separate WideString type) and ResLocation (not used on Windows, but since most other targets don't have Windows' resource system it's not part of OS)
rtl/java/jsystemh_types.inc:
  + TEntryInformation: adjust for consistency reasons
rtl/win32/sysinit.inc:
  * SysInitEntryInformation: initialize with pointers to the correct tables

git-svn-id: trunk@33027 -
2016-01-29 16:51:27 +00:00
svenbarth
0491bca72a inc/system.inc:
+ add (uninitialized) global variable EntryInformation for systems that use indirect main information
win32/system.pp:
  - remove initialized EntryInformation and instead rely on the one passed by the sysinit* units

git-svn-id: trunk@33026 -
2016-01-29 16:24:53 +00:00
svenbarth
7e1e947b71 asm_exit is only needed on Win32 (Note: the removal of asm_exit from TEntryInformation in the previous commit should have been in this one -.- )
rtl/win32/sysosh.inc:
  + add TEntryInformationOS for Win32 which contains asm_exit
rtl/win32/system.pp:
  * EntryInformation: adjust initialization
  * system_exit: call the correct function variable
rtl/win32/sysinit.inc:
  * SysInitEntryInformation: adjust initialization
  * SetupEntryInformation: adjust commented setup of the function variable
rtl/java/jsystemh_types.inc:
  * adjust TEntryInformation for consistency reasons

git-svn-id: trunk@33025 -
2016-01-29 15:36:58 +00:00
svenbarth
3da7675eb1 Add a possiblity for targets to specify additional fields for TEntryInformation using an optional sub record called TEntryInformationOS
rtl/inc/systemh.inc:
  + add field OS of type TEntryInformationOS if the target specifies HAS_ENTRYINFORMATION_OS
rtl/java/jsystemh_types.inc:
  + same adjustments as above for consistency reasons despite it being not used there anyway

git-svn-id: trunk@33024 -
2016-01-29 15:32:33 +00:00
svenbarth
b525cecad8 - get rid of the calling convention modifier for PascalMain as it's generated using the default calling convention anyway (without any parameters this luckily doesn't matter that much ;) )
(Note: adjusted merge info as in my packages branch there is a less complete commit for this)

git-svn-id: trunk@33023 -
2016-01-29 14:51:15 +00:00
svenbarth
e15e80ab1f Fix for Mantis #29499.
wince/wininc/struct.inc:
  * the Windows unit of WinCE is compiled with $calling cdecl, but cdecl functions don't support high parameters, thus we need to adjust the calling convention when including the typshrd*.inc files

git-svn-id: trunk@33018 -
2016-01-29 14:32:59 +00:00
pierre
aec9ef1b70 Fix StackTop computation by using StackTopPtr variable set in _start code
git-svn-id: trunk@33009 -
2016-01-27 13:50:02 +00:00
pierre
3de617c79e Fix phdr pointer increment and use envp variable from system unit for Solaris operating system
git-svn-id: trunk@33008 -
2016-01-27 10:47:16 +00:00
pierre
90359bcb3c Add code to find base address in unix ELF aux vector above enviroment in startup stack
git-svn-id: trunk@33007 -
2016-01-26 14:44:31 +00:00
michael
e7a722cdd9 * Patch from Ondrej Pokorny to make Trect methods more Delphi compatible (Bug ID 29479)
git-svn-id: trunk@32998 -
2016-01-24 15:16:18 +00:00
michael
46315176f4 * Patch from Silvio Clecio implementing TFPGMapObject (Bug ID 29438)
git-svn-id: trunk@32987 -
2016-01-22 23:07:05 +00:00
michael
702dd7f31f * Forgot to commit, part of Inoussas update of unicode tables
git-svn-id: trunk@32986 -
2016-01-22 22:58:51 +00:00
michael
6df35742ae * Fix bug #0029461, faSymlink is incompatible with Delphi and plain wrong
git-svn-id: trunk@32985 -
2016-01-22 21:07:27 +00:00
sergei
77285b63eb * i386-linux: reworked and cleaned up libc-related startup code:
* Don't replace intended initialization routines with dummy ones, so libc can properly initialize itself.
  * Profiling support (si_c21g.pp) only needs to contain the __gmon_start__ procedure, so it can reuse the entire si_c21.inc, and separate si_21g.inc file is no longer needed.

git-svn-id: trunk@32984 -
2016-01-22 17:11:08 +00:00
sergei
53d7018482 * removed 'nostackframe' attribute, since on i386 assembler procedures reference non-register parameters relative to ebp.
git-svn-id: trunk@32981 -
2016-01-22 16:35:20 +00:00
florian
29aa8d6934 * updated for make 3.82
git-svn-id: trunk@32973 -
2016-01-21 19:53:37 +00:00
sergei
7381c66161 - i386-linux RTL: removed assembler startup files, which are unused since version 2.0.x.
git-svn-id: trunk@32972 -
2016-01-21 15:11:31 +00:00
Jonas Maebe
30a3ad7538 * fixed cpu unit dependencies for i386 after r32857 (part of mantis #29439)
git-svn-id: trunk@32967 -
2016-01-18 22:20:16 +00:00
michael
2b80ac1353 * Fix bug ID #29415 (compilation with 2.6.4)
git-svn-id: trunk@32959 -
2016-01-17 09:21:07 +00:00
pierre
3c88a3c59b Use Tiny getmem/freemem functions for systemdebug code, add more debug output
git-svn-id: trunk@32949 -
2016-01-16 00:50:30 +00:00
pierre
3bf9019676 + Define FPC_ANSI_TEXTFILEREC to avoid unnecessary use of unicode char
+ Add possibility to disable FEATURE_WIDESTRINGS by
 setting conditional NO_WIDESTRINGS
 + Add ifndef RTLLITE around LFN code

git-svn-id: trunk@32948 -
2016-01-16 00:42:36 +00:00