florian
70a836c4a2
* first part of merging parts of Jeppe's intrinsics patch, mainly r31135
...
is merged by this commit with a lot of adaptions
git-svn-id: trunk@43949 -
2020-01-14 21:52:39 +00:00
florian
931d4dcfee
* ensure the rtl and the packages for embedded compile with features exceptions and classes disabled
...
git-svn-id: trunk@43931 -
2020-01-13 21:20:03 +00:00
ondrej
34fecf90f3
SysUtils: add ExpandFileName with a BasePath overload
...
git-svn-id: trunk@43928 -
2020-01-13 12:36:35 +00:00
Jonas Maebe
1f5efe2a95
* support for constrained sitofp/uitofp with (the upcoming) LLVM 10.0
...
(fixes most of test/units/math/troundm, although there's still an LLVM
optimizer/code generation bug that breaks some qword -> double
conversions)
git-svn-id: trunk@43829 -
2019-12-31 18:05:54 +00:00
Jonas Maebe
9b53ed53e3
* the llvm.experimental.constrained.fpext intrinsic doesn't have a rounding
...
mode parameter
git-svn-id: trunk@43828 -
2019-12-31 18:05:50 +00:00
Jonas Maebe
a6a17efa42
* use LLVM constrained fpext/fptrunc intrinsics when fastmath is not enabled
...
for accurate exception behaviour
git-svn-id: trunk@43820 -
2019-12-30 15:05:13 +00:00
Jonas Maebe
797077855e
* use constrained LLVM fp intrinsics for add/sub/mul/slash/fma/sqrt
...
operations when fastmath is not enabled
git-svn-id: trunk@43819 -
2019-12-30 15:05:09 +00:00
florian
7032c80041
* accept #26 as eof in iso mode, resolves #35136
...
git-svn-id: trunk@43801 -
2019-12-28 10:35:46 +00:00
svenbarth
5610f992b4
* if a CPU platform does not provide a FarPointer type then declare it as an alias to a mere Pointer
...
git-svn-id: trunk@43776 -
2019-12-24 21:30:00 +00:00
svenbarth
abe6e740f5
* Delphi allows overloading based on Comp, so declare it as a type rename instead of a mere alias
...
git-svn-id: trunk@43775 -
2019-12-24 21:29:57 +00:00
svenbarth
ad0d885880
* if a CPU platform doesn't explicitely provide the Comp type we declare it as an alias to Int64
...
git-svn-id: trunk@43774 -
2019-12-24 21:29:53 +00:00
svenbarth
042bbdf613
* as long as the Comp type is declared, declare PComp as well
...
git-svn-id: trunk@43773 -
2019-12-24 21:29:51 +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
e332c17bbd
* some inconsistency regarding FPC_NONE usage fixed
...
git-svn-id: trunk@43770 -
2019-12-24 16:14:30 +00:00
florian
8b24033e93
* last fix was most likely not complete
...
git-svn-id: trunk@43712 -
2019-12-22 23:39:44 +00:00
florian
0dabe49601
* fix building on non-unix/windows targets
...
git-svn-id: trunk@43711 -
2019-12-22 23:34:22 +00:00
florian
99680eb88c
* patch by Anton Kavalenka: heaptrc: Improve tracing by printing actual
...
module name (ether EXE or DLL), resolves #36130
git-svn-id: trunk@43710 -
2019-12-22 22:51:53 +00:00
florian
33fa211b84
+ x86-64: assembler implementation for u128_div_u64_to_u64 for SysV ABI
...
* reminder => remainder (thanks to Stefan Kanthak for pointing it out)
git-svn-id: trunk@43695 -
2019-12-17 21:54:47 +00:00
Jonas Maebe
0f46207776
* fixed (harmless) range error when expanding ~
...
git-svn-id: trunk@43559 -
2019-11-22 21:11:56 +00:00
ondrej
9a9cd15ec4
TInterfacedObject.Destroy: fix case for correct auto-completion
...
git-svn-id: trunk@43418 -
2019-11-08 21:29:26 +00:00
Jonas Maebe
490f057aa1
* replaced the arrays in the generic set helpers with arrays of 32 bytes
...
instead of high(cardinal), so LLVM doesn't get tricked into massively
unrolling and parallelising those loops
git-svn-id: trunk@43408 -
2019-11-06 21:50:23 +00:00
yury
4ade471488
* GetModuleByAddr: Prevent returning a name of the current executable for invalid addresses such as pointer(-1) on Windows.
...
git-svn-id: trunk@43364 -
2019-11-02 14:54:25 +00:00
florian
828e961f3d
* remove unused constants
...
git-svn-id: trunk@43351 -
2019-11-01 18:39:17 +00:00
florian
3b1903b430
* simplified fpc_mul_qword so it compiles again on avr, fixes #36236 but does not solve the root of the problem
...
git-svn-id: trunk@43342 -
2019-10-31 21:02:23 +00:00
pierre
d80734b412
Completely disable Round functions if FPUNONE is defined, to fix avr builds without flaot support
...
git-svn-id: trunk@43305 -
2019-10-23 06:38:10 +00:00
marcus
d90741d2f2
Fixed compilation after r43281 2nd try, some more "R"s
...
git-svn-id: trunk@43283 -
2019-10-21 07:51:59 +00:00
marcus
e833876f05
Fixed compilation after r43281
...
git-svn-id: trunk@43282 -
2019-10-21 07:38:04 +00:00
florian
d3c898a96b
* properly round in ISO mode, resolves #35626
...
git-svn-id: trunk@43281 -
2019-10-20 21:11:40 +00:00
florian
88648248ec
* fix random(<int64>) for 32 Bit CPUs
...
git-svn-id: trunk@43194 -
2019-10-13 20:23:01 +00:00
florian
b02470468b
* handle off by one in FilePos due to the filled buffer in iso mode, resolves #40850
...
git-svn-id: trunk@43188 -
2019-10-13 11:37:37 +00:00
florian
c189af0e3d
* improved software floating point exception handling in the rtl
...
git-svn-id: trunk@43163 -
2019-10-10 20:31:31 +00:00
florian
c0372f80e0
* with section threadvars, heap relocation is not needed
...
git-svn-id: trunk@43130 -
2019-10-05 20:48:27 +00:00
svenbarth
daa746243a
* use clib constant instead of literal 'c' in case we have a target where the library is not called 'c' (hopefully all targets that use cgeneric.inc have the clib constant declared in their sysos.inc)
...
git-svn-id: trunk@43121 -
2019-10-05 09:42:55 +00:00
florian
5ed2475c85
* InitThread variant without parameters as user threads normally cannot know the max. stack size
...
git-svn-id: trunk@43068 -
2019-09-25 21:19:01 +00:00
pierre
ee22dbe589
Handle change of memory base address after call to SysTryResizeMem
...
git-svn-id: trunk@43062 -
2019-09-24 12:44: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
Jonas Maebe
13902c1c7a
* fixed compilation for __ARM_EABI_UNWINDER__ with -dexcdebug
...
git-svn-id: trunk@43015 -
2019-09-15 17:26:21 +00:00
florian
1872bee116
* stack checking checks also proper alignment
...
git-svn-id: trunk@43011 -
2019-09-15 17:17:30 +00:00
Jonas Maebe
617cc6984b
* call DoUnhandledException instead of RunError(217) when the the psabi eh
...
unwinder returns an error (this is usually because there is no outer
exception catching frame anymore -> unhandled exception) (based on patch by
Cyrax, mantis #35751 )
git-svn-id: trunk@42999 -
2019-09-14 17:30:53 +00:00
florian
ed688aceee
* remove packed from tdynarray, it is not needed and especially 64 bit CPUs which require proper aligment, suffer from it
...
git-svn-id: trunk@42920 -
2019-09-04 20:45:23 +00:00
svenbarth
c1e3c61af3
* don't call the memory manager's functions, but instead call the Sys* functions directly
...
git-svn-id: trunk@42797 -
2019-08-24 10:37:20 +00:00
svenbarth
f88a98e976
* heaptrc should not rely on the original SysAllocMem calling the heaptrace memory manager's functions
...
git-svn-id: trunk@42796 -
2019-08-24 10:37:16 +00:00
svenbarth
00a418f589
* also correctly align the pointer for the record elements inside FPC_COPY
...
git-svn-id: trunk@42781 -
2019-08-23 21:57:17 +00:00
svenbarth
db2a5285a9
* fix for Mantis #35988 : the internal heap uses directly the Sys* functions, not the memory manager
...
git-svn-id: trunk@42774 -
2019-08-23 14:59:15 +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
florian
f0213a2c46
+ make use of the mremap syscall of linux to re-allocate large memory blocks faster
...
git-svn-id: trunk@42713 -
2019-08-16 20:47:37 +00:00
svenbarth
10af6fe2fb
* fix for Mantis #35965 : correct alignment also for the class info used to retrieve the unit name
...
+ added test
git-svn-id: trunk@42697 -
2019-08-15 13:29:19 +00:00
pierre
8015bfb5a0
Fix arm specific failure in tw12048
...
git-svn-id: trunk@42657 -
2019-08-12 12:17:00 +00:00
pierre
d6d3e171ce
Try to fix alignment issues in RTTI code for 64-bit targets which require proper alignment
...
git-svn-id: trunk@42549 -
2019-08-01 14:46:56 +00:00
Jeppe Johansen
1b698d319f
- Fix bug in software overflow checking for longint's.
...
- AVR: Fix overflow checking for HW multiplications
git-svn-id: trunk@42531 -
2019-07-30 13:42:26 +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
Jeppe Johansen
67bf76c50e
- Fix overflow checking in software multiplication routines. Overflow checking should also be enabled for the unsigned multiplications.
...
- Call FPC_Overflow instead of multiple calls to save on size.
git-svn-id: trunk@42491 -
2019-07-25 12:49:55 +00:00
Jonas Maebe
4bc657a067
* renamed objcbase.BOOL type to objc.ObjCBOOL to prevent name clashes
...
* fixed some signatures in CocoaInt that should refer to ctypes.cbool
but instead used objcbase.(ObjC)BOOL
git-svn-id: trunk@42483 -
2019-07-23 09:08:32 +00:00
florian
a60ab40237
* handle records with managed fields correctly after attribute merge fixes
...
git-svn-id: trunk@42480 -
2019-07-21 14:17:27 +00:00
florian
217ae6e4bb
* more fixes to rtti after attribute branch merging
...
git-svn-id: trunk@42476 -
2019-07-21 08:28:29 +00:00
svenbarth
e97a2cb03e
* tests with Delphi showed that an attribute class must explicitely declare a parameterless constructor if it should be used, cause TCustomAttribute.Create is private
...
Note: this also means that TCustomAttribute itself can not be used as an attribute
* adjusted existing tests
+ added test
git-svn-id: trunk@42471 -
2019-07-20 20:03:38 +00:00
svenbarth
48b8110e38
* disable UCS4String if dynamic arrays are disabled
...
git-svn-id: trunk@42455 -
2019-07-19 11:52:51 +00:00
florian
c932dfaf70
* first bunch of fixes for rtti for arm after attribute commits, fixes mostly alignment issues
...
git-svn-id: trunk@42446 -
2019-07-14 17:45:55 +00:00
svenbarth
c0da39a35d
* Tenum_typedata needs to include the Common record as well
...
git-svn-id: trunk@42438 -
2019-07-13 14:38:24 +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
svenbarth
e296b26e9e
- remove unit info and related code again as that will be handled similar, but differently with dynamic packages
...
git-svn-id: trunk@42369 -
2019-07-12 22:05:47 +00:00
svenbarth
b2932393df
Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
...
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.
git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
Jonas Maebe
789f13eb24
* LLVM-specific support for popcnt
...
git-svn-id: trunk@42311 -
2019-06-30 15:23:36 +00:00
Jonas Maebe
0a91fcb44f
* LLVM-specific support for bsr*/bsf*
...
git-svn-id: trunk@42309 -
2019-06-29 16:27:18 +00:00
Jonas Maebe
c262c5dbc9
* synchronised with trunk till r42256
...
git-svn-id: branches/debug_eh@42257 -
2019-06-20 17:21:34 +00:00
florian
f92b8d1681
* changes shift parameter of shift helpers into ALUUInt, as there is an "and" used anyways, this does not change semantics but reduces register pressure on 8 bit targets
...
git-svn-id: trunk@42200 -
2019-06-09 21:44:18 +00:00
Jonas Maebe
faf75095cd
* synchronised with trunk till r42189
...
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +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
marco
646d7c2a95
* helper in record to make setting parameters a bit denser.
...
git-svn-id: trunk@42147 -
2019-05-31 10:40:54 +00:00
Jonas Maebe
0cd0e1614b
* synchronised with trunk till r42105
...
git-svn-id: branches/debug_eh@42106 -
2019-05-19 19:24:25 +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
Jonas Maebe
9e9a982bfe
* synchronised with trunk till r42095
...
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +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
Jonas Maebe
1b6425176b
* synchronised with trunk till r42049
...
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
svenbarth
46a8afb50d
+ declare Pointer types for the remaining Boolean types
...
git-svn-id: trunk@42032 -
2019-05-10 15:25:08 +00:00
Jonas Maebe
3a1fb45315
* synchronised with trunk till r41976
...
git-svn-id: branches/debug_eh@41977 -
2019-05-02 19:44:41 +00:00
pierre
819752c334
Avoid warnings when -v0 is used by using $push/$pop
...
git-svn-id: trunk@41960 -
2019-04-29 14:19:16 +00:00
Jonas Maebe
a0f850d57f
* synchronised with trunk till r41885
...
git-svn-id: branches/debug_eh@41886 -
2019-04-16 16:20:44 +00:00
pierre
7b3e027dc8
Move update of fields counting allocated memory to after SysGetMem call
...
git-svn-id: trunk@41882 -
2019-04-16 15:05:13 +00:00
Jonas Maebe
3b254affb7
* support for the individual alignment flags for the memcpy intrinsic of
...
LLVM 7.0
git-svn-id: branches/debug_eh@41728 -
2019-03-17 15:28:23 +00:00
Jonas Maebe
dc2cbf8018
* synchronised with trunk till r41725
...
git-svn-id: branches/debug_eh@41726 -
2019-03-17 15:25:31 +00:00
svenbarth
07b1a3d211
* adjust signature of variant managers olevarfromint so that 64-bit values can be passed as well (as was probably intended originally)
...
git-svn-id: trunk@41570 -
2019-03-03 14:50:05 +00:00
florian
b8b3a5b523
* cosmetics
...
git-svn-id: branches/debug_eh@41565 -
2019-03-02 23:04:23 +00:00
florian
0657ce7c02
* get rid of fpc_Resume
...
git-svn-id: branches/debug_eh@41476 -
2019-02-25 21:43:56 +00:00
florian
6b34e511a0
- removed cdecl from FPC_psabi_begin_catch
...
git-svn-id: branches/debug_eh@41475 -
2019-02-25 21:25:22 +00:00
Jonas Maebe
a079e5fa80
* synchronised with trunk till r41449
...
git-svn-id: branches/debug_eh@41450 -
2019-02-24 20:01:53 +00:00
florian
74275a9173
* in ISO mode, f^ is undefined after Rewrite
...
git-svn-id: trunk@41429 -
2019-02-24 10:32:59 +00:00
Jonas Maebe
ac883969a9
* synchronised with trunk till r41423
...
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
5cb5b10f8d
* fixed LLVM and non-i386 compilation
...
git-svn-id: branches/debug_eh@41423 -
2019-02-23 17:03:42 +00:00
florian
8db9b211d5
* fixed unwinding from signal handlers, the approach used now is very simple and clean
...
git-svn-id: branches/debug_eh@41414 -
2019-02-22 22:01:45 +00:00
florian
b1cc02e417
* reraise has to reset the ref. count to 0
...
git-svn-id: branches/debug_eh@41383 -
2019-02-19 22:17:27 +00:00
florian
9e67e7311a
* change the exception address is only useful if a valid frame is passed
...
git-svn-id: branches/debug_eh@41377 -
2019-02-18 22:04:08 +00:00
florian
0e25d6f00d
* better debug messages
...
+ initial approach to handle addr and frame
git-svn-id: branches/debug_eh@41368 -
2019-02-17 21:45:18 +00:00
florian
a91f009b7e
* cleanup
...
git-svn-id: branches/debug_eh@41309 -
2019-02-11 20:33:50 +00:00
florian
3b77146e1c
* adapt FPC_Unwind_Exception for native eh_frame support
...
git-svn-id: branches/debug_eh@41307 -
2019-02-11 20:30:21 +00:00
florian
294c7c9daf
* adapt identifiert name
...
* updates for eh_frame support on native targets
* improved messages
git-svn-id: branches/debug_eh@41306 -
2019-02-11 20:29:02 +00:00
Jonas Maebe
3b87b10904
* explicitly link libobjc to prevent the symbol __objc_empty_cache from
...
resolving to CoreFoundation on macOS 10.14 (which will break running
such programs on older macOS/(Mac) OS X versions)
git-svn-id: trunk@41243 -
2019-02-06 19:48:47 +00:00
nickysn
1c64f4c751
* some formatting changes to avoid very large lines in the source code
...
git-svn-id: trunk@41242 -
2019-02-06 18:26:05 +00:00
nickysn
00a67caa40
* select the middle element in the default quicksort implementation in a way
...
that doesn't generate arithmetic overflow for very large arrays
git-svn-id: trunk@41241 -
2019-02-06 18:05:48 +00:00
nickysn
f4718831ca
* fixed quicksort comment about memory use - our implementation uses O(log n) stack, not O(n log n)
...
git-svn-id: trunk@41236 -
2019-02-06 12:22:08 +00:00
nickysn
f32748a8e7
+ added comment with information about QuickSort and its specific implementation in unit SortBase
...
git-svn-id: trunk@41232 -
2019-02-05 18:02:48 +00:00
nickysn
eca60a0a89
* partition elements equal to the pivot on both sides of the pivot, since that
...
leads to much better performance when sorting lots of repeating elements
git-svn-id: trunk@41231 -
2019-02-05 17:32:28 +00:00
nickysn
bea9961d2d
* use SizeUInt instead of longint for the array indices in the quicksort
...
implementations. This:
1) allows sorting arrays with >4G elements on 64-bit systems
2) allows sorting arrays with up to 4G (>2G) elements on 32-bit systems
3) uses 16-bit instead of the less efficient 32-bit indices on 16-bit and
8-bit platforms
git-svn-id: trunk@41230 -
2019-02-05 16:20:56 +00:00
nickysn
f5f25f7ae6
* use a more robust QuickSort implementation, that is guaranteed to never loop
...
forever and never access index out of bounds elements from the array when
being passed an incorrect comparison function. The resulting sort order is
still undefined in this case, though.
git-svn-id: trunk@41229 -
2019-02-05 16:00:42 +00:00
nickysn
de80621e1e
* use a try..finally block to protect against memory leaks if the comparison
...
callback function raises an exception in QuickSort_ItemList_Context
git-svn-id: trunk@41228 -
2019-02-05 12:14:09 +00:00
nickysn
26486bbaea
+ keep track of the pivot index in all quicksort implementations. No functional changes,
...
but will be used to prevent overlap in the divided subregions and also infinite loops
in case of an incorrect compare function.
git-svn-id: trunk@41222 -
2019-02-04 15:32:41 +00:00
Jonas Maebe
1b48e6abe8
* _Unwind_SetGR/_Unwind_GetGR/_Unwind_SetIP/_Unwind_GetIP implementation for
...
ARM EABI
git-svn-id: branches/debug_eh@41214 -
2019-02-03 21:10:07 +00:00
Jonas Maebe
ef1757a5a7
+ ARM EABI exception handling support for PSABIEH
...
git-svn-id: branches/debug_eh@41213 -
2019-02-03 21:10:04 +00:00
Jonas Maebe
d835a91a31
* detabbed
...
git-svn-id: branches/debug_eh@41212 -
2019-02-03 21:10:01 +00:00
Jonas Maebe
d93c05a90c
* synchronised with trunk till r41207
...
git-svn-id: branches/debug_eh@41208 -
2019-02-03 21:05:37 +00:00
nickysn
ea340b9481
* fixed bug in QuickSort_ItemList_CustomItemExchanger_Context and
...
QuickSort_ItemList_Context and which can cause wrong sort results, due to not
taking into account that the pivot can be moved by the swap operation
git-svn-id: trunk@41191 -
2019-02-03 16:34:05 +00:00
nickysn
c7d8bd9666
+ added a sort algorithm interface that accepts a custom callback function for
...
exchanging two elements. This is required for TStringList.Sort (and is the
most generic form for a sort algorithm interface that I can think of).
git-svn-id: trunk@41182 -
2019-02-03 00:33:43 +00:00
nickysn
59a75ea429
* use Inc() and Dec() instead of v:=v+1
...
git-svn-id: trunk@41178 -
2019-02-02 22:58:52 +00:00
nickysn
4082b8c7fc
+ added and implemented QuickSort_ItemList_Context
...
git-svn-id: trunk@41175 -
2019-02-02 21:21:07 +00:00
nickysn
7f44f2535e
* the Compare parameter renamed Comparer for consistency
...
git-svn-id: trunk@41174 -
2019-02-02 21:08:30 +00:00
nickysn
8cf5779297
* the first parameter of QuickSort_PtrList_NoContext renamed ItemPtrs for
...
consistency with the other similar procedures
git-svn-id: trunk@41173 -
2019-02-02 21:07:27 +00:00
nickysn
a2a0ed53b2
* the type of the ItemCount parameter changed from PtrUInt to SizeUInt
...
git-svn-id: trunk@41172 -
2019-02-02 21:05:02 +00:00
nickysn
848890e54b
+ added the TItemListSorter_NoContext and TItemListSorter_Context procedure
...
types to sortbase. No implementation for them yet. They will allow sorting
an array with elements of arbitrary size (e.g. array of records).
git-svn-id: trunk@41171 -
2019-02-02 21:03:10 +00:00
nickysn
25f6da7066
* added PtrList to the names of the current sort algorithm callback functions and
...
types, to indicate they sort a list of pointers
git-svn-id: trunk@41170 -
2019-02-02 20:56:59 +00:00
nickysn
248fd313f8
+ introduced unit SortBase, which implements the foundation for pluggable
...
sorting algorithms. A default QuickSort implementation is provided by the
unit. Other units can be added, to provide other sorting algorithms (e.g.
HeapSort, MergeSort, IntroSort, etc.)
* TList and TFPList updated to use the current default sorting algorithm defined
in SortBase for their .Sort method.
git-svn-id: trunk@41167 -
2019-02-02 20:06:50 +00:00
Jonas Maebe
a0d796e98d
* synchronised with trunk till r41159
...
git-svn-id: branches/debug_eh@41160 -
2019-02-01 17:01:54 +00:00
Károly Balogh
7bc03f2590
reverted accidental commit to text.inc
...
git-svn-id: trunk@41089 -
2019-01-28 04:18:50 +00:00
Károly Balogh
c85f7cfc26
aros/amigaos4: enabled ELF32/64 and GetModuleAddr() in exeinfo, based on the MorphOS versionexeinfo.pp
...
git-svn-id: trunk@41088 -
2019-01-28 04:16:44 +00:00
Jonas Maebe
b3a8543a56
* synchronised with trunk till r40942
...
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
michael
f3cb1b12ce
* Insert and Delete are compiler internals now, need fake definitions
...
git-svn-id: trunk@40932 -
2019-01-20 12:52:17 +00:00
michael
e69f4c1e4b
* Fix bug ID #19842 using patch from Bart Broersma
...
git-svn-id: trunk@40908 -
2019-01-19 16:35:30 +00:00
Károly Balogh
56f0a71466
heaptrc: empty the array for the call trace, otherwise the trace dump code will just dump the rest of the array as well, on systems where the heap is not initialized to zero, or if the memory area has been re-used
...
git-svn-id: trunk@40856 -
2019-01-13 16:23:18 +00:00
florian
dd072ce76b
+ seek for typefiles in iso mode, resolves #34848
...
git-svn-id: trunk@40850 -
2019-01-12 23:29:20 +00:00
Károly Balogh
b2dafed7c5
haiku: drop the old OpenElf32Beos function, and have a platform specific GetModuleByAddr, this fixes lineinfo on stacktraces (both i386-stabs and x86_64-dwarf2)
...
git-svn-id: trunk@40845 -
2019-01-11 19:51:13 +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
Jonas Maebe
31c047adf8
* synchronised with trunk till r40605
...
git-svn-id: branches/debug_eh@40606 -
2018-12-21 20:58:16 +00:00
Jonas Maebe
4f72edcdd5
+ LLVM support for the FMA intrinsics
...
git-svn-id: trunk@40604 -
2018-12-21 20:57:19 +00:00
Jonas Maebe
b41cd1eb6a
* synchronised with trunk till r40575
...
git-svn-id: branches/debug_eh@40576 -
2018-12-16 20:45:55 +00:00
Jonas Maebe
2330164ee2
+ internal sqrt support for LLVM (faster on all platforms, necessary on
...
platforms that don't have RTL support for it, as the the generic
fpc_sqrt_real just calls runerror)
git-svn-id: trunk@40575 -
2018-12-16 20:44:41 +00:00
Jonas Maebe
440026bb25
* synchronised with trunk till r40503
...
git-svn-id: branches/debug_eh@40504 -
2018-12-08 15:33:36 +00:00
Jonas Maebe
14f3676b2a
+ llvm_lifetime_start/llvm_lifetime_end intrinsic declarations
...
git-svn-id: trunk@40500 -
2018-12-08 15:31:45 +00:00
Jonas Maebe
9630eb7ce9
* synchronised with trunk till r40466
...
git-svn-id: branches/debug_eh@40467 -
2018-12-04 19:54:31 +00:00
Jonas Maebe
122d0d36d6
+ volatile() expression that marks an expression as volatile
...
* disable matching volatile references in the assembler optimisers, so they
can't be removed (more conservative than needed, but better than removing
too many)
o the CSE optimiser will ignore them by default, because they're an unknown
inline node for it
* also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
right place
git-svn-id: trunk@40465 -
2018-12-04 19:53:20 +00:00
florian
90557f2e62
* properly calcualte aligncount as proposed by Jeppe, should resolve #33323
...
git-svn-id: trunk@40449 -
2018-12-02 14:49:24 +00:00
Jonas Maebe
42f82f4d40
* the libunwind API resides in libgcc_s on Linux
...
o also link against libc (the current llvm code generator assumes it for
memcpy, and libgcc_s depends on it anyway)
git-svn-id: branches/debug_eh@40433 -
2018-12-01 20:30:31 +00:00
Jonas Maebe
aff3a15081
* call runerror(217) instead of halt(217) when using Dwarf-EH in similar
...
cases as where this happens with the standard SjLj-base exception handling
git-svn-id: branches/debug_eh@40419 -
2018-11-29 21:38:58 +00:00
Jonas Maebe
df0a126064
* abstracted rest of the generic exception handling code through the
...
texceptionstatehandler class + llvm overrides
+ added FPC_DummyPotentialRaise routine that gets called at the begin and end
of try-blocks to be able to catch hardware exceptions to a limited extent
with LLVM
git-svn-id: branches/debug_eh@40418 -
2018-11-29 21:31:40 +00:00
Jonas Maebe
4e73919676
- removed FPC 2.6.x bootstrapping code
...
git-svn-id: branches/debug_eh@40407 -
2018-11-29 21:31:05 +00:00
Jonas Maebe
3cfad8fba8
* renamed FPC_USE_PSEABIEH to FPC_USE_PSABIEH
...
git-svn-id: branches/debug_eh@40400 -
2018-11-29 21:30:42 +00:00
Jonas Maebe
b2608ba02a
+ fpc_reraise and fpc_raise_nested implementations for psabieh
...
git-svn-id: branches/debug_eh@40370 -
2018-11-25 21:05:55 +00:00
Jonas Maebe
9c5a62351d
* more -dexcdebug output
...
o also fixed _Unwind_RaiseException declaration (function rather than
procedure)
git-svn-id: branches/debug_eh@40369 -
2018-11-25 21:05:51 +00:00
Jonas Maebe
8153aa1d00
* fixed frames memory leak when freeing an exception with psabieh
...
git-svn-id: branches/debug_eh@40368 -
2018-11-25 21:05:47 +00:00
Jonas Maebe
bfc7c58a69
* synchronised with trunk till r40348
...
git-svn-id: branches/debug_eh@40349 -
2018-11-18 12:01:50 +00:00
Jonas Maebe
e2664e5c30
* fixed recording caught exceptions on the exception stack in
...
FPC_psabi_begin_catchh
git-svn-id: branches/debug_eh@40341 -
2018-11-17 16:21:40 +00:00
Jonas Maebe
f4fa4e22b1
* added a bunch of writeln debugging with -dexcdebug
...
git-svn-id: branches/debug_eh@40335 -
2018-11-17 09:40:33 +00:00
Jonas Maebe
31898da437
* fixed (u)leb reading functions
...
git-svn-id: branches/debug_eh@40334 -
2018-11-17 09:40:30 +00:00
Jonas Maebe
64ba860478
* added psabi eh helpers called from the code generator to the interface of
...
the system unit
* changed a cint to longint as C types are not available there
git-svn-id: branches/debug_eh@40333 -
2018-11-17 09:40:26 +00:00
florian
72416edcc4
+ support for tlsm_general on i386-linux
...
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
florian
9c041afc7c
* disable generic threadvar handling if section thread vars are available
...
git-svn-id: trunk@40270 -
2018-11-07 22:03:01 +00:00
yury
a19528efa1
* Fixed warnings.
...
git-svn-id: trunk@40188 -
2018-11-02 19:22:46 +00:00
yury
a077e0dd90
* Fixed comparison.
...
git-svn-id: trunk@40186 -
2018-11-02 19:04:26 +00:00
Jonas Maebe
4bc0e49878
- removed unused FPC_psabieh_can_catch()
...
* added missing exit in FPC_psabieh_find_action_record
* fixed type error in call to _Unwind_SetGR() (caught by compiler fix for
that intrinsic)
git-svn-id: branches/debug_eh@40073 -
2018-10-28 19:54:04 +00:00
Jonas Maebe
b2d1ab7f05
* basic helpers for DWARF/PSABI EH-based exception handling (based on
...
GCC 4.2.1's libstdc++/libsupc++)
- compile RTL with -dFPC_USE_PSEABIEH to include
- the x86-64 compiler currently crashes if it has been compiled with
optimizations (the eh_return_data_regno function from cpubase
probably triggers mantis #34385 )
git-svn-id: branches/debug_eh@40071 -
2018-10-28 18:16:42 +00:00
Jonas Maebe
8555ec1438
+ fpc_eh_return_data_regno() intrinsic to get the return register numbers
...
for the Dwarf EH exception handler result
git-svn-id: branches/debug_eh@40070 -
2018-10-28 18:16:38 +00:00
michael
3b1622f10a
* Add GetTypeKind
...
git-svn-id: trunk@40060 -
2018-10-28 10:47:57 +00:00
florian
33463c8698
* moved align helper so it actually gets inlined
...
git-svn-id: trunk@40011 -
2018-10-21 20:50:21 +00:00
Jonas Maebe
fbfc98a600
* changed definitino of Objective-C BOOL type to Boolean8 where
...
appropriate
* changed all Boolean types in the Cocoa headers to BOOL (rest of
mantis #34411 )
git-svn-id: trunk@39950 -
2018-10-16 21:14:26 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
yury
19fa828466
* android: Use the current dir as temp.
...
git-svn-id: trunk@39869 -
2018-10-06 15:20:20 +00:00
Tomas Hajny
62b57e81cd
* FExpand / ExpandFileName behaviour updated according to discussion in bug #34166
...
git-svn-id: trunk@39840 -
2018-09-28 22:57:57 +00:00
svenbarth
cc354f9d72
* have the fpc_*_copy compiler intrinsics reference the intrinsic symbol they belong to
...
git-svn-id: trunk@39816 -
2018-09-26 21:33:46 +00:00
florian
a34d4e715c
Merged riscv_new branch
...
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
Jeppe Johansen
74a7963d58
Redo overflow checking code.
...
Fix shift operators in case of unsigned subreg operations. There should be no sign extension here.
Add some unittest implementations that test stack execution and writing to readonly constants.
git-svn-id: branches/laksen/riscv_new@39762 -
2018-09-16 18:37:59 +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
pierre
70fae803ce
Increase default trace size to 16
...
git-svn-id: trunk@39734 -
2018-09-11 13:08:51 +00:00
svenbarth
a076677336
* instead of a flags field generate a table with all Initialize operators of all fields (nested or not, parent class or not) for class types; objects and records don't use this (yet)
...
git-svn-id: trunk@39690 -
2018-08-29 19:21:35 +00:00
svenbarth
d9cb5c4502
+ add a Boolean8 alias for Boolean for symmetry's sake (fixes Mantis #34058 )
...
git-svn-id: trunk@39673 -
2018-08-24 15:53:10 +00:00
marco
096e7d7513
* add prawbytestring.
...
git-svn-id: trunk@39662 -
2018-08-22 12:26:42 +00:00
marco
15fcd0ab61
* remove old ifdefs
...
git-svn-id: trunk@39642 -
2018-08-19 14:54:58 +00:00
pierre
e4346b264f
Add missing alignment in DynArrayIndex function
...
git-svn-id: trunk@39586 -
2018-08-07 16:34:57 +00:00
Jeppe Johansen
f2670bc8fb
Fix missing alignment call.
...
git-svn-id: branches/laksen/riscv_new@39523 -
2018-07-29 14:18:19 +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
pierre
18cc1f1709
Try to implement CheckPointer exclusion range for FreeBSD OS
...
git-svn-id: trunk@39394 -
2018-07-06 09:08:54 +00:00
nickysn
26a3ac3fd4
* moved the fpc_in_x86_*port* constants to the system unit in cpuinnr.inc in the
...
i8086, i386 and x86_64 rtl directories. This is done for consistency with
other compiler internal function numbers (which are declared in innr.inc).
git-svn-id: trunk@39367 -
2018-07-03 21:30:43 +00:00
florian
781ecf4a59
* modified patch by Bart Broersma to resolves #33932 : fixes compilation error with FPC_SOFT_FPUX80 in TExtended80Rec.BuildUp
...
git-svn-id: trunk@39354 -
2018-07-01 12:54:30 +00:00
florian
2406bd052e
* by default, TExtended80Rec.Mantissa should not return the hidden bit (the binary representation of the data type contains it always
...
git-svn-id: trunk@39348 -
2018-06-30 11:25:43 +00:00
michael
a9205c9fba
* Fix bug ID #32837 , correct Mantissa and Fraction in float helpers, patch from Bart Broersma
...
git-svn-id: trunk@39346 -
2018-06-29 20:51:32 +00:00
svenbarth
8536abce8a
* as the management operator feature is not platform specific using a specific define for it aside from a
...
version check is unnecessary, thus remove the FPC_HAS_MANAGEMENT_OPERATOR define and instead check for VER3_0
git-svn-id: trunk@39257 -
2018-06-20 19:00:24 +00:00
svenbarth
4d0ab82ef7
* optimize class initialization by calling RTTIRecord() only when required for a non-trivial initialization
...
git-svn-id: trunk@39256 -
2018-06-20 19:00:21 +00:00
svenbarth
ac0322c323
+ add a flags field to the record init RTTI which declares whether
...
a) the current record contains a field with non-trivial initialization
b) and of the parents contains such a field (only relevant for objects and classes)
git-svn-id: trunk@39255 -
2018-06-20 19:00:17 +00:00
svenbarth
eb06ac8ce8
* set up $MinEnumSize and $PackSet so that it matches the compiler's settings for types added in the future
...
git-svn-id: trunk@39254 -
2018-06-20 19:00:14 +00:00
svenbarth
393d1c2256
* move RTTI related types from rtti.inc to rttidecl.inc
...
git-svn-id: trunk@39250 -
2018-06-20 19:00:03 +00:00
svenbarth
bbf578b193
* move definition of USE_PACKED from rtti.inc to rttidecl.inc
...
git-svn-id: trunk@39249 -
2018-06-20 19:00:00 +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
marco
43d7b23555
* fix for #33817 , also p* marshalledstring for Delphi compat.
...
git-svn-id: trunk@39165 -
2018-06-04 10:58:23 +00:00
nickysn
b18602485a
* fixed base segment calculation on i8086 (code moved after call to OpenDwarf,
...
because it needs to have e.processsegment initialized)
git-svn-id: trunk@39114 -
2018-05-25 00:52:14 +00:00
nickysn
45bcbca71b
* fixed reading of DW_FORM_ref_addr on i8086
...
git-svn-id: trunk@39113 -
2018-05-25 00:21:53 +00:00
nickysn
2a5fbd4598
* continue reading the segment when walking the dwarf arange tuples on i8086
...
git-svn-id: trunk@39076 -
2018-05-20 22:51:52 +00:00
nickysn
d1cdd8be7c
* do not emit padding bytes after the dwarf arange header on i8086 for
...
compatibility with Open Watcom (also, the dwarf spec is not very clear about
the alignment requirements on segmented architectures, so that's why we do
this by default, instead of putting it behind a -go debug switch)
git-svn-id: trunk@39075 -
2018-05-20 22:50:46 +00:00
nickysn
6fedf7e930
+ debug dump the address size from the header in ParseCompilationUnitForFunctionName
...
git-svn-id: trunk@39070 -
2018-05-20 20:41:13 +00:00
nickysn
a598e17c8a
* fix loading of i8086-msdos ELF when the MZ binary in front of it exceeds 64kb
...
git-svn-id: trunk@39069 -
2018-05-20 20:18:00 +00:00