Commit Graph

411 Commits

Author SHA1 Message Date
sergei
4ebc34c5e7 * Promoted result type of FPC_PCHAR_LENGTH and FPC_PWIDECHAR_LENGTH to SizeInt.
+ Check for nil pointer in FPC_PWIDECHAR_LENGTH

git-svn-id: trunk@17733 -
2011-06-13 04:59:17 +00:00
Jonas Maebe
abd6d1800e * fixed Darwin i386 compilation with 2.4.x after r17669 (the 2.4.x Darwin
compiler itself also generates a fpc_geteipasebx symbol), mantis #19523

git-svn-id: trunk@17700 -
2011-06-08 22:12:15 +00:00
florian
449c20ce63 * moved pic helpers into system unit, resolves #8119
git-svn-id: trunk@17669 -
2011-06-05 21:16:11 +00:00
florian
cd8913b88e * improved Compare(D)Word as well
git-svn-id: trunk@17651 -
2011-06-03 20:35:55 +00:00
florian
ceb739fbf5 * improved fillchar for small amounts of data
git-svn-id: trunk@17644 -
2011-06-02 20:54:29 +00:00
florian
b6aa04813e * improved comparebyte for small data amounts
git-svn-id: trunk@17642 -
2011-06-02 20:02:26 +00:00
Jonas Maebe
c14574bb56 * don't change the fpu control word in the initialisation code of dynamic
libraries (mantis #16263, #16801)

git-svn-id: trunk@16347 -
2010-11-14 16:00:25 +00:00
florian
5dae691c96 * implementation of bit scan intrinsics by Richard Vida, resolves #17592
git-svn-id: trunk@16174 -
2010-10-16 15:03:30 +00:00
florian
7dc4b6ecc1 + adds mcount calls to syscall assembler helpers for i386 and x86-64, resolves #17140
git-svn-id: trunk@15812 -
2010-08-15 09:11:06 +00:00
florian
24fea58b92 + initial implementation of iso style gotos in iso mode
* made setjmp/longjmp accessible to the compiler by compiler proc, they are used by the iso goto code

git-svn-id: trunk@15711 -
2010-08-05 19:20:46 +00:00
Jonas Maebe
9273856e84 * disallow pusha*/popa* for x86_64 (mantis #14862)
* disallow pushfd/popfd for x86_64 (mantis #14862)
  * fixed assembling popfq with the internal assembler (it needs a rex.w
    prefisx, while pushfq doesn't)
  * changed the default opcode size of pushf/popf/pusha/popa in
    {$asmmode intel} from "native size" to 16 bit (compatible with Intel
    manuals and Kylix; in AT&T mode, the default size for those operations
    remains the native one)
  * changed pushf/popf in rtl/i386/* into pushfd/popfd because of the
    previous change

git-svn-id: trunk@15546 -
2010-07-10 16:22:46 +00:00
florian
31e2f16484 resolves #15453:
* fixes i386 DivMod with negative numbers with a patch from Jonas
* fixes generic DivMod with negative numbers
* test updated

git-svn-id: trunk@14532 -
2010-01-03 14:59:01 +00:00
Jonas Maebe
92ff07deaf * several fixes by Pierre Pede (parts of his patch to mantis #12492)
o fixed gprof under linux/i386
    o fixed pic-compilation of the linux/i386 rtl
    o initialisation of linux shared libraries is now possible with pic-code

git-svn-id: trunk@13703 -
2009-09-12 21:57:41 +00:00
Jonas Maebe
c2c68ddb8f - removed FPC_NEW_BIGENDIAN_SETS define and if(n)defs
* left old cpu-specific set helper code under ifdef FPC_OLD_BIGENDIAN_SETS
    in case someone wants to write new assembler set helpers (although most
    of them should be optimally generated by the compiler already if
    http://wiki.freepascal.org/FPC_HowToDo#Bit.28field.29_getting.2Fsetting_primitives
    are optimally implemented)

git-svn-id: trunk@13582 -
2009-08-23 08:16:40 +00:00
florian
a14db25c64 + procedure DivMod(Dividend: Integer; Divisor: integer; var Result, Remainder: integer); and procedure DivMod(Dividend: cardinal; Divisor: cardinal; var Result, Remainder: cardinal);, resolves #14286
+ assembler implementations of DivMod for i386

git-svn-id: trunk@13508 -
2009-08-09 20:47:06 +00:00
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