Commit Graph

424 Commits

Author SHA1 Message Date
Rika Ichinose
11942fcf01 Cover more values in the [0; 1) range by “random”. 2024-06-01 16:55:36 +00:00
Pierre Muller
d1510840d0 Fix compilation of rtl with -dDISABLE_SYSTEMINLINE 2024-05-02 07:47:57 +00:00
florian
b81f92536d * avoid that fpc_fillmem does not inline due too much nested calls 2024-01-15 22:42:53 +01:00
Michael VAN CANNEYT
31ef662201 * check zero length instead of comparing to empty string 2023-07-14 17:26:11 +02:00
Michael VAN CANNEYT
f75f208992 * Add IndexChar for widechar 2023-07-14 17:26:11 +02:00
Michael VAN CANNEYT
d2d3fe6bc3 * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michaël Van Canneyt
6e5c4667cd * Do not compile pointer overloads of atomic operations for MS-DOS/i8086 2023-07-13 16:18:04 +02:00
Pierre Muller
032158d943 Fix system compilation for CPU16 2023-07-10 07:04:11 +02:00
Pierre Muller
ba2b29bd2c Fix cpu16 error in AtomicCmpExchange 2023-07-10 06:54:18 +02:00
Michaël Van Canneyt
2a87366086 * Delphi compatibility aliases for Interlocked* functions 2023-07-09 15:44:55 +02:00
Jinyang He
6ef31c643a Set STACK_MARGIN_MAX to four times of pagesize on LoongArch64
It fixed a test named tstack. Actually, Linux user get the stacktop is
incorrect in current. The value of stack pointer when enter the procedure
is thought as it is in the highest stack page. But if the parameters is
enough large, lager than 16k, most of arch will also fail this test.
Since the LoongArch default pagesize is 16k, it fail often because
stack-layout-randomization causes the stackpointer underflow to next page.
I had tried fixed it in rtl/linux/[arch]/si_*. But because the codes is
unworthy and hardly the parameters is enough large, just expand
STACK_MARGIN_MAX for simplicity.
2023-06-21 07:27:36 +00:00
florian
159fa78514 * patch by Rika: fix for 15f29b8fa0 2023-02-26 10:52:35 +01:00
florian
15f29b8fa0 * patch by Rika: Perform 32-bit random if the bound fits into 32 bits at runtime, resolves 2023-02-25 19:57:50 +01:00
Jinyang He
664c613d96 add loongarch64 rtl support 2023-02-05 19:18:48 +00:00
Jonas Maebe
0758aa1143 FPU exception mask: generlised system unit interface 2022-10-17 19:43:01 +00:00
florian
308bc29465 * setting of MIPS64(EL) in system.inc fixed 2022-02-08 23:08:13 +01:00
florian
91cf1774dd * replace MT random generator by Xoshiro128**, resolves 2021-10-05 22:20:22 +02:00
Károly Balogh
7b9ed5fe46 rtl: make STACK_MARGIN a variable instead of a const. this allows adjusting margin size on system unit init, based on the actual stack length of the executable. useful for small systems running with little stack. allow overwriting SysBackTraceStr with a platform-specific implementation
git-svn-id: trunk@49200 -
2021-04-14 02:35:01 +00:00
Károly Balogh
45b5e9215c rtl: remove defines for v2.x compiler from the common part of the RTL. It's no longer suppported to build with that
git-svn-id: trunk@49036 -
2021-03-23 09:32:49 +00:00
nickysn
a5fafea8d1 * more updates to attempt to get a larger part of the full RTL to compile for WASM32
git-svn-id: branches/wasm@47970 -
2021-01-02 13:01:39 +00:00
florian
2e2f2eb784 - remove could which prevented that rte is triggered even if we are inside
an exception block but *without* using sysutils. The remove code
    was once added to have primitive exception handling even if
    no sysutils is used. But if this is desired, an appropriate handler
    to ErrorProc should be assigned. Resolves 

git-svn-id: trunk@47775 -
2020-12-14 21:55:42 +00:00
ondrej
1a0ba60de6 * revert r47598: implement TRandomGenerator
git-svn-id: trunk@47605 -
2020-11-27 04:53:06 +00:00
ondrej
c4dd3b661a * rtl: implement TRandomGenerator for thread-safe random
git-svn-id: trunk@47598 -
2020-11-26 05:59:00 +00:00
florian
e718cb985e * replace some longint by ObjpasInt
git-svn-id: trunk@47047 -
2020-10-04 20:50:39 +00:00
florian
1bf58c2a55 + introduce TExitCode
git-svn-id: trunk@47029 -
2020-10-01 20:33:02 +00:00
florian
1e4dc56155 * inlinable frame handling dummies for avr
* inline frame handler if possible

git-svn-id: trunk@47025 -
2020-09-30 21:18:33 +00:00
yury
aa633544f1 * Added a simple implementation of random. It is TP/Delphi compatible. Enabled it for 8/16 bit CPUs by default.
git-svn-id: trunk@46266 -
2020-08-05 16:29:07 +00:00
nickysn
5b24267529 * reduced the stack margin for stack checking to 64 bytes on the Z80
git-svn-id: trunk@45168 -
2020-04-29 01:22:22 +00:00
nickysn
9c7f1a7cab * synchronized with trunk
git-svn-id: branches/z80@45046 -
2020-04-24 03:30:29 +00:00
yury
8d95da3fea * Windows: Reworked handling of command line arguments to properly support Unicode:
- Use the CommandLineToArgvW API function to parse the Unicode command line (we can use it since Win9x is not supported anymore).
  - Implemented non-public functions ParamStrA and ParamStrU which are exposed in the objpas and uuchar units to provide correct AnsiString and UnicodeString versions of ParamStr(). 
  - The cleanup code is moved from InternalExit to the finalization section of the System unit.

git-svn-id: trunk@45037 -
2020-04-23 12:38:42 +00:00
nickysn
755fe97c51 * synchronize with trunk
git-svn-id: branches/z80@44397 -
2020-03-29 16:24:32 +00:00
florian
83a6efd759 + Xtensa: RTL skeleton
git-svn-id: trunk@44320 -
2020-03-20 22:35:43 +00:00
florian
a20209e691 + tf_init_final_units_by_calls
* arm-embedded generates direct calls for unit init/final now as well

git-svn-id: trunk@43771 -
2019-12-24 16:14:30 +00:00
florian
88648248ec * fix random(<int64>) for 32 Bit CPUs
git-svn-id: trunk@43194 -
2019-10-13 20:23:01 +00:00
pierre
5cc4f0be20 Fix bug report : fix cycling starting with i386-linux 3.0.4 release compiler
git-svn-id: trunk@43029 -
2019-09-18 07:45:47 +00:00
florian
94832d5eea * fixed define
git-svn-id: trunk@43027 -
2019-09-17 18:42:40 +00:00
florian
1872bee116 * stack checking checks also proper alignment
git-svn-id: trunk@43011 -
2019-09-15 17:17:30 +00:00
svenbarth
0c46460548 * m68k has slightly different alignment requirements, so that aligntoptr might result in incorrect addresses for a record's element entries, thus we introduce a separate AlignTypeData function that handles this correctly
git-svn-id: trunk@42764 -
2019-08-22 20:45:45 +00:00
Jonas Maebe
b0683edfcb * simplified random(int64) code
git-svn-id: trunk@42513 -
2019-07-28 12:03:46 +00:00
Jonas Maebe
789f288771 * fixed distribution of random(int64) based on patch by Pangea
(mantis )

git-svn-id: trunk@42508 -
2019-07-28 11:14:58 +00:00
svenbarth
55dfb59631 * TRttiDataCommon is required outside of the RTTI and DynArray include files as well
git-svn-id: trunk@42437 -
2019-07-13 14:38:20 +00:00
svenbarth
3ad24c9db8 * as attributes can be part of any type they are best suited in a common part of TTypeData
git-svn-id: trunk@42375 -
2019-07-12 22:06:09 +00:00
Jeppe Johansen
2f501be2a0 Fixed stack checking for embedded target. Based on work by Christo Crause
git-svn-id: trunk@42157 -
2019-06-01 19:18:31 +00:00
Jonas Maebe
aad87820e6 * abstracted registration of library init/fini routines (to be able to add
LLVM support)

git-svn-id: trunk@42104 -
2019-05-19 19:20:47 +00:00
pierre
902ef73c7c Allways use local pt variable to ameliorate readability of code
git-svn-id: trunk@42082 -
2019-05-16 08:24:45 +00:00
pierre
3a52fdf997 Add FPC_SYSTEM_EXIT_NO_RETURN macro for embedded target
git-svn-id: trunk@40801 -
2019-01-07 21:41:18 +00:00
florian
72416edcc4 + support for tlsm_general on i386-linux
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
yury
a077e0dd90 * Fixed comparison.
git-svn-id: trunk@40186 -
2018-11-02 19:04:26 +00:00
florian
a34d4e715c Merged riscv_new branch
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
pierre
16e2bdad5a Avoid wrap on 32-bit system for StackTop calculation
git-svn-id: trunk@39735 -
2018-09-11 13:10:59 +00:00