Commit Graph

152 Commits

Author SHA1 Message Date
peter
1561d97465 * optimize write loop in int_str
git-svn-id: trunk@9794 -
2008-01-19 16:48:12 +00:00
Jonas Maebe
bf9b021749 * optimized align() so it no longer contains any branches which
are undecidable at compile time
  + basic test for align() function

git-svn-id: trunk@9674 -
2008-01-07 21:41:12 +00:00
florian
c64ab62bdf * fixed CompareChar0, resolves #10151
git-svn-id: trunk@9219 -
2007-11-12 20:01:57 +00:00
florian
c794ec6de0 * fix Index*Word for CPUs requiring proper alignment
git-svn-id: trunk@9105 -
2007-11-03 15:51:11 +00:00
florian
b59fdbeb93 * CompareWord and CompareDWord fixed for building with <2.3.1
git-svn-id: trunk@9087 -
2007-11-02 23:33:57 +00:00
yury
3d1d9815ac * Fixed CompareDWord.
git-svn-id: trunk@9058 -
2007-11-02 11:19:10 +00:00
yury
5e9dd6cd4c * Fixed CompareDWord after r8827 (compiler warnings should not be ignored :).
git-svn-id: trunk@9038 -
2007-11-01 13:42:01 +00:00
yury
2770652beb * Fixed unreachable code warnings and removed not used variable.
git-svn-id: trunk@9036 -
2007-11-01 13:28:08 +00:00
florian
7da7364ee7 * refactored SysResetFPU into SysInitFPU and SysResetFPU
git-svn-id: trunk@8966 -
2007-10-28 12:06:49 +00:00
florian
7878f0feb3 * made all fpc_*_to_shortstr helpers a procedure, resolves #8580
git-svn-id: trunk@8898 -
2007-10-21 17:33:18 +00:00
florian
4b69743c92 * fixed compilation on non sigbusing cpus
git-svn-id: trunk@8829 -
2007-10-16 21:14:41 +00:00
florian
3f24d63176 * fixed Compare* for CPUs requiring natural alignment
git-svn-id: trunk@8827 -
2007-10-16 20:32:59 +00:00
peter
4f862a23a7 * fixed alignment leftover in compare
git-svn-id: trunk@8823 -
2007-10-16 17:53:00 +00:00
florian
96eaeeaf98 * fixed Index* for 64 Bit CPUs
* use forward move as much as possible

git-svn-id: trunk@8778 -
2007-10-13 19:06:41 +00:00
Jonas Maebe
775ee6f563 * len=0 should not be treated as overflow in comparebyte/word/dword
(further fix to r8754, fixes regresssion of twide4 on sparc/solaris)

git-svn-id: trunk@8765 -
2007-10-11 17:10:29 +00:00
Jonas Maebe
b5a1a6c6b4 * fixed generic index- and comparebyte/word/dword for limits which
overflow the pointer range (fixes tw3612 regression on sparc/solaris)

git-svn-id: trunk@8754 -
2007-10-09 11:00:15 +00:00
peter
e8322a83e4 * optimized generic implementations to use pointers instead of
array accesses. This also allows better register variable
    optimizations

git-svn-id: trunk@8742 -
2007-10-07 18:36:18 +00:00
Jonas Maebe
9bd4fe433b * fixed buffer overflows in int_str() + test
git-svn-id: trunk@8395 -
2007-09-07 14:06:08 +00:00
micha
d95b9082bb * add memory barrier prototypes + implementation for i386 and sparc + use lwsync for powerpc64
git-svn-id: trunk@8240 -
2007-08-07 20:37:08 +00:00
micha
7475f656f8 + add memory barrier routines for powerpc/64
git-svn-id: trunk@8179 -
2007-07-28 12:47:48 +00:00
daniel
bb5fea342f * RTL updates needed to successfully cycle with -CIcommon_type.
git-svn-id: trunk@8119 -
2007-07-21 19:22:28 +00:00
daniel
32216bcccd * ptrint -> ptruint
git-svn-id: trunk@7888 -
2007-07-01 09:41:07 +00:00
daniel
8ee5966a2e * Fix comparedword and change it to cardinal.
git-svn-id: trunk@7804 -
2007-06-24 21:17:43 +00:00
Jonas Maebe
9cec910eb9 * changed *string_to_*chararray helpers from functions into procedures
because on win64 the location of a function result can depend on its
    size (so some chararrays had to be returned in registers and others
    by reference, which means it's impossible to have a generic function
    declaration which works in all cases) (mantis #8533)
  * pad constant string assignments to chararrays with #0 up to the
    length of the chararray for 2.0.x compatibility (fixes
    tests/test/tarray3)

git-svn-id: trunk@6915 -
2007-03-18 12:20:01 +00:00
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