Jonas Maebe
a2c3826281
* changed fpc_big_chararray and fpc_big_widechararray from
...
array[0..1023] into array[0..0], because they're used as
dummy return types for the Xstring_to_chararray helpers,
and if a smaller array is actually passed as result then
having a larger array declared will cause -gt to
overwrite other data
git-svn-id: trunk@6855 -
2007-03-14 19:45:07 +00:00
peter
cd767cf5c8
* i386 uses generic fpc_compare_shortstr_equal
...
git-svn-id: trunk@6335 -
2007-02-04 16:24:02 +00:00
daniel
e8050233af
+ Patch by Thorsten Engler to optimize string comparisons for = and <> cases. (Mantis #8231 )
...
git-svn-id: trunk@6241 -
2007-01-28 10:58:52 +00:00
florian
b3a1868ff0
* correct masking of exceptions in genmath code
...
git-svn-id: trunk@5965 -
2007-01-14 10:44:10 +00:00
yury
2244f1b9c6
* fixed warning.
...
git-svn-id: trunk@5853 -
2007-01-08 19:08:34 +00:00
florian
fd2032dab2
+ start of embedded rtl
...
+ feature support in the compiler
git-svn-id: trunk@5628 -
2006-12-17 18:40:36 +00:00
peter
2f0ce31751
* string concat changed from function to procedure to
...
allow runtime optimization if the destination is the
same as a source parameter
* tassignmentnode now sets aktassignmentnode global that can be used
to use the left node as a destination parameter and
skip the assignment
* disabled all cpu specific shortstr concat/append
git-svn-id: trunk@4770 -
2006-10-02 20:00:06 +00:00
yury
11576fd24b
* fixed warnings and notes while compiling system unit for wince.
...
git-svn-id: trunk@4250 -
2006-07-18 15:00:09 +00:00
peter
fc3e5f68c8
* align needs to be unsigned, patch from Burkhard Carstens
...
git-svn-id: trunk@4090 -
2006-07-04 16:38:19 +00:00
florian
069ac7d163
* endian conversion functions
...
git-svn-id: trunk@3543 -
2006-05-15 19:42:13 +00:00
peter
2d3c01d83a
* basic work to make Move() and FillChar() internal under ifdef INTERNALMOVEFILLCHAR
...
git-svn-id: trunk@3021 -
2006-03-24 17:32:39 +00:00
peter
340cf721b5
* faster int_str
...
* removed i386 int_str since the generic implementation is faster
git-svn-id: trunk@2646 -
2006-02-20 08:31:20 +00:00
daniel
3a60adb3a1
* var back to out
...
git-svn-id: trunk@2607 -
2006-02-16 08:03:13 +00:00
daniel
b2202654ca
* It could be done even better.
...
git-svn-id: trunk@2606 -
2006-02-16 00:18:21 +00:00
daniel
3adcaaad36
* Faster and more compact integer str routines
...
git-svn-id: trunk@2605 -
2006-02-15 23:43:27 +00:00
Jonas Maebe
58381ff7b6
* made chararray handling 98% TP-compatible, fixes web bugs 3012
...
and 4080. The compatibility differences are:
a) writing a chararray which is zero-based but not zero-
terminated does not cause a buffer overflow
b) non-zero-based chararrays can also be read
The difference was that previously, all chararrays were treated
as pchars. In TP/Delphi (and now also in FPC), this is only done
for zero-based chararrays. For non-zero-based ones, the entire
contents of the array should always be used (including #0 's).
The default parameters in the system unit for the chararray
helpers are to avoid having to use a define for bootstrapping.
git-svn-id: trunk@2152 -
2006-01-04 10:05:10 +00:00
Jonas Maebe
5b9f58ef73
* reverted r2037 because of braindead "out" semantics for refcounted
...
types
git-svn-id: trunk@2045 -
2005-12-24 01:06:05 +00:00
Jonas Maebe
9a08cdccf0
* several changes of var parameters into out parameters to avoid
...
useless warnings: code parameter of val(), destination of str(),
destinations of ansi2wide and wide2ansi
git-svn-id: trunk@2041 -
2005-12-23 22:25:26 +00:00
Jonas Maebe
84aab46550
* changed formal "var" paramters of move, movechar0 and fill* into
...
"out" parameters to avoid wrong "uninitialized" warnings
git-svn-id: trunk@2037 -
2005-12-23 20:59:08 +00:00
michael
5cafc069b5
+ Removed NOSAVEREGISTERS define
...
git-svn-id: trunk@307 -
2005-06-09 17:58:20 +00:00
michael
033e38b8df
+ Removed NOCLASSHELPERS define
...
git-svn-id: trunk@299 -
2005-06-09 17:46:56 +00:00
michael
3a2eaa94b1
+ Removed INTERNCONSTINTF define
...
git-svn-id: trunk@267 -
2005-06-07 22:04:18 +00:00
michael
93ba0409be
+ Removed HASCOMPILERPROC define
...
git-svn-id: trunk@265 -
2005-06-07 21:41:02 +00:00
michael
db5d9d75aa
+ Removed INTERNCOPY define
...
git-svn-id: trunk@259 -
2005-06-07 21:11:49 +00:00
michael
8a226bba52
+ Removed HASWIDESTRING/HASWIDECHAR defines
...
git-svn-id: trunk@241 -
2005-06-07 20:42:22 +00:00
michael
23ad0ae1ec
+ Removed HASINTF and VER1_0 defines
...
git-svn-id: trunk@239 -
2005-06-07 20:30:03 +00:00
peter
4ace790492
* remove $Log
...
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496
* truncate log
2005-02-14 17:13:06 +00:00
peter
f13ab0667c
* missing typecast in indexchar0
2004-12-12 12:39:02 +00:00
michael
06668dda22
+ Fixed IndexChar0
2004-12-05 12:41:00 +00:00
peter
14eb8f59b4
internconst, internproc and some external declarations moved to interface
2004-11-17 22:19:04 +00:00
florian
c9e17321d7
* fixed software longint mod operation
2004-11-06 13:36:42 +00:00
florian
5972f89919
* changed maxlongint to high(sizeint)
2004-11-02 08:50:40 +00:00
florian
ef25f06e1c
* fixed array sizes
2004-11-02 08:46:50 +00:00
peter
fd759e521f
* saveregisters calling convention is obsolete
2004-10-24 20:01:41 +00:00
florian
8c85454cf9
+ added system.align
...
+ threadvars are now aligned
2004-10-14 17:39:33 +00:00
Jonas Maebe
0f26252376
+ cgenmath with libc math functions. Faster than the routines in genmath
...
and also have full double support (exp() only has support for values in
the single range in genmath, for example). Used in FPC_USE_LIBC is
defined
* several fixes to allow compilation with -dHASINLINE, but internalerrors
because of missing support for inlining assembler code
2004-10-09 21:00:46 +00:00
florian
7a7c34e1b7
+ several unicode (to/from utf-8 conversion) stuff added
...
* some longint -> SizeInt changes
2004-07-18 20:21:44 +00:00
peter
3094258825
* removed warnings
2004-05-31 20:25:04 +00:00
peter
62850815bd
* fix arguments for shortstr_compare
2004-05-02 15:15:45 +00:00
peter
4917058b59
* fixed compile with 1.0.x
2004-05-02 00:31:03 +00:00
peter
81b6d9f16c
* replace strlenint with sizeint
2004-05-01 23:55:18 +00:00
peter
b5df63e617
* ValSInt fixed for 64 bit
2004-05-01 20:52:50 +00:00
Jonas Maebe
dedf697f3a
* use some more string routines from libc if FPC_USE_LIBC is used
2004-05-01 15:26:33 +00:00
peter
53ec165e68
* x86-64 fixes
2004-04-29 19:50:13 +00:00
florian
704ce8035c
* tvmt fixed (longint -> ptrint)
2004-04-28 21:01:29 +00:00
peter
8c60c6f93e
* ordinal-pointer conversions fixed
2004-04-28 20:48:20 +00:00
peter
b4474438d9
* FPC_MOVE alias
2004-04-26 15:55:01 +00:00
florian
6cd2cddd33
+ added prefetch(const mem)
2004-02-02 20:39:27 +00:00
florian
87f13990e5
* alignment handling of generic fillbyte/word fixed
2004-01-31 16:14:24 +00:00
florian
0b8ffc2fb2
* fixed a couple of broken generic routines
2004-01-28 17:02:13 +00:00
florian
83127c2889
* improved generic int. div routines
2004-01-21 01:25:02 +00:00
florian
44368ca0e1
+ created generic versions of software dword/longint mod/div
2004-01-20 23:16:56 +00:00
Jonas Maebe
6fe31d0d90
* changed index* to conform to the assembler implementations (interpret
...
negative upper bound as maximum)
2004-01-10 17:01:29 +00:00
daniel
fd86e14b01
* Use of 0 instead of nil fixed
2003-12-16 09:43:04 +00:00
Jonas Maebe
2b28a58c6d
* fixed longint/cardinal comparison in int_str
2003-12-06 13:25:30 +00:00
florian
8d771df2d4
* arm fixes to the common rtl code
...
* some generic math code fixed
* ...
2003-09-03 14:09:37 +00:00
Jonas Maebe
f0227e6a17
* fpc_shortstr_append_shortstr has to use high(s1) instead of 255 as
...
maxlen
+ ppc version of fpc_shortstr_append_shortstr
2003-06-01 14:50:17 +00:00
peter
84f2b74142
* FPC_SHORTSTR_APPEND_SHORTSTR public added
2003-05-26 21:18:13 +00:00
peter
60407e302b
* fpc_shortstr_concat is now the same for all targets
...
* fpc_shortstr_append_shortstr added for optimized code generation
2003-05-26 19:36:46 +00:00
florian
35bb4d682f
* fixed generic shortstr_compare
2003-05-16 22:40:11 +00:00
peter
e5b48ec83d
* extra check for self and empty objects
2003-05-13 20:52:50 +00:00
peter
163e06f93b
* fpc_help_fail compilerproc
...
* fpc_new_class, fpc_dispose_class not needed by latest compiler
2003-05-13 19:18:08 +00:00
peter
f272c18e94
* remvoe objectsize loading from help_destructor
...
* implement fpc_check_object
* saveregistrers for check_object
2003-04-23 13:10:09 +00:00
peter
c412dedb8c
* undo previous commit
2003-04-02 14:05:45 +00:00
mazen
9f66d3bc05
* making sparc compiling again by adapting compilerproc declarations after the
...
last change of compilerproc by i386 team.
2003-04-01 21:12:40 +00:00
peter
ea9e883802
* generic constructor/destructor fixes
2003-03-26 00:17:34 +00:00
Jonas Maebe
15419c49a6
- removed buggy i386-specific FPC_CHARARRAY_TO_SHORTSTR
...
* fixed generic FPC_CHARARRAY_TO_SHORTSTR (web bug #2382 )
* fixed some potential range errors in indexchar/word/dword
2003-02-18 17:56:06 +00:00
mazen
c3321868d5
* many stuff related to RTL fixed
2003-01-20 22:21:36 +00:00
florian
6432af8a76
* fixed helper declarations
2003-01-09 20:14:20 +00:00
mazen
9e5d6dc00b
- space removed
2003-01-07 22:04:12 +00:00
mazen
a5e2afbbb3
* functions headers modified in generic.inc to make it possible compiling sparc
...
RTL based on generic code
2003-01-06 23:04:21 +00:00
mazen
215880afe8
* fixing several bugs compiling the RTL
2003-01-05 21:32:35 +00:00
peter
0c2feff146
* fix wrong var names for shortstr_compare
2002-12-23 21:27:13 +00:00
carl
c5783607c3
* avoid crashes with negative len counts on fills/moves
...
* movechar0 was wrong and did not do the behavior as
described in docs
2002-10-20 11:51:54 +00:00
peter
5fff238567
* threads unit added for thread support
2002-10-14 19:39:16 +00:00
carl
2d8417cdfc
* RunError 220 -> RunError 219 to be more consistent with as operator
2002-10-12 20:32:41 +00:00
florian
c6ea429567
+ several widestring/pwidechar related helpers added
2002-10-10 16:08:50 +00:00
peter
ea8118b37c
* fpc_pchar_length compilerproc and strlen alias
2002-10-05 14:20:16 +00:00
peter
603b3bc48b
* Copy() changed to internal function calling compilerprocs
...
* FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
new copy functions
2002-10-02 18:21:51 +00:00
carl
ab9e07a2d7
* fix 2GB limit problem
2002-09-27 21:10:40 +00:00
carl
933d28f62b
* FPC_HELP_FAIL : reset _self to nil
2002-09-13 19:13:06 +00:00
Jonas Maebe
a3e6f8cb66
* added some missing compilerproc directives
2002-09-10 21:29:44 +00:00
carl
cd50814a64
* cardinal -> longword
...
- remove generic boundcheck (does not exist in v1.1)
2002-09-07 21:08:42 +00:00
peter
01dfac4a4e
* old logs removed and tabs fixed
2002-09-07 15:06:34 +00:00
peter
c3af3cda9b
* SYSTEMINLINE define that will add inline directives for small
...
functions and wrappers. This will be defined automaticly when
the compiler defines the HASINLINE directive
2002-08-19 19:34:02 +00:00
florian
53a0b662b9
* several fixes to get further with linux/ppc system unit compilation
2002-07-29 21:28:16 +00:00
Jonas Maebe
00801d2c76
* fixed some datastructures > 2GB
2002-07-29 09:23:11 +00:00
florian
6d4e01d74f
* made abs a compiler proc if it is generic
2002-07-28 21:39:28 +00:00
florian
7ac5c3743d
* several fixes for linux/powerpc
...
* several fixes to MT
2002-07-28 20:43:47 +00:00
carl
3525611583
* bugfix of FPC_NEW_CLASS (was not creating correct instance)
...
+ FPC_HELP_FAIL_CLASS now tested (no longer required)
2002-06-16 08:19:03 +00:00
carl
4669fcc7e2
+ generic FPC_HELP_FAIL
...
+ generic FPC_HELP_DESTRUCTOR instated (original from Pierre)
+ generic FPC_DISPOSE_CLASS
2002-05-22 18:48:29 +00:00
carl
fbf499b13d
* generic constructor implemented
2002-05-16 19:58:05 +00:00
carl
4e782284ba
* memory corruption bugfix in FPC_HELP_CONSTRUCTOR if object cannot be allocated
2002-03-30 13:08:54 +00:00
peter
c3f645769a
* add internconst for all overloaded types of Odd/Abs/Sqr
2002-01-25 17:38:55 +00:00
Jonas Maebe
2b3898aeff
* adapted ranges of native types to int64 (e.g. high cardinal is no
...
longer longint($ffffffff), but just $fffffff in psystem)
* small additional fix in 64bit rangecheck code generation for 32 bit
processors
* adaption of ranges required the matching talgorithm used for selecting
which overloaded procedure to call to be adapted. It should now always
select the closest match for ordinal parameters.
+ inttostr(qword) in sysstr.inc/sysstrh.inc
+ abs(int64), sqr(int64), sqr(qword) in systemh.inc/generic.inc (previous
fixes were required to be able to add them)
* is_in_limit() moved from ncal to types unit, should always be used
instead of direct comparisons of low/high values of orddefs because
qword is a special case
2002-01-24 12:33:52 +00:00
Jonas Maebe
f256a47f04
* compilerproc implementation of set addition/substraction/...
...
* changed the declaration of some set helpers somewhat to accomodate the
above change
* i386 still uses the old code for comparisons of sets, because its
helpers return the results in the flags
* dummy tc_normal_2_small_set type conversion because I need the original
resulttype of the set add nodes
NOTE: you have to start a cycle with 1.0.5!
2001-09-03 13:27:41 +00:00
Jonas Maebe
41a57028b9
* converted adding/comparing of strings to compileproc. Note that due
...
to the way the shortstring helpers for i386 are written, they are
still handled by the old code (reason: fpc_shortstr_compare returns
results in the flags instead of in eax and fpc_shortstr_concat
has wierd parameter conventions). The compilerproc stuff should work
fine with the generic implementations though.
* removed some nested comments warnings
2001-08-30 15:43:14 +00:00
Jonas Maebe
06f9cd4c96
* some fixes in compilerprocs for chararray to string conversions
...
* conversion from string to chararray is now also done via compilerprocs
2001-08-29 19:49:03 +00:00
Jonas Maebe
fc92c3b336
+ compilerproc implementation of most string-related type conversions
...
- removed all code from the compiler which has been replaced by
compilerproc implementations (using {$ifdef hascompilerproc} is not
necessary in the compiler)
2001-08-28 13:24:46 +00:00
Jonas Maebe
b9f6efc85b
+ "compproc" helpers
...
* renamed several helpers so that their name is the same as their
"public alias", which should facilitate the conversion of processor
specific code in the code generator to processor independent code
* some small fixes to the val_ansistring and val_widestring helpers
(always immediately exit if the source string is longer than 255
chars)
* fixed fpc_dynarray_high and fpc_dynarray_length if the dynarray is
still nil (used to crash, now return resp -1 and 0)
2001-08-01 15:00:09 +00:00
peter
13db04fb8b
* small cleanup of commented code (merged)
2001-07-31 19:36:51 +00:00
peter
bc74424ab1
* m68k updates merged
2001-07-29 13:49:15 +00:00
peter
ca8d604964
* various widestring updates, it works now mostly without charset
...
mapping supported
2001-07-08 21:00:14 +00:00
peter
51e528796b
* more saveregisters added (merged)
2001-05-28 20:43:17 +00:00
peter
12a3b11cdb
* merged fixes branch fixes
2001-05-18 22:59:59 +00:00
Jonas Maebe
d811aeedf7
+ odd() for cardinal, int64 and qword (merged)
2001-05-16 17:44:25 +00:00
peter
8bf13fd185
*** empty log message ***
2001-05-09 19:57:07 +00:00
peter
b06b389b67
* int_str cardinal fix (merged)
2001-04-21 12:16:28 +00:00
peter
22db4256ce
* removed rtllite define
2001-04-13 18:06:28 +00:00
Jonas Maebe
3eb9c758fb
* changed typecast in FPC_STR_TO_CHARARRAY so that no temp ansistring is
...
generated anymore (merged)
2001-03-05 17:10:40 +00:00
Jonas Maebe
af38291233
* simplified and optimized range checking code, FPC_BOUNDCHECK is no longer necessary
2001-03-03 12:41:22 +00:00
michael
619dac6c93
+ Merged from fixbranch
2000-10-01 13:17:35 +00:00
Jonas Maebe
3aab08cba8
+ FPC_STR_TO_CHARARRAY routine necessary for string -> chararray
...
conversions fix (merged fropm fixes branch)
2000-08-09 11:29:01 +00:00
michael
586c4cea50
+ Conditionals fixed
2000-07-14 10:33:09 +00:00
michael
650fbb86aa
+ removed logs
2000-07-13 11:32:24 +00:00
michael
e7aca136a1
+ Initial import
2000-07-13 06:29:38 +00:00
marco
f5fd205ab5
* Changed move (var source;var dest) to move (const source;var dest)
2000-07-07 18:23:41 +00:00
pierre
4bbbb33cf1
* small fixes
2000-03-10 13:45:31 +00:00
peter
6b66a55cd6
* truncated log
2000-02-09 16:59:28 +00:00
peter
c775ade1d6
* primitives added
2000-01-10 09:54:30 +00:00
daniel
ec29a31834
* copyright 2000
2000-01-07 16:41:28 +00:00
daniel
a79b4a404b
* copyright 2000 added
2000-01-07 16:32:21 +00:00
pierre
bb70445e8a
* some assembler functions translated to pascal
...
WARNING these are not yet TESTED !!!
+ FPC_CHARARRAY_TO_SHORTSTRING added
1999-12-21 11:12:16 +00:00
peter
ebd738f2f5
* removed temp defines
1999-07-05 20:04:21 +00:00
pierre
9a21e0d1e2
+ generic.inc added
1999-05-31 21:59:58 +00:00