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 #40171
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 #38237
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 #38201
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 #36081 : 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 #35878 )
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
Jeppe Johansen
ceb38833f2
Added RiscV32/64 target, from a cleaned up version of branches/laksen/riscv/trunk.
...
git-svn-id: branches/laksen/riscv_new@39474 -
2018-07-20 08:21:15 +00:00
svenbarth
b75324a4f2
* move RTTI declarations to their own header file
...
git-svn-id: trunk@39248 -
2018-06-20 18:59:57 +00:00
svenbarth
44b15350fb
* disable RTTI declarations if RTTI feature is disabled
...
git-svn-id: trunk@39247 -
2018-06-20 18:59:54 +00:00
pierre
5f8f00dcd3
Allow to use CPU specific code for move procedure for systems using libc code with -dUSE_CPU_MOVE (allows easier testing for AIX, no effect by default)
...
git-svn-id: trunk@38976 -
2018-05-11 15:52:48 +00:00
pierre
250e924ad3
+ Add RTE 236 for thread errors:
...
inc/systemh.inc and java/jsystemh.inc:
+ Add reThreadError (and also reNoDynLibsSupport) to TRuntimeError.
* Add new values to RuntimeErrorExitCodes after extension of TRuntimeError
inc/system.inc and java/jsystem.inc:
* use RTE 236 in fpc_threaderror.
objpas/sysconst.pp and objpas/sysutils/stre.inc:
+ Add SThreadError string constant.
objpas/sysutils/sysutilh.inc:
+ Add EThreadError class.
objpas/sysutils/sysutils.inc
+ Add 236 to EThreadError conversion to exeptmap.
git-svn-id: trunk@38584 -
2018-03-21 10:19:04 +00:00
florian
22df9cde3e
* halt and runerror never return
...
git-svn-id: trunk@38202 -
2018-02-11 10:21:16 +00:00
Károly Balogh
07513150e0
* make StdOut/StdErr optionally a true alias of Output/ErrOutput, so they share the same underlying TextRec. this reduces data segment usage on small systems by more than 1K.
...
git-svn-id: trunk@38196 -
2018-02-10 22:45:51 +00:00
svenbarth
e09ec0e36b
+ add ability to have explicitely implemented Pointer overloads of the Interlocked* routines instead of forwarding them to the ones with suitable size.
...
git-svn-id: trunk@38052 -
2018-01-26 21:36:35 +00:00
florian
b086b10adf
* enable more features for avr6
...
* ifdef'ed uncompilable procedures
git-svn-id: trunk@37584 -
2017-11-12 22:14:21 +00:00
svenbarth
8b5461367b
* move TTypeKind from TypInfo unit to System unit as it's necessary for the future GetTypeKind() intrinsic
...
* also adjust (P)Byte usages to (P/T)TypeKind where necessary/approbiate
git-svn-id: trunk@36873 -
2017-08-11 20:37:36 +00:00