florian
ba1297b1ab
+ provide also 8 and 16 bit div/mod helper
...
* tmoddivnode.first_moddivint does not force a 32 bit helper, the used helper depends now on the resultdef type set by tmoddivnode.pass_typecheck
git-svn-id: trunk@31195 -
2015-07-05 20:16:50 +00:00
Jonas Maebe
3f736f6114
* handle the loading of VMT entries at the node level, so it's done in a
...
type-safe way (for LLVM, and also internal consistency checking between
the VMT as generated in nobj.pas and ncgvmt.pas)
o also converted the VMT validity checking to the node level
git-svn-id: trunk@30950 -
2015-05-31 16:50:47 +00:00
florian
98856437b2
* disable fpc_chararray_enum for now on avr because the register allocator cannot currently handle it
...
git-svn-id: trunk@30380 -
2015-03-29 19:46:02 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
michael
3563944752
* Patch to allow changing TVarRec data (bug ID 26773)
...
git-svn-id: trunk@28995 -
2014-11-05 22:17:54 +00:00
Jonas Maebe
5c75b6dd6b
* synchronised with trunk up till r28402
...
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
nickysn
5edbd1cd03
* fixed i8086 ifdef (should be ifdef cpui8086, not i8086, because that's the
...
rtl, not the compiler)
git-svn-id: trunk@28347 -
2014-08-08 21:37:17 +00:00
nickysn
13646c7afe
+ added rtl helper for huge pointer subtraction
...
git-svn-id: trunk@28178 -
2014-07-06 19:15:14 +00:00
Jonas Maebe
7949bebb8d
* synchronised with r28168 of trunk
...
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +00:00
nickysn
c306f48c14
+ added rtl helpers for huge pointer comparisons
...
git-svn-id: trunk@28148 -
2014-07-04 08:34:17 +00:00
nickysn
f0346c096f
+ added rtl helpers for huge pointer arithmetic
...
git-svn-id: trunk@28099 -
2014-06-28 17:08:40 +00:00
Jonas Maebe
bacd303208
* synchronized with trunk up to r27758
...
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
sergei
217bac7a0b
- Removed fpc_pi_real compilerproc, it is no longer used. At least two releases (2.6.2 and 2.6.4) emit Pi directly as a constant.
...
git-svn-id: trunk@27500 -
2014-04-07 09:16:24 +00:00
sergei
a7563fd0c8
* Added {$ifdef ver2_6} around stuff which is no longer used but needed for bootstrapping.
...
git-svn-id: trunk@27038 -
2014-03-08 23:13:10 +00:00
Jonas Maebe
e9268a0a14
* synchronised with trunk up till r26975
...
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
Jeppe Johansen
9b79f2f68d
Added support for 8-bit CPU's in RTL. Mostly for missing implementations of int<->string conversion and console/text output.
...
git-svn-id: trunk@26958 -
2014-03-04 20:00:03 +00:00
sergei
d004607876
* fpc_raiseexception does not return a result.
...
git-svn-id: trunk@26837 -
2014-02-22 15:18:31 +00:00
florian
15df4a4f80
+ support iso pascal like program parameters in iso mode
...
git-svn-id: trunk@26437 -
2014-01-12 20:17:51 +00:00
florian
e841027a48
* fixes handling of typed files in iso mode
...
git-svn-id: trunk@26436 -
2014-01-12 20:17:48 +00:00
nickysn
c2ba9ebfe5
+ added different mul helpers for the 32 to 64-bit muls, since they can usually
...
be implemented more efficiently than the 64 to 64-bit ones.
git-svn-id: trunk@26386 -
2014-01-05 03:01:18 +00:00
Jonas Maebe
d2b8275b99
+ support for arbitrary encodings in readstr/writestr
...
o set the code page of the temporary "text" file to utf-8 for writestr with
unicodestring/widestring as destination, so that no data loss can occur
(+ properly deal with cases whereby part of an utf-8 character is
written to the textbuf in this case)
o explicitly pass the code page of the destination ansistring for writestr
with ansistring as destination and set it for the temporary "text" file
o set the code page of the text file for readstr
git-svn-id: trunk@26317 -
2013-12-29 19:18:49 +00:00
sergei
f42c1b3720
* Return dynamic arrays in parameter, this was the only managed type still returned in register. Returning managed types in registers requires catching and re-raising exceptions at callee side in order to finalize result and avoid memory leaks. While such behavior makes little difference with generic setjmp-based exception handling, it becomes very inefficient as SEH-styled exception handling is being introduced.
...
The new behavior is also Delphi-compatible.
git-svn-id: trunk@26180 -
2013-12-04 13:43:22 +00:00
Jonas Maebe
9e6764e443
* converted program termination to compilerproc/hlcg
...
git-svn-id: branches/hlcgllvm@26029 -
2013-11-11 11:14:43 +00:00
Jonas Maebe
cd92791d09
* converted unit initialization to compilerproc/hlcg
...
git-svn-id: branches/hlcgllvm@26028 -
2013-11-11 11:14:38 +00:00
nickysn
c1b0fb81f1
* updated all the RTL helper functions related to exceptions and stack traces to use codepointer instead of pointer
...
git-svn-id: trunk@25513 -
2013-09-17 21:25:26 +00:00
sergei
b99cf8d680
* RTL: Changed 'shift' parameter of 64-bit shift helpers to CPU-native size, it doesn't have to be 64-bit because only its lower 6 bits are used. Not using 64 bit parameter improves code quality a bit.
...
git-svn-id: trunk@25478 -
2013-09-13 08:32:45 +00:00
Jonas Maebe
3c3ad705f1
* changed fpc_(u)char_to_shortstr() from a procedure into a function, like
...
the other fpc_(u)char_to_*str() routines (exception dates back to the
time calls to these routines were still inserted "manually" in the
compiler). Fixes the compilation of "shortstr:=widecharconstant" after
r23613 and simplifies other code calling this helper + test
git-svn-id: branches/cpstrrtl@25428 -
2013-09-06 08:02:46 +00:00
florian
0e41df598e
* merge i8086 branch by Nikolay Nikolov
...
git-svn-id: trunk@24324 -
2013-04-25 20:23:51 +00:00
nickysn
7e18ac90e5
* the 'len' argument of fpc_shortstr_assign changed to smallint on 16-bit cpus, because getintparaloc allocates 16-bit ints on i8086
...
git-svn-id: branches/i8086@24258 -
2013-04-16 08:25:54 +00:00
nickysn
cac6ac38d0
+ added RTL helpers for Val() for longint/dword on 16/8-bit CPUs
...
git-svn-id: branches/i8086@24048 -
2013-03-29 01:19:14 +00:00
nickysn
8b6b832677
+ added helper functions for read/readln longint/longword on 16/8-bit cpus
...
git-svn-id: branches/i8086@24047 -
2013-03-28 23:56:47 +00:00
nickysn
1e28790e99
* fpc_PushExceptAddr's parameter Ft changed from LongInt to SmallInt on 16-bit CPUs for better efficiency
...
git-svn-id: branches/i8086@24036 -
2013-03-28 15:44:50 +00:00
nickysn
3b2ea4df6c
+ implmemented FPC_LONGJMP for i8086
...
git-svn-id: branches/i8086@24034 -
2013-03-28 14:59:57 +00:00
nickysn
4dfbf148f2
+ added Str() helpers for 32-bit ints for 16/8-bit CPUs
...
git-svn-id: branches/i8086@24008 -
2013-03-25 23:55:47 +00:00
nickysn
697de721ef
+ added write/writeln helpers in the RTL for writing longints/longwords on 16/8-bit CPUs
...
git-svn-id: branches/i8086@24006 -
2013-03-25 23:21:42 +00:00
nickysn
5ea6f37247
+ implemented FPC_SETJMP for the i8086
...
git-svn-id: branches/i8086@24002 -
2013-03-25 18:12:48 +00:00
Jonas Maebe
e1e11f81e3
* fixed using readstr/writestr inside routines called from the parameter
...
list of another readstr/writestr expression (mantis #23912 )
git-svn-id: trunk@23888 -
2013-03-17 14:23:33 +00:00
florian
d5985b4f0e
* patch by Christophe Staïesse to implement more ISO-like read behaviour in iso mode, resolves #24060
...
git-svn-id: trunk@23884 -
2013-03-17 08:27:21 +00:00
florian
81e0e3114c
* throw an error if threadvars are used but not supported
...
* fix building for arm-embedded
git-svn-id: trunk@23452 -
2013-01-19 15:17:47 +00:00
Jonas Maebe
9777699c70
* fixed compilation for targets with internal stack checking after r23325
...
* added (commented out) fpc_stackcheck() compilerproc to java version of
compproc.inc
git-svn-id: trunk@23326 -
2013-01-06 15:51:46 +00:00
Jonas Maebe
69c29a415f
* pass the procdef to getintparaloc instead of only the proccalloption, so
...
that the type of the parameters can be determined automatically
o added compilerproc declarations for all helpers called in the compiler
via their assembler name, so we can look up the corresponding procdef
git-svn-id: trunk@23325 -
2013-01-06 15:05:40 +00:00
Jonas Maebe
7c578c3541
* made the pascal name of the string range checking helpers match
...
their assembler name
git-svn-id: trunk@23324 -
2013-01-06 15:05:33 +00:00
Jonas Maebe
fe5a4baa15
- removed FPC 2.4 bootstrapping support
...
git-svn-id: trunk@23321 -
2013-01-06 15:05:20 +00:00
pierre
14c5fceb45
Add fpc_longword_to_double
...
git-svn-id: trunk@23185 -
2012-12-18 15:17:48 +00:00
florian
420cd9bd27
+ support for <text>^ in iso mode
...
git-svn-id: trunk@22512 -
2012-10-01 17:18:51 +00:00
florian
2db4606eb0
* fix bootstrapping with 2.6.0
...
git-svn-id: trunk@22293 -
2012-09-03 09:16:46 +00:00
florian
ff12d63248
+ generic popcnt support
...
git-svn-id: trunk@22290 -
2012-09-02 20:59:44 +00:00
Jonas Maebe
aba6923187
* moved g_test_self() from cgobj to hlcgobj
...
git-svn-id: trunk@21861 -
2012-07-11 08:25:51 +00:00
Jonas Maebe
b42d204514
* fpc_shortstr_assign as compilerproc, forgot to commit
...
git-svn-id: trunk@21701 -
2012-06-25 05:06:41 +00:00
Jonas Maebe
7a0ae38700
+ also specify the parameter def when allocating a parameter via
...
getintparaloc + adapted all call sites of getintparaloc. This
led to a number of additional, related changes:
o corrected the type information for some getintparaloc parameters
o don't allocate some intparalocs in cases they aren't used
o changed "const tvardata" parameter into "constref tvardata" for
fpc_variant_copy_overwrite to make pass-by-reference semantics
explicit
o moved a number of routines that now have to call find_system_type()
from cgobj to hlcgobj so that cgobj doesn't have to start depending
on the symtable unit
o added versions of the cpureg alloc/dealloc methods to hlcgobj that
call through to their cgobj counter parts, so we can call save/restore
the cpu registers before/after calling system helpers from hlcgobj
(not implemented in hlcgobj itself, because all basic register
allocator functionality is still part of cgobj/cgcpu)
git-svn-id: trunk@21696 -
2012-06-24 15:02:12 +00:00