Commit Graph

496 Commits

Author SHA1 Message Date
Jonas Maebe
0597c300f4 * applied feature dependencies patch by Sven Barth from mantis #13673 :
o i386/i386.inc used a function (fpc_truely_ansistr_unique) is now
     only included if FPC_HAS_FEATURE_ANSISTRINGS is enabled (all other
     platforms use the Pascal-only implementations)
   o inc/heap.inc relied on threading
   o inc/threads.inc relied on exceptions, consoleio and stackcheck
   o inc/system.inc: just a feature-related "variable not used"-hint

git-svn-id: trunk@13121 -
2009-05-09 20:08:57 +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
ivost
8046f82416 * Undoing change commited in r12461, it looks like a feature and not a bug ;)
git-svn-id: trunk@12463 -
2009-01-01 21:45:42 +00:00
ivost
fe3263eb08 * i386 version of fpc_pchar_length did not accept NIL strings, maybe we have to check other implementations also
git-svn-id: trunk@12461 -
2009-01-01 21:18:49 +00:00
florian
558cf3ef87 * reset FPU properly after an exception, resolves #12214
git-svn-id: trunk@11820 -
2008-09-25 19:15:54 +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
Jonas Maebe
f00beea41c * fixed i386/linux rtl compilation and functionality when compiled
without regcall

git-svn-id: trunk@11024 -
2008-05-21 15:20:13 +00:00
yury
5dc6e54925 * Removed inline for procedures with assembler or formal parameters, since inline is not supported for them (compiler warns about that now). Even if there is no inline modifier in interface declaration of procedure, it is possible to specify inline in procedure implementation if needed (e.g. for generic implementations) and inlining will work for them.
git-svn-id: trunk@10629 -
2008-04-12 11:37:49 +00:00
Jonas Maebe
c35e0bf712 - removed fclex at the end of fpc_exp_real because it makes that routine 10+
times slower on P4/Athlon XP cpus, and removing it does not cause any test
    suite regressions

git-svn-id: trunk@10284 -
2008-02-10 21:49:52 +00:00
daniel
0d78460e2e * Disable int_str again.
git-svn-id: trunk@9816 -
2008-01-20 14:47:48 +00:00
peter
2a479654f1 * remove asm for simple math functions so the generic inlined function is
taken. This generates smaller optimized code

git-svn-id: trunk@9796 -
2008-01-19 20:23:27 +00:00
daniel
624bb8e7e1 * Add win32 workaround suggested by Peter.
git-svn-id: trunk@9795 -
2008-01-19 19:32:03 +00:00
peter
f70219cdd8 * add align directives to int_str
git-svn-id: trunk@9793 -
2008-01-19 16:32:39 +00:00
daniel
d12e107800 * Use fpc_geteipasebx.
git-svn-id: trunk@9792 -
2008-01-19 15:24:36 +00:00
daniel
220565fb94 * Remove unused lea from skip loop.
git-svn-id: trunk@9789 -
2008-01-19 08:33:48 +00:00
Jonas Maebe
8c45c66e13 * removed accidentally committed global disable of assembler int_str
* fixed compilation of int_str on darwin/pic
  * disabled int_str for darwin because it crashes

git-svn-id: trunk@9785 -
2008-01-18 23:09:37 +00:00
Jonas Maebe
95c991872b + added exeinfo to implicit units so make install works again
git-svn-id: trunk@9784 -
2008-01-18 23:03:38 +00:00
daniel
b8fdbb1055 * Some final tweaks to asm int_str.
git-svn-id: trunk@9782 -
2008-01-18 22:21:49 +00:00
daniel
f94d457429 * Add Darwin PIC support to assembler int_str again.
* Make it respect the open string boundary
  * Activate it again

git-svn-id: trunk@9781 -
2008-01-18 22:12:16 +00:00
daniel
2ce992b4ae - Disable asm str_int again now that testsuites have run.
git-svn-id: trunk@9665 -
2008-01-07 07:45:58 +00:00
daniel
47c2cc095b * Make str_int pic proof.
git-svn-id: trunk@9661 -
2008-01-06 22:41:05 +00:00
daniel
6e2af37c48 Convert str_int to ATT assembler and activate it.
git-svn-id: trunk@9659 -
2008-01-06 21:29:31 +00:00
daniel
0cfdde094d - Disable assembler implementations of str_int because of mysterious
cycle failure on Win32.

git-svn-id: trunk@9593 -
2007-12-30 21:27:05 +00:00
daniel
d8bffd27fc - Intergrate i386/strlen.inc and remove it.
+ int_str assembler implementations for i386
 + fpc_shortstr_to_shortstr assembler implementation for ARM
 + fpc_shortstr_assign assembler implementation for ARM
 + fpc_Pchar_length assembler implementation for ARM

git-svn-id: trunk@9582 -
2007-12-30 11:19:10 +00:00
yury
d306e25dc8 * Fixed warnings.
git-svn-id: trunk@9514 -
2007-12-22 12:27:03 +00:00
florian
d08abbca46 * forgotten commit
git-svn-id: trunk@9334 -
2007-11-25 20:49:57 +00:00
yury
c4ed91b9ff * Fixed warnings about EBP based access.
* Improved SetJmp and longJmp by not using stack frame.

git-svn-id: trunk@9112 -
2007-11-03 18:05:12 +00:00
yury
7230661978 * Fixed warnings about EBP based access.
git-svn-id: trunk@9111 -
2007-11-03 17:09:39 +00:00
yury
4662eb98fc * Fixed warnings.
git-svn-id: trunk@9102 -
2007-11-03 12:22:54 +00:00
florian
b2b0e749bb * win32 system unit doesn't depend anymore directly on the main program, this is necessary to be able to keep it in a dll
git-svn-id: trunk@9052 -
2007-11-01 21:59:43 +00:00
florian
7da7364ee7 * refactored SysResetFPU into SysInitFPU and SysResetFPU
git-svn-id: trunk@8966 -
2007-10-28 12:06:49 +00:00
florian
5a3f71754a - removed odd assembler implementation, using the inline variant usually creates better code
git-svn-id: trunk@8901 -
2007-10-21 19:53:11 +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
3752cfb649 * fix cotan, resolves #9944
git-svn-id: trunk@8819 -
2007-10-15 17:25:52 +00:00
Jonas Maebe
cc843f5f62 * fixed comparedword in case len=0
git-svn-id: trunk@8815 -
2007-10-15 13:44:57 +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
f51bac256d * made pic-safe (by simply not accessing global variables from
assembler code anymore, as I don't see how to easily support
    PIC access to global variables for Darwin/i386)

git-svn-id: trunk@8663 -
2007-09-27 15:08:09 +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
florian
6f6e60b723 * improved SSE check by Martin Schreiber
git-svn-id: trunk@8040 -
2007-07-13 21:16:48 +00:00
daniel
b293a9bdd4 - Revert patch by Alex Raine.
git-svn-id: trunk@7669 -
2007-06-15 14:13:26 +00:00
daniel
14f2edc56e + Assembler implementation of min/max by Alex Rayne.
git-svn-id: trunk@7668 -
2007-06-15 13:59:20 +00:00
florian
80d55022e9 * tried to fix SSE OS support detection
git-svn-id: trunk@7553 -
2007-06-02 19:26:06 +00:00
florian
a8062fafe7 * valgrind safe primitive move implementation
git-svn-id: trunk@7503 -
2007-05-28 18:21:44 +00:00
Jonas Maebe
5cf2511283 - removed/disabled all normalset code (except for bootstrapping), since
it's no longer needed

git-svn-id: trunk@7403 -
2007-05-20 11:19:36 +00:00
florian
1cd41b68f7 * compiler handled round/trunc for x86
git-svn-id: trunk@6827 -
2007-03-13 20:23:24 +00:00
ivost
2c22173534 * Added InterlockedCompareExchange64 for i386 (supported over cmpxchg8b instruction)
git-svn-id: trunk@6753 -
2007-03-09 09:29:17 +00:00
marco
57cfd89fbd * Linux 64-bit FS patch from neli for FPC_USE_LIBC
git-svn-id: trunk@6517 -
2007-02-16 22:16:54 +00:00
peter
cd767cf5c8 * i386 uses generic fpc_compare_shortstr_equal
git-svn-id: trunk@6335 -
2007-02-04 16:24:02 +00:00
Jonas Maebe
5ea26c5f5f * fixed darwin compilation
git-svn-id: trunk@6310 -
2007-02-02 22:48:02 +00:00
florian
bcf65051e3 * detect sse properly on linux, fixes tmask*.pp in the testsuite with -Cfsse2
git-svn-id: trunk@6277 -
2007-01-31 21:51:47 +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
685844b61c * set SSE CSR if sse is supported by the CPU
git-svn-id: trunk@6021 -
2007-01-17 08:27:48 +00:00
florian
b3a1868ff0 * correct masking of exceptions in genmath code
git-svn-id: trunk@5965 -
2007-01-14 10:44:10 +00:00
Jonas Maebe
3381fd2ea1 * ismultithread is a longbool nowadays (cmpb -> cmpl)
git-svn-id: trunk@5893 -
2007-01-11 17:32:15 +00:00
florian
4b88079c41 + i386 assembler implementations of tan, cotan, sincos
* default tan, cotan use now sincos

git-svn-id: trunk@5809 -
2007-01-04 12:58:40 +00:00
florian
90787bb436 * disable sse/mmx fastmode code in case of valgrind usage
git-svn-id: trunk@5342 -
2006-11-12 16:54:44 +00:00
florian
4ee9f1b394 * use DefaultCW to reload fpu settings
git-svn-id: trunk@5169 -
2006-11-02 08:58:01 +00:00
Jonas Maebe
5acc8b44a8 * activated internal get_frame for x86
* turn off stackframe optimizations on x86 if get_frame is called
    in the current routine, or if the address of a nested function
    is taken in the current routine
  + test for the above
  * this fixes the IDE when compiled with stackframe optimizations
    on x86

git-svn-id: trunk@5146 -
2006-11-01 12:48:53 +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
florian
0ade2e487d * cleaned up and fixed (from mftq75) sse unit initialization, fixes #7268
git-svn-id: trunk@4501 -
2006-08-24 20:00:06 +00:00
Jonas Maebe
982c1a39c4 * and yet more ebx saving/restoring
git-svn-id: trunk@4176 -
2006-07-14 11:57:07 +00:00
florian
b24388da8d * fix comparedword, fixes #7143
git-svn-id: trunk@4153 -
2006-07-12 20:50:48 +00:00
florian
81b98c9d82 + added more ebx saving to cpuid invocations
git-svn-id: trunk@4147 -
2006-07-12 07:23:03 +00:00
Jonas Maebe
bddcc8f902 * save/restore ebx around cpuid invocations
git-svn-id: trunk@4145 -
2006-07-11 20:50:44 +00:00
florian
6185a32923 * amd specific flags are checked against cpu vendor
git-svn-id: trunk@4138 -
2006-07-10 18:03:30 +00:00
Jonas Maebe
b9125f97d0 * fixed InterlockedCompareExchange
git-svn-id: trunk@3947 -
2006-06-25 18:52:12 +00:00
peter
4c065bce45 * move InterLocked functions to system unit
git-svn-id: trunk@3933 -
2006-06-25 09:26:23 +00:00
daniel
6f1e0eff45 * Add ifdef internal_backtrace
git-svn-id: trunk@3518 -
2006-05-14 08:49:34 +00:00
florian
47fac4ee6e * moved *SSECSR to system unit
* exposed cpu feature detection on i386 from system unit
+ SafeLoadLibrary

git-svn-id: trunk@3481 -
2006-05-11 19:13:54 +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
Jonas Maebe
83b1c3736a * fixed assembler version of fpc_AnsiStr_Decr_Ref (based on remark
from Martin Schreiber)

git-svn-id: trunk@2856 -
2006-03-11 14:16:11 +00:00
Jonas Maebe
15270b67be - disabled assembler ansistring helpers for darwin/x86 because they don't
keep 16 byte stack alignment

git-svn-id: trunk@2852 -
2006-03-11 13:18:28 +00:00
peter
f411f615c6 * nostackframe directives
git-svn-id: trunk@2648 -
2006-02-20 10:37:42 +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
florian
0d61229d63 * fpc_ansistring_decr improved
git-svn-id: trunk@2629 -
2006-02-19 14:38:06 +00:00
florian
af9d6344b8 * activated fastmove on win32
git-svn-id: trunk@2218 -
2006-01-08 10:10:28 +00:00
florian
fb4557d71e * first implementation of pic for i386
git-svn-id: trunk@2107 -
2006-01-01 20:14:48 +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
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
florian
e2a4dac215 + i386 assembler versions of decr_ansistring and unique_ansistring
git-svn-id: trunk@1963 -
2005-12-15 19:51:57 +00:00
marco
8f50bb556e * small fix to inclocked inlining changes
git-svn-id: trunk@1340 -
2005-10-09 11:06:47 +00:00
marco
5c92d88da8 * inlined a few funcs, inlined the non threaded part of inc/declocked. The lock prefixed one
remains a separate proc, as it is slow anyway.

git-svn-id: trunk@1339 -
2005-10-09 10:57:29 +00:00
michael
9beb37574e + Removed SHORTSTRCOMPAREINREG define
git-svn-id: trunk@309 -
2005-06-09 17:59:46 +00:00
michael
addadd41bf + removed HAS_GENERICCONSTRUCTOR define
git-svn-id: trunk@297 -
2005-06-09 17:43:58 +00:00
michael
a775d3d487 + Removed HASCURRENCY VALUEGETMEM VALUEFREEMEM defines
git-svn-id: trunk@293 -
2005-06-09 17:33:22 +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
0fe5266f4d + Removed NOBOUNDCHECK define
git-svn-id: trunk@263 -
2005-06-07 21:17:22 +00:00
michael
db5d9d75aa + Removed INTERNCOPY define
git-svn-id: trunk@259 -
2005-06-07 21:11:49 +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
michael
ffb55c4254 + Removed VER1_0 defines
git-svn-id: trunk@33 -
2005-05-19 21:14:45 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
16b121f8c4 * unblock signal in signalhandler, remove the sigprocmask call
from setjmp
2005-04-24 21:19:22 +00:00
florian
9445db95f3 * widestring manager can handle now ansi<->wide string conversions even if the lens don't match 2005-03-14 21:09:04 +00:00
florian
f94047b703 * some floating point routines improved 2005-03-13 17:14:46 +00:00
florian
3e5f68d360 * C. Western: utf-8 reading from resource files 2005-03-09 20:50:11 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
ae8b7b153b * include file cleanup 2005-02-13 20:01:37 +00:00
florian
d7dbd71881 * fastmove disabled, has too much drawbacks 2005-01-26 20:58:10 +00:00
peter
8be342c36b * pinteger in non-delphi/objfpc mode is psmallint 2005-01-24 18:03:19 +00:00
peter
445fe79686 * no sigprocmask for 1.0.x bootstrapping 2005-01-24 16:54:16 +00:00
florian
8a2bc0e507 * 1.0.x fix 2005-01-24 08:17:00 +00:00
florian
6780d226ce * made IA32 the default 2005-01-23 20:10:05 +00:00
florian
3600b51d32 + fastmove from John O'Harrow integrated 2005-01-23 20:03:23 +00:00
peter
7395e7e546 * restore sigprocmask for linux 2005-01-20 16:38:28 +00:00
florian
43e425072b * fixed div by zero check for qword mod qword 2004-11-21 16:41:16 +00:00
peter
2633b4883f * external fixes 2004-11-21 16:33:55 +00:00
peter
4d8460ec2f * float routines all use internproc and compilerproc helpers 2004-11-21 15:35:23 +00:00
peter
14eb8f59b4 internconst, internproc and some external declarations moved to interface 2004-11-17 22:19:04 +00:00
peter
e85d8c970c fixed result of strlcopy 2004-11-04 20:57:33 +00:00
florian
07c28067aa * fixed sse exception handling 2004-11-02 15:26:21 +00:00
peter
f80f3fc0fa * shortstr compare with empty string fixed
* removed special i386 code
2004-11-01 12:43:28 +00:00
peter
fd759e521f * saveregisters calling convention is obsolete 2004-10-24 20:01:41 +00:00
florian
9205c6e800 * fixed overflow checking in qword multiplication 2004-09-26 08:52:51 +00:00
florian
051126d079 * assembler version of mod_qword_word reactivated 2004-07-25 11:50:39 +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
Jonas Maebe
d43436e1cd * fixed indexbyte/word/dword when length is 0 (return -1 instead of 0) 2004-07-18 16:40:08 +00:00
peter
783f8068a5 * add fclex for fpu exceptions to round/trunc 2004-07-09 23:06:11 +00:00
daniel
509870553d * Aligment code in fillchar proved to slow down stuff seriously instead of
speeding it up. This is logical, the compiler aligns everything very well,
    it is possible that fillchar gets called on misaligned data, but it seems
    this never happens.
2004-07-07 17:38:58 +00:00
florian
6427a54c3d * fixed some bootstrapping problems as well as some 64 bit stuff 2004-06-13 10:49:50 +00:00
florian
7f2606ed8a * fpc_mul_qword uses always the assembler implementation 2004-05-10 20:58:20 +00:00
peter
61036b2149 * fixed wrong typecasts 2004-05-09 15:47:56 +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
269d24955a * inclocked_longint ifdef fixed 2004-04-29 20:00:47 +00:00
peter
b4474438d9 * FPC_MOVE alias 2004-04-26 15:55:01 +00:00
marco
e546db7a23 * interlocked* changed to longints, including winapi. (which was a bug) 2004-03-05 12:17:50 +00:00
florian
c9122a4719 + completed x86-64/linux system unit 2004-02-05 01:16:12 +00:00
Jonas Maebe
5439babeb5 + cgeneric.inc: implementations of rtl routines based on libc
* system.inc: include cgeneric.inc before powerpc.inc/i386.inc/... if
    FPC_USE_LIBC is defined
  * powerpc.inc, i386.inc: check whether the routines they implement aren't
    implemented yet in another include file (cgeneric.inc)
2004-01-11 11:10:07 +00:00
Jonas Maebe
6bd3eccdac + fpc_cpuinit procedure to allow cpu/fpu initialisation before any unit
initialises
  + fpu exceptions for invalid operations and division by zero enabled for
    ppc
2004-01-02 17:21:50 +00:00
peter
31a33a1a7b * fixed indexbyte for regcall 2003-12-24 23:07:28 +00:00
peter
bcdf065947 * fix set_set_range 2003-12-24 22:38:24 +00:00
peter
d11cecb354 * removed assembler
* cleanup
2003-12-24 22:27:13 +00:00
peter
0105b62700 * fix call to handleerror for regcall 2003-12-23 23:09:43 +00:00
peter
c1a25f53b6 * increment should use ofcourse use 1 instead of -1 2003-12-23 22:23:34 +00:00
michael
71da578b33 + Patch from Peter to fix strlcomp 2003-12-19 09:28:00 +00:00
peter
6b6741b41c * win32 regcall patches 2003-12-17 21:56:33 +00:00
peter
48b84272bf * fix warning in gas 2003-12-04 21:44:39 +00:00
peter
0d3948fc5f * register calling updates 2003-12-04 21:42:07 +00:00
peter
07f38cd53a * more fixes 2003-12-03 23:06:35 +00:00
peter
e0bf2ea8d1 * typo in sub_set 2003-12-03 22:46:54 +00:00
Jonas Maebe
89d4ca293b * fix power() for negative base 2003-11-29 16:40:12 +00:00
michael
8373e40e10 + Patch from Johannes Berg for bug #2759 2003-11-24 21:57:43 +00:00
peter
23ae4449ec * register calling updates 2003-11-23 16:50:49 +00:00
peter
5e5462edd1 * make strpas assembler function 2003-11-19 16:58:44 +00:00
peter
8f8b47194a * REGCALL define added 2003-11-11 21:08:17 +00:00
marco
b15ba0a5ae * Peter's Cardinal<->Longint fixes patch 2003-11-03 09:42:27 +00:00
mazen
84e8f0e96b + assembler mode forced to ATT style for x86 cpu 2003-10-31 09:20:11 +00:00
marco
41e3249c4b * fix from peter i386.inc to circumvent ebx destroying 2003-10-27 09:16:57 +00:00