Commit Graph

14910 Commits

Author SHA1 Message Date
Jonas Maebe
f1abd2c2f0 Linux: fix pthread types
Remove legacy implementation-specific fields (they don't match the current
glibc fields anymore since a long time) and fix alignment fields (they are
union fields that overlap with the rest of the record).

All platforms now use the modern opaque array-based definitions.
2022-12-01 22:43:26 +01:00
Michaël Van Canneyt
2c3b78682a * Add IsConstValue 2022-11-29 09:05:42 +01:00
Michaël Van Canneyt
348fbfde9d * Add stub for IsManagedType 2022-11-28 10:39:17 +01:00
florian
f8f824aa8d * avoid unneeded widening of expressions due to constants defaulting to extended 2022-11-26 23:27:02 +01:00
florian
c1ec558d0a * first (modified, added a comment) patch by Rika to improve generic Index*, part of #39996 2022-11-17 23:11:23 +01:00
Pierre Muller
5e0eb521c4 Fix use of unaligned for big endian code 2022-11-15 21:48:40 +00:00
Michaël Van Canneyt
75c252fd8f * Extra linux fcntl constants 2022-11-13 23:46:59 +01:00
marcoonthegit
cfc77315ca * getlongpath as per https://forum.lazarus.freepascal.org/index.php/topic,60972.0/topicseen.html 2022-11-10 10:42:11 +01:00
florian
3e6d4bf1cc * new cpu feature tests 2022-11-09 23:09:07 +01:00
florian
12aa48602b + CMOVSupport function 2022-11-08 21:15:11 +01:00
florian
9c8f362acc * more robust calculation of TBITS_SHIFT 2022-11-06 22:33:38 +01:00
Rika Ichinose
7243befdb7 Better TBits. 2022-11-06 20:55:38 +00:00
ccrause
031c16dd3c Fix potential overflow when incrementing 8 bit high value of res. 2022-11-05 11:19:58 +02:00
Pierre Muller
9b6926c5f5 Introduce CTYPES_INLINE, enabled by default but which can be disabled using -dDISABLE_INLINE for ctypes unit 2022-11-04 22:21:29 +00:00
marcoonthegit
f9a76aaa56 * Add AMPM to string, patch from closes #39973 2022-10-29 16:12:40 +02:00
Jonas Maebe
e63cc73cfa Darwin/AArch64: future-proof version check 2022-10-23 22:25:29 +02:00
Jonas Maebe
ae4c8359aa Darwin/AArch64: detect when SIGILL indicates an FPU exception
Parse the ESR (ESR_ELx, Exception Syndrome Register (ELx)), return run error
as in float_raise
2022-10-23 19:10:55 +02:00
Pierre Muller
afc9acda37 Change wrong "$macros off" into "$macro off" 2022-10-22 15:54:49 -05:00
Jonas Maebe
229d88c50f Thumb(2): fix compilation after FPU control word changes
Resolves #39966
2022-10-20 22:25:29 +02:00
ccrause
991460c4ee Rewrite fpc_shortstr_concat_multi for AVR to not use a temporary shortstring to reduce RAM usage. 2022-10-19 20:18:56 +00:00
Jonas Maebe
c89848a00f powerpc64le: fix reading FPU control word after 0758aa1143
Also, missing rest of the commit message for that change:

The default implementation of SysResetFPU now sets the FPU control word that
was last set from any thread (Delphi and FPC i386/x86-64-compatible). No longer
call SysInitFPU when starting a new thread, only SysResetFPU. Combined, this
means that new FPC-started threads will always start out with that control
word on all architectures.

Added generic fpc_cpuinit implementation that is used unless
FPC_SYSTEM_HAS_FPC_CPUINIT has been defined.

Ensure that the softfloat exception mask is initially set to the same
value as the hardware fpu exception mask on architectures that use both.

SafeLoadLibrary now saves/restores the FPU control word on all platforms.

Removed outdated fpc_mtfsb0_corrected define check in powerpc64.inc

Resolves #38230
2022-10-18 21:55:53 +02:00
Jonas Maebe
0758aa1143 FPU exception mask: generlised system unit interface 2022-10-17 19:43:01 +00:00
Michaël Van Canneyt
d5777174d8 * Optimization of TStringHelper.Split by Rika. Fixes issue #39948 2022-10-13 12:45:30 +02:00
florian
989895c82f * patch by Bart B: FormatFloat correctly outputs NaN now, resolves #32868
+ test
2022-10-11 22:11:33 +02:00
florian
9f293df425 * export DynArrayAssign, resolves #39897 2022-10-06 22:56:38 +02:00
Pierre Muller
5913434ba9 Add DISABLE_SYSTEMINLINE check to be able to avoid setting SYSTEMINLINE macro 2022-09-20 22:39:28 +01:00
florian
3963a30f9e * prettier exception message, resolves #39909 2022-09-18 15:50:55 +02:00
Karoly Balogh
fd83fd5779 m68k-linux: try to be as ColdFire compatible in the startup code as possible, so explicitly use jsr, otherwise this might compile to a long bsr, that is not CF compatible (except cfv4) 2022-08-31 22:14:15 +02:00
rich2014
7bcefd287d FIX: DARWIN: aarch64: tstatfs.fstypename length error (#39873) 2022-08-28 21:01:50 +02:00
Karoly Balogh
3695bb5da5 powerpc-morphos: enable 'section' keyword support, and force the startup code to be in the .text section, to fix linking external objects with unnamed sections on this platform 2022-08-27 19:19:42 +02:00
Karoly Balogh
3d9d80b007 powerpc-amiga: fix build after ecbd5840 2022-08-26 20:29:53 +02:00
Karoly Balogh
ecbd5840ce m68k-amiga: print offsets during stacktraces, instead of absolute addresses, which are not really helpful in a single address space 2022-08-26 18:42:24 +02:00
Sven/Sarah Barth
8595c927a8 * fix #39876: correctly Read(Str) enum types which have a size smaller than 4 Byte
+ added tests
2022-08-26 17:16:29 +02:00
florian
717d38f060 * prettier casing of Str* functions, resolves #39879 2022-08-25 20:40:23 +02:00
marcoonthegit
f341baeaa7 * fixed ambiguity between pipe(2) with two params and pipe(3) with one that broke -dFPC_USE_LIBC 2022-08-22 13:22:57 +02:00
marcoonthegit
9ad1995c6d * Patch by Rika to have a char specific TStringHelper.replace. Probably faster with low number of char matches. closes #39707
* also raise rangeerror for startindex<0 in previous committed join() patch.
2022-08-20 16:16:58 +02:00
marcoonthegit
d25daba08a * Patch from Alexey T. closes #39705
* don't use copy in helper.indexof(). Watch those 0 based indexes.
2022-08-18 13:59:00 +02:00
florian
9e14dee1c3 * fixed Math.Tanh as proposed by Paolo Valle, resolves #39867 2022-08-17 20:56:43 +02:00
marcoonthegit
533cd82922 * applied patch from Alexey for closes #39704
* reviewed checks at start of function to match Delphi in rangecheck errors and other exits
 * test for the above.
2022-08-17 18:38:02 +02:00
florian
cc66eb27ab * patch by Rika: More numerical stability for Math, resolves #39863 2022-08-14 22:26:09 +02:00
marcoonthegit
f532cf1698 * Use an own put for tfpginterfacedobjectlist as per bug #39846.
Maybe not the most elegant, but solves the immediately
2022-08-14 16:24:35 +02:00
florian
be4a317cb4 * proper naming 2022-08-13 22:30:55 +02:00
florian
306559667c * patch by Rika for ArcTan2 to reduce code size 2022-08-11 22:32:45 +02:00
florian
f18d6f1c85 * fixed and improved generic ArcTan2 implementation by Paolo Valle, resolves #39861 2022-08-10 18:23:22 +02:00
marcoonthegit
53d745962f * also add other threadpool functions 2022-08-09 11:27:23 +02:00
marcoonthegit
fd179a61f9 * give pthread_start_routine a proper Delphi compat prototype.
* add Delphi alias for callback.
 * add queueuserworkitem
 * add name clause GetDateFormatEx

closes #39852
2022-08-09 09:59:42 +02:00
florian
a45ba3add5 * x86-64: math helpers do not need a stackframe 2022-08-05 23:02:05 +02:00
Benito van der Zander
7704fe9319 fix stack trace crash, see #39492 2022-08-03 22:28:03 +02:00
Pierre Muller
7a1f617194 Cleanup bsd and sysctl units make rules 2022-07-17 21:12:14 +00:00
florian
799c22d553 Revert " * patch by Rika: SwapEndian([u]int16) has unnecessary “and $FFFF”, resolves #39814"
This reverts commit f92102a5f2.

The and $ffff is needed to avoid range check warnings when the function is inlined with a constant parameter
2022-07-15 18:56:11 +02:00