Commit Graph

164 Commits

Author SHA1 Message Date
florian
6ff15f46e2 * made SwapEndian(<16 Bit>); inlined
git-svn-id: trunk@13453 -
2009-07-26 13:50:57 +00:00
ivost
02d177c885 * added FillQWord, IndexQWord, but CompareQWord is still missing
git-svn-id: trunk@13282 -
2009-06-15 21:35:52 +00:00
Jonas Maebe
b912e00440 * renamed rol/ror functions into rolbyte/rolword/roldword/rolqword
(and the same for ror), because their operation is very dependent on the
    operand size, and it's fairly easy to misjudge the bitwidth of the outcome
    of an expression in Pascal if you are not intimately familiar with the
    language (or if you don't know the exact types of all involved values in
    an expression)

git-svn-id: trunk@12621 -
2009-01-28 12:56:27 +00:00
Jonas Maebe
22aacd2a60 * return 0 for length(pchar(0)), like Kylix does (using corrected and
multi-platform version of patch in r12461, which caused the i386 version
    of fpc_pchar_length to return 0 in all cases, which used tabs, and did
    not include a test case)

git-svn-id: trunk@12464 -
2009-01-01 22:02:17 +00:00
Jonas Maebe
bc9e7c5580 * fixed syntax errors in r11708 (and it wasn't tested in the nightly
Sparc regressions tests because Solaris is an FPC_USE_LIBC platform,
    and these use memset rather than the generic fillchar)

git-svn-id: trunk@11711 -
2008-09-05 13:14:41 +00:00
Jonas Maebe
af05770a7c * fixed alignment code in generic fillchar (not sure why
tests/test/tfillchr didn't fail in the nightly sparc tests)

git-svn-id: trunk@11708 -
2008-09-04 21:42:51 +00:00
florian
20e632c8d8 * reorganized ror/rol defines
git-svn-id: trunk@11472 -
2008-07-28 13:03:18 +00:00
florian
1afb1aa9cc + ror/rol functions
+ internal compiler support for ror/rol on i386

git-svn-id: trunk@11466 -
2008-07-27 17:12:32 +00:00
florian
d672700a59 * some avr fixes
+ cpu16 type defines

git-svn-id: trunk@11380 -
2008-07-13 18:16:24 +00:00
yury
d1dd8bd928 * Fixed warning and notes.
git-svn-id: trunk@10899 -
2008-05-07 12:35:03 +00:00
Jonas Maebe
95637dea75 * fixed swapendian(smallint) (bug found by Joost van der Sluis)
* based swap(smallint) and swap(word) on swapendian(smallint/word),
    since the same bug was already fixed in swap(smallint) in r6752
    (so these routines now share the same code)
  * fixed potential range error in swapendian(word)
  + added basic test for the above four routines

git-svn-id: trunk@10840 -
2008-04-29 22:14:43 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
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