Commit Graph

3626 Commits

Author SHA1 Message Date
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
nickysn
2955ee2dc4 + i8086-msdos implementation of exeinfo.GetModuleByAddr
git-svn-id: trunk@39068 -
2018-05-20 20:03:58 +00:00
nickysn
1d3ad2b078 + also take the segment portion of the address in lnfodwrf.ParseCompilationUnit
git-svn-id: trunk@39067 -
2018-05-20 17:20:29 +00:00
nickysn
4ce5db5188 + also check the arange segment in ParseCompilationUnitForDebugInfoOffset
git-svn-id: trunk@39066 -
2018-05-20 17:00:56 +00:00
nickysn
81d5483ab1 * subtract the process load segment from the code segment on i8086
git-svn-id: trunk@39064 -
2018-05-20 16:55:18 +00:00
nickysn
875330d84f + pass a segment (0 on non-i8086) to all ParseCompilationUnit* functions in unit
lnfodwrf

git-svn-id: trunk@39063 -
2018-05-20 16:51:49 +00:00
nickysn
d7a3f755e4 + also read arange segments on i8086
git-svn-id: trunk@39062 -
2018-05-20 16:07:28 +00:00
nickysn
3989e57fed * take into account the address size in lnfodwrf.ReadAddress on i8086; support
2-byte and 4-byte addresses

git-svn-id: trunk@39060 -
2018-05-20 15:48:58 +00:00
nickysn
a7f5a69000 + added an address size parameter to lnfodrwf.ReadAddress(); pass the expected
address size, as taken from the dwarf header structure

git-svn-id: trunk@39059 -
2018-05-20 15:43:19 +00:00
nickysn
dc8b78abe6 + debug print the arange address and segment sizes
git-svn-id: trunk@39058 -
2018-05-20 14:58:09 +00:00
nickysn
1f76f52996 * use hexstr(addr) in the dwarf backtrace function, so it displays always a good
value, according to the x86 pointer type

git-svn-id: trunk@39057 -
2018-05-20 14:42:17 +00:00
nickysn
96b53c168c * use hexstr(baseaddr) to print out the pointer value, regardless of its x86 type (near/far, etc.)
git-svn-id: trunk@39056 -
2018-05-20 14:39:28 +00:00
nickysn
abe61d0daa * the 'addr' and 'baseaddr' parameters of exeinfo.GetModuleByAddr changed to
far pointers on i8086
* the 'addr' parameter of lnfodwrf.OpenDwarf changed to codepointer

git-svn-id: trunk@39055 -
2018-05-20 14:33:17 +00:00
nickysn
443980b7ac * moved the morphos code for exeinfo.GetModuleByAddr to a separate ifdef section
git-svn-id: trunk@39054 -
2018-05-20 14:09:57 +00:00
nickysn
0ceb1244bf * changed the type of the first parameter ('addr') of lnfodwrf.GetLineInfo to
CodePtrUInt instead of PtrUInt

git-svn-id: trunk@39053 -
2018-05-20 13:41:10 +00:00
nickysn
2c000d1e74 * processaddress's type changed to word on i8086 (ptruint changes size between
memory models and we only need the offset; the segment is tracked separately)
+ introduce texefile.processsegment on i8086
* initialize processaddress and processsegment properly on i8086-msdos (for .exe
  files; .com files are not supported yet)

git-svn-id: trunk@39052 -
2018-05-20 13:19:49 +00:00
nickysn
2411cb3f24 * fix save/restore of base/index/pos on i8086
git-svn-id: trunk@39050 -
2018-05-20 12:55:22 +00:00
nickysn
0ca05f042b + parse the openwatcom dwarf extension DW_LNE_SET_SEGMENT and also track segment
data in the dwarf state machine on i8086

git-svn-id: trunk@39049 -
2018-05-20 12:43:53 +00:00
nickysn
60d49d696a * fix for ReadLEB128 on 16-bit CPUs
git-svn-id: trunk@39047 -
2018-05-20 12:06:36 +00:00
nickysn
994783db95 + introduce the TFilePos type for storing file offsets; use longint instead of
sizeint on i8086, because sizeint is 16-bit and file offsets are 32-bit there

git-svn-id: trunk@39046 -
2018-05-20 11:55:47 +00:00
svenbarth
8606293028 * assume that dynamic arrays with a negative reference count are immutable (at least regarding their metadata)
git-svn-id: trunk@39037 -
2018-05-20 11:50:06 +00:00
nickysn
c8cbb1daea * changed the sechdrofs,secstrofs and ImgOffset types to 32-bit to prevent
overflow errors on i8086 (ptruint is 16-bit in certain i8086 memory models;
  file offsets, however, still remain 32-bit)

git-svn-id: trunk@39036 -
2018-05-20 11:26:40 +00:00
nickysn
8364b1f4ca * changed the result of function Pos() to SizeInt (same type as the 'index'
variable it returns). Fixes the register allocation failure error when
  compiling on i8086.

git-svn-id: trunk@39033 -
2018-05-20 10:40:00 +00:00
nickysn
0d8ba2ddfa * skip the MZ exe in order to reach the ELF32 image on i8086-msdos
git-svn-id: trunk@39032 -
2018-05-20 10:11:14 +00:00
nickysn
ccf5aaeebb + enable the ELF32 reader in unit exeinfo for i8086-msdos
git-svn-id: trunk@39031 -
2018-05-20 10:01:19 +00:00
nickysn
537fbefb9e * add texeheader.ImgOffset to all file offsets when reading an ELF file. This
will be useful for reading i8086-msdos dwarf debug info, because it is
  appended after the regular dos MZ exe in an ELF32 image by the watcom linker.

git-svn-id: trunk@39030 -
2018-05-20 09:43:08 +00:00
nickysn
3bcd21663e * replaced nested ifdefs in unit exeinfo with a chain of {$if defined(...)} ...
{$elseif defined(...)}

git-svn-id: trunk@39027 -
2018-05-19 21:04:30 +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
marco
8c854cedee * more case fixes, mantis #32832 manually done.
git-svn-id: trunk@38865 -
2018-04-29 14:05:09 +00:00
michael
e46b89c8bb * Patch from Ondrej Pokorny to fix camelcase (bug ID 4b46872)
git-svn-id: trunk@38619 -
2018-03-24 14:39:56 +00:00
michael
16ba47be46 * Patch from Ondrej Pokorny to convert unit names to CamelCase (bug ID 33481)
git-svn-id: trunk@38616 -
2018-03-23 22:06:36 +00:00
michael
baa76163b3 * Need types in write declatations, or fpdoc chokes
git-svn-id: trunk@38612 -
2018-03-23 21:36:28 +00:00
pierre
5cd984b0cb Use RTE 234 insterad of 233 which is for SigQuit in unimplementedunicodestring
git-svn-id: trunk@38588 -
2018-03-21 10:30:26 +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
71e71ad267 * fix currency division on non x86 32 bit targets
* disable fix for #33439 during bootstrapping with 3.0.x, as 3.0.x cannot compile the currency division without the fix above

git-svn-id: trunk@38558 -
2018-03-17 22:44:44 +00:00
florian
c230f81719 + support for <dyn. array>+<dyn. array>, resolves #30463
git-svn-id: trunk@38406 -
2018-03-04 16:12:43 +00:00
florian
be158cec7a * reset I/O result before and after the implicit close calls in ISO pascal mode,
this avoids further I/O operations to be carried out, resolves issue #32743

git-svn-id: trunk@38301 -
2018-02-20 21:30:30 +00:00
svenbarth
c87cee09fd * use the type information *parameter* not the unitialized parameter
git-svn-id: trunk@38234 -
2018-02-13 19:26:21 +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
ea193bc993 * enable explicit Pointer overloads of Interlocked* functions for M68k as that has a calling convention where the passing of Pointer values differs from ordinal values (address vs. int registers). Fixes e.g. usage of the Classes unit
git-svn-id: trunk@38053 -
2018-01-26 21:37:58 +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
maciej-izak
8aaa3c0fd5 + added additional OpaquePointer type for the system unit (mantis #32977).
git-svn-id: trunk@37942 -
2018-01-09 21:45:03 +00:00
maciej-izak
f719f81c06 + added new types for the system unit: opaque data type (TOpaqueData) and related opaque pointer (POpaqueData) (mantis #32977)
git-svn-id: trunk@37940 -
2018-01-09 21:18:26 +00:00
florian
273045c295 * use the first element of the filrec._private array to track eof for typed files in iso mode (this will not hurt as iso mode does not specify the _private field), resolves #32938
git-svn-id: trunk@37915 -
2018-01-05 22:10:39 +00:00
Károly Balogh
8dd14b92a2 objcbase: as discussed on the mailing list - still allow a dummy version to be built. this allows darwin to be built without objectivec feature
git-svn-id: trunk@37875 -
2017-12-30 05:01:29 +00:00
Károly Balogh
07ac64bf09 * no longer allow to compile objcbase without the objc1 feature enabled.
git-svn-id: trunk@37847 -
2017-12-28 19:03:53 +00:00
marco
615b50fadf * change trect.contains(tpoint) to not have bottom and right borders inclusive.
Mantis #32861.  trect.contains(trect) still pending

git-svn-id: trunk@37773 -
2017-12-21 11:25:46 +00:00
nickysn
29f307589e + added an i8086-specific procedure MoveData, that allows moving of far data,
regardless of the memory model; procedure interface is the same as a similar
  Turbo C (and DJGPP) function

git-svn-id: trunk@37741 -
2017-12-15 21:47:21 +00:00
nickysn
0119e7afb3 * changed the codepointer type in the i8086 small and compact memory models from
nearpointer to nearcspointer

git-svn-id: trunk@37730 -
2017-12-14 17:36:15 +00:00
svenbarth
916ff0b92c + extend Concat() with support for dynamic arrays
+ added test

git-svn-id: trunk@37723 -
2017-12-12 19:54:08 +00:00
svenbarth
c07e723d37 + add some Delphi-compatible type kind aliases
git-svn-id: trunk@37707 -
2017-12-09 16:18:19 +00:00
marco
52f81da69c * some aliases for newer delphi versions, patch by Silvio.
utf8char, putf8char and marshal*

git-svn-id: trunk@37689 -
2017-12-06 10:49:35 +00:00
florian
4029783abb * forgotten space added
git-svn-id: trunk@37684 -
2017-12-05 21:06:13 +00:00
florian
c08bdf3f85 * patch by Anton Kavalenka: heaptrc prints exe/dll binary name where it is linked, resolves #32707
git-svn-id: trunk@37670 -
2017-12-03 18:07:41 +00:00
florian
0725bfcdf0 * do not generate references to the variant type, if the variants feature is not available
git-svn-id: trunk@37660 -
2017-12-02 17:16:32 +00:00
nickysn
78e0f6c68b + added an i8086-specific FarAddr() function, similar to Addr(), but always
returns a far pointer, regardless of the current memory model

git-svn-id: trunk@37628 -
2017-11-27 16:41:48 +00:00
florian
a650d346f1 * optimized for speed UpCase/LowerCase for UnicodeChar, based on a patch by AlexeyT, resolves #32638
git-svn-id: trunk@37625 -
2017-11-26 15:28:45 +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
florian
4331904eb8 * made mode field of file recs word sized on 8 and 16 bit systems
git-svn-id: trunk@37556 -
2017-11-05 19:30:51 +00:00
florian
c7d5525b56 + implemented some AVR specific intrinsics
git-svn-id: trunk@37544 -
2017-11-01 16:33:34 +00:00
florian
ff86c80176 * cpu specific header file for the system unit: cpuh.inc, moved several declarations into it
git-svn-id: trunk@37542 -
2017-11-01 16:33:30 +00:00
svenbarth
fe95d73fe5 * move RTTI header include above ObjPas header include
git-svn-id: trunk@37426 -
2017-10-08 08:44:51 +00:00
florian
7817102727 * patch by Christo Crause to implement 8 bit multiplications for "mul-less" avr types, resolves issue #31925
git-svn-id: trunk@37380 -
2017-10-01 20:34:44 +00:00
pierre
82dce8d7e1 Add FPC_SOFT_FPUX80 conditional code for 80-bit float type using soft float unit
git-svn-id: trunk@37294 -
2017-09-21 14:10:03 +00:00
pierre
61d16e1063 Allow compilation of softfpu unit with 128-bit upport on big endian code (code generated might be wrong)
git-svn-id: trunk@37257 -
2017-09-19 20:59:16 +00:00
pierre
856b3d86ce Add ufloatx80 unit, to add operator overload for 80-bit extended type on CPUs that do not support this type natively
git-svn-id: trunk@37256 -
2017-09-19 20:57:20 +00:00
pierre
9daa2279f6 Use sfpu128 unit instead of softfpu, as softfpu does not always has 128-bit support enabled
git-svn-id: trunk@37255 -
2017-09-19 17:23:03 +00:00
Károly Balogh
e1501c86bf m68k: fix no FPU support
git-svn-id: trunk@37227 -
2017-09-16 18:13:57 +00:00
michael
3787d52dee * Fix bug ID #32353, reset ref count fields in destructor
git-svn-id: trunk@37112 -
2017-09-02 15:07:23 +00:00
svenbarth
c45f738081 * fix DynArrayIndex(): as the last typeinfo entry is no longer a dynamic array the elSize needs to be remembered
git-svn-id: trunk@36942 -
2017-08-20 15:15:25 +00:00
michael
2ac3610048 * Better presentation of arguments (bug ID 32275)
git-svn-id: trunk@36923 -
2017-08-16 07:20:48 +00:00
svenbarth
187ebc6821 * adjust/update guard against older compiler versions
git-svn-id: trunk@36876 -
2017-08-12 08:17:07 +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
Károly Balogh
4002833001 morphos: also enable the elf32 loader in exeinfo for morphos
git-svn-id: trunk@36805 -
2017-07-28 12:20:40 +00:00
Károly Balogh
ac19b0eae6 morphos: enabling lineinfo unit
git-svn-id: trunk@36804 -
2017-07-27 22:31:19 +00:00
michael
aaf0647f58 * Fix bug ID #31462: sysreallocmem uses sys* routines instead of installed memmanager routines
git-svn-id: trunk@36769 -
2017-07-23 09:23:02 +00:00
michael
9878dc280b * Fix bug ID #32168
git-svn-id: trunk@36757 -
2017-07-21 16:08:01 +00:00
svenbarth
00e9289f58 * envp is part of sysunixh, so no need to manually import it using an external
git-svn-id: trunk@36685 -
2017-07-08 19:15:54 +00:00
florian
16c9a2260d * check alignment properly in CompareDWord for 64 bit targets
git-svn-id: trunk@36656 -
2017-07-06 18:02:22 +00:00
Károly Balogh
2d8313165d m68k: support FFU exception settings, also reworked FPU initalization
git-svn-id: trunk@36618 -
2017-06-30 02:38:14 +00:00
florian
8bbe7d7268 * define STACK_BIAS constant for sparc64, it is fundamental
git-svn-id: trunk@36540 -
2017-06-19 21:17:54 +00:00
florian
cd70098b84 + SPARC64 support for the system unit
git-svn-id: trunk@36431 -
2017-06-05 21:33:59 +00:00
Károly Balogh
a57d0d51b4 softfpu: make it possible to optionally inline some of the simple functions. also made it possible to replace the MUL32TO64 function with compiler generated code. If the new defines are enabled, they results in 15-30% speedup on m68k (68020+) softfpu code
git-svn-id: trunk@36352 -
2017-05-27 22:12:27 +00:00
nickysn
34113b930b * removed the checkoverflow: boolean parameter of the software mul helpers;
replaced it with a separate "_checkoverflow" version of each helper

git-svn-id: trunk@36344 -
2017-05-26 15:34:26 +00:00
nickysn
ba665e103c + added sqr(shortint) and sqr(smallint) for CPUs with 8/16-bit alu
git-svn-id: trunk@36342 -
2017-05-26 13:16:36 +00:00
pierre
a16326fa95 Avoid MSDOS Memory Control Block (MCB) chain corruption in RegisterTinyHeapBlock
git-svn-id: trunk@36340 -
2017-05-26 06:44:07 +00:00
nickysn
78a7445751 + added Odd(byte) and Odd(shortint) for cpus with 8-bit alu and Odd(word)/
Odd(smallint) for cpus with 8 or 16-bit alu

git-svn-id: trunk@36328 -
2017-05-25 14:42:56 +00:00
nickysn
fa645dcaf7 + added abs(smallint) and abs(shortint) for cpus with 8-bit or 16-bit alu
git-svn-id: trunk@36327 -
2017-05-25 14:14:18 +00:00
svenbarth
72c595eefe + implement support for Insert() for dynamic arrays; the parameter that is inserted can be a dynamic or static array of the same type, an array constructor or a single element of the arrays type; all that is determined based on the second type
+ added test

git-svn-id: trunk@36307 -
2017-05-23 19:11:49 +00:00
Károly Balogh
346f040a54 also try to inline 32bit SwapEndian variants, as they're still reasonably simple
git-svn-id: trunk@36304 -
2017-05-23 07:32:54 +00:00
pierre
0f80603dae + SysGetMem: Add DEBUG_TINY_HEAP message after SysAlloc call.
* Change InternalTinyAlign procedure:
  Change variable ASize to be VAR parameter type
  so that possible size reduction required by alignment
  is propagated correctly to calling function.

git-svn-id: trunk@36297 -
2017-05-22 20:27:08 +00:00
pierre
ade39069e5 Change ASize type for RegisterTinyHeapBlockXXX functions
git-svn-id: trunk@36249 -
2017-05-18 22:36:24 +00:00
pierre
570f159e65 Get SysGetMem to return immediately with Result=Nil if SysOSAlloc fails and RetrunNilIfGrowHeapFails is true
git-svn-id: trunk@36239 -
2017-05-18 08:19:17 +00:00
nickysn
504662826a * fixed the rtl cpu ifdefs for the rol/ror/sar cpu support check
git-svn-id: trunk@36153 -
2017-05-08 10:16:15 +00:00
pierre
ded1fb23a2 Improve stack trace output with -Cr option, contributed by Colin Western
git-svn-id: trunk@36134 -
2017-05-06 13:54:50 +00:00
pierre
d2d1794b40 Use HandleError instead of RunError in fpc_help_destructor, fpc_check_object and fpc_check_object_ext
git-svn-id: trunk@36113 -
2017-05-05 11:49:16 +00:00
pierre
651f8b17c1 Add minimum type/const for RTL compilation with threading support disabled
git-svn-id: trunk@36106 -
2017-05-04 22:12:17 +00:00
pierre
6c43882cf5 Allow compilation with -Sfnothreading
git-svn-id: trunk@36092 -
2017-05-04 21:18:22 +00:00
nickysn
056e742684 + enable the internal 8-bit and 16-bit sar on i8086
git-svn-id: trunk@36032 -
2017-05-01 12:36:36 +00:00
michael
011a88b1fe * Remove mode objfpc (bug ID 31629)
git-svn-id: trunk@35886 -
2017-04-22 08:53:13 +00:00