Commit Graph

514 Commits

Author SHA1 Message Date
pierre
c979ded1f9 Use FPUSOFT instead of CPUCOLDFIRE for settings some m68k software macors
git-svn-id: trunk@23186 -
2012-12-18 15:20:33 +00:00
Jonas Maebe
14b1c8a99c * moved fpc_threadvar_relocate_proc from systemh.inc to thread.inc
and gave it the correct type (TRelocateThreadVarHandler)
  * changed parameter type of InitThread also to TRelocateThreadVarHandler

git-svn-id: trunk@23130 -
2012-12-09 22:42:46 +00:00
florian
eeef57a2a1 * merging more of Jeppe Johansen's arm-embedded branch
git-svn-id: trunk@22824 -
2012-10-22 21:12:29 +00:00
Jeppe Johansen
628d46f2d3 Fixed Bsf* functions on platforms that support RBIT
Fixed stackframe epilogue code for Thumb2 to allow proper processing of interrupts

git-svn-id: branches/laksen/arm-embedded@22813 -
2012-10-21 19:13:59 +00:00
svenbarth
d5523e6af6 For now completely disable (I)MUL/(I)DIV support for Coldfire and pass through the RTL routines
(of which the names had changed from FPC_MUL_LONGWORD->FPC_MUL_DWORD and FPC_MOD_CARDINAL->
FPC_MOD_DWORD).
Also disable the usage of FPU opcodes for Coldfire.

git-svn-id: trunk@22739 -
2012-10-18 20:11:39 +00:00
Jonas Maebe
598d2feeb6 + rtldefs.inc file for every target that contains defines shared by multiple
RTL units. Comes with a FPCRTL_FILESYSTEM_UTF8 define that can be
    activated for targets whose single byte filesystem interface enforces
    UTF-8; included in inc/systemh.inc and unix/cwstring.pp until now
  + DefaultFileSystemCodePage variable that holds the code page used for
    communicating with the OS single byte file system APIs, and for the
    strings returned by those same APIs. Initialized with
   o the result of GetACP in the system unit of Windows platforms, except for
     WinCE which uses UTF-8 since its file system OS API calls already use
     the UTF-16 versions
   o CP_UTF8 on Unix platforms with FPCRTL_FILESYSTEM_UTF8 defined, and with
     DefaultSystemCodePage on other Unix platforms
   o DefaultSystemCodePage on Java/Android JVM targets
  + DefaultRTLFileSystemCodePage variable that holds the code page used to
    encode strings returned by RTL routines that return filenames obtained
    from OS API calls. By default the same as DefaultFileSystemCodePage on
    all platforms. Separate from DefaultFileSystemCodePage for clarity on
    platforms that may use either utf-16 or single byte OS API calls to
    send/receive file names (such as most Windows platforms)
  + new scpFileSystemSingleByte enum that can be passed to
    GetStandardCodePage() to get the default code page for OS single byte file
    system APIs, with implementations for Unix and Windows
  + SetMultiByteFileSystemCodePage() procedure to override the value of
    DefaultFileSystemCodePage

  In principle, in the long run unchanged programs only using generic
  ansistrings and unicodestrings should (mostly) behave the same as in
  FPC 2.6.0 as far as RTL-level file system APIs are concerned if
  they set DefaultFileSystemCodePage and DefaultRTLFileSystemCodePage
  to DefaultSystemCodePage at the start of their execution

git-svn-id: branches/cpstrrtl@22466 -
2012-09-27 07:54:06 +00:00
florian
d63ebe6464 * bsr implementation for armv5+ using clz
git-svn-id: trunk@22310 -
2012-09-04 12:56:38 +00:00
florian
9be3ca04ad * split FPC_HAS_INTERNAL_BSX_* defines into FPC_HAS_INTERNAL_BSF_* and FPC_HAS_INTERNAL_BSR_*
git-svn-id: trunk@22308 -
2012-09-04 12:56:18 +00:00
florian
ff12d63248 + generic popcnt support
git-svn-id: trunk@22290 -
2012-09-02 20:59:44 +00:00
florian
b782918434 * first draft to support the popcnt instruction, works so far for x86 with a real popcnt instruction
git-svn-id: trunk@22289 -
2012-09-02 20:59:39 +00:00
pierre
f340ef87e3 * get_addr function renamed to get_pc_addr
+ get_caller_stackinfo procedure added.

git-svn-id: trunk@21707 -
2012-06-25 22:17:49 +00:00
pierre
8469741700 + Added additional addr pointer parameter to
get_caller_frame, get_caller_addr and dump_stack
  with default NIL value to systemh.inc.
  + Added new get_addr function.
  system.inc: Use get_addr and get_frame to call
  HandleErrorAddrFrame instead of HandleErrorFrame
  in several error functions.
  Modify dump_stack to use frame and addr parameters.
  Provide a dummy get_addr function returning nil.
  i386/i386.inc, x86_64./x86_64.inc: Provide real
  implementation of get_addr function.

git-svn-id: trunk@21697 -
2012-06-24 21:22:09 +00:00
masta
3d9d484bfd Remove redundant CPU-Check for FPC_HAS_INTERNAL_ABS_LONG
compiler/options.pas only defines FPC_HAS_INTERNAL_ABS_LONG for cpus
which support the intrinsic. No need to check again in the rtl.

git-svn-id: trunk@21677 -
2012-06-21 20:12:31 +00:00
pierre
be67af4374 * Adapt to mipsel compiler defining cpumipsel and cpumipsel32 but not cpumips anymore
git-svn-id: trunk@21541 -
2012-06-08 09:33:03 +00:00
pierre
f971854db6 * Patch from Fuxin Zhang
git-svn-id: trunk@21525 -
2012-06-07 22:59:02 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
marco
3610aaa01a * int32 is longint in default mode, not integer.
git-svn-id: trunk@20604 -
2012-03-23 17:51:34 +00:00
marco
d7d461f6d3 * Adding Delphi (2010 or XE) equivalents to our ctypes unit. Mantis #21537
git-svn-id: trunk@20603 -
2012-03-23 17:49:59 +00:00
pierre
69c1a6cd16 Set FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE for mips
git-svn-id: trunk@20447 -
2012-02-29 11:21:08 +00:00
florian
8b339ded7a * started to fix the mips(el) linux rtl
git-svn-id: trunk@20255 -
2012-02-04 21:25:53 +00:00
florian
4765728fc4 * use SarInt64 to optimize 64 bit divs on 32 bit platforms, resolves #20998
git-svn-id: trunk@19968 -
2012-01-04 22:58:25 +00:00
florian
6a1a2d3464 * get rid of some feature checks, probably the whole feature stuff is plainly the wrong way, embedded rtl compiles again, resolves #20913
git-svn-id: trunk@19907 -
2011-12-29 14:06:30 +00:00
sergei
3b904943e7 * Moved ExceptObjProc from objpas to system, because it is going to be called from system. Also added ExceptClsProc variable.
* Fixed SExceptionErrorMessage, it was missing format placeholder.

git-svn-id: trunk@19787 -
2011-12-09 14:52:26 +00:00
paul
2254dad68a rtl: add SetTextCodePage, GetTextCodePage functions which set/get TTextRec.CodePage field
git-svn-id: trunk@19541 -
2011-10-25 02:16:34 +00:00
paul
836889fc64 rtl: move some CP_xxx constants from syswin into systemh for generic use, redeclare UTF8Sting, RawByteString using constant identifiers instead of pure numbers. replace comparison with $ffff codepage to CP_NONE
git-svn-id: trunk@19354 -
2011-10-04 05:05:14 +00:00
paul
451e48a033 rtl: replace PChar -> PAnsiChar, Char -> AnsiChar in astrings.inc routines
git-svn-id: trunk@19291 -
2011-09-30 08:15:17 +00:00
florian
375f83c874 * moved heap manager on embedded systems into a separate unit
* moved console io on embedded systems into a seperate unit, this unit might setup input/output e.g. to be redirected to a serial port
* cleanup of the embedded system unit

git-svn-id: trunk@19168 -
2011-09-21 20:57:37 +00:00
paul
8b0cb2c1d5 compiler:
- don't parse '(' token after the type declaration inside the type block
  - replace parse of "string<codepage>" to "type AnsiString(codepage)" for delphi compatibility
  - fix tests to use "type AnsiString(codepage)"

git-svn-id: trunk@19148 -
2011-09-19 04:11:57 +00:00
paul
005795495d merge r17552 from cpstrnew branch by inoussa:
*In normal procedure "var" and "out" RawByteString parameters does not accept other string types. Procedures with
"compilerproc" directive or the newly added "rtlproc" directive accept that. Please note that it is up to the
procedure coder to ensure the correctness of the code page in that case. The new directive is needed to handle 
the RTL procedures/functions that are not marked as "compilerproc" such as "UniqueString", "Insert" and "Delete".

*Correct "fpc_ansistr_concat" to handle code page correctly.

*Default "ansitring" type is now created with code page set to "0" instead of "65535". Before that change it was 
impossible to distinguish a "RawByteString" with the default "ansistring". At runtime "ansistring" variable'code
page is set to DefaultSystemCodePage

*UniqueString flavor of "SetLength" has been updated to release memory when shrinked to at least 50%, like ansitring
does.

git-svn-id: trunk@19118 -
2011-09-17 13:52:09 +00:00
paul
22b19220a3 merge r17485 from cpstrnew branch by michael:
Patch from Inoussa:
* rtl/inc/astrings.inc
    ** "fpc_AnsiStr_Concat_multi" : add "cp" parameter. If the "DestS" variable is "nil" this code page
       is use in order not to loose the declared code page of the original (result)variable.
    ** "fpc_AnsiStr_Compare" : modify to compare taking care of the code  page of the arguments.
    ** "fpc_AnsiStr_Compare_equal" : modify to compare taking care of the code page of the arguments.
    ** "fpc_AnsiStr_SetLength" : add "cp" parameter. If the "S" variable is "nil" this code page
       is use in order not to loose the declared code page of the original (result)variable.

* rtl/inc/systemh.inc
    ** add "SetCodePage" prototype.

git-svn-id: trunk@19114 -
2011-09-17 13:34:37 +00:00
paul
091627883f merge r14347 from cpstrnew branch by florian:
* fixed bootstrapping with 2.4.0
* patches by Graeme Geldenhuys, resolve #15251, #15252, #15253

git-svn-id: trunk@19102 -
2011-09-17 12:00:06 +00:00
paul
55434fd1d8 merge r14143 from cpstrnew branch by paul:
use RawByteString instead of AnsiString for Pos()

git-svn-id: trunk@19099 -
2011-09-17 11:54:58 +00:00
paul
ad8195e9ae merge r14136 from cpstrnew branch by paul:
- fix return type of StringCodePage functions from Word to TSystemCodePage
- add SetMultiByteConversionCodePage procedure (which just change the DefaultSystemCodePage constant)

git-svn-id: trunk@19095 -
2011-09-17 11:46:33 +00:00
paul
8cc22972a0 merge r13488 from cpstrnew branch by florian except ncgcon.pas which has a difficult merge conflict (code moved to another unit which is not at the branch during the revision):
* first batch of patches to make tcpstr1.pp work

git-svn-id: trunk@19085 -
2011-09-17 11:16:45 +00:00
paul
8a4634a7b1 merge r13481 from cpstrnew branch by florian
+ support parsing of strings with code page specification
+ added encoding and elementsize field to ansi- and unicodestring records
+ some basic rtl support routines for encoding aware strings
+ DefaultSystemCodePage
+ DefaultUnicodeCodePage
+ ppu writing/loading of code page aware strings

git-svn-id: trunk@19080 -
2011-09-17 10:37:36 +00:00
florian
dbd33fd6a5 * use thread var only if the target supports threading
git-svn-id: trunk@18967 -
2011-09-04 14:27:23 +00:00
pierre
f0aa48b083 * Remove use of direct U_UNIT_NAME or TC_UNIT_NAME
symbols in assembler sources.
  Added to corresponding system variables or typed constants a
  public name 'operatingsystem_XXX' alias and used that alias in assembler
  source.

git-svn-id: trunk@18943 -
2011-09-02 12:51:48 +00:00
florian
a683b7e9f1 * make IsLibrary a constant if the target has no dyn. lib support
git-svn-id: trunk@18867 -
2011-08-27 22:43:06 +00:00
pierre
2d5ca71a06 + New procedure SysFlushStdIO (code taken from InternalExit).
* InternalExit: now calls new procedure SysFlushStdIO
 * DoneThread: Also calls SysFlushStdIO to avoid loosing output
 if standard files are redirected.

git-svn-id: trunk@17798 -
2011-06-22 16:16:27 +00:00
florian
efea42bcdf * rewrote Ror/Rol/Sar so that it can be completely folded into a const by the compiler
if possible, the copied (dist and xxx) expressions are folded by the CSE so they don't hurt

git-svn-id: trunk@17764 -
2011-06-16 20:27:11 +00:00
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
florian
7f0d245ac2 * reintegrate avr branch into trunk, work on avr is less invasive than I thought so it can be continued in trunk
git-svn-id: trunk@17348 -
2011-04-19 20:17:52 +00:00
marco
5595aafa90 * support for Delphi/64 NativeInt and NativeUint as shown in several promotions on the web. (aliases for ptrint/ptruint)
git-svn-id: trunk@17303 -
2011-04-11 09:48:51 +00:00
florian
fb84cb865b * rebase to trunk@17295
git-svn-id: branches/avr@17296 -
2011-04-10 19:20:48 +00:00
sergei
0849132ee1 + added procedure SetString(AnsiString, PWideChar, SizeInt)
git-svn-id: trunk@17138 -
2011-03-15 14:09:05 +00:00
florian
d5455cf6ac + software multiplication support for OS_16,OS_S16,OS_32,OS_S32
git-svn-id: branches/avr@17020 -
2011-02-26 20:33:01 +00:00
florian
f15141a6f3 - removes 2.2.x bootstrapping stuff
git-svn-id: trunk@16465 -
2010-11-28 17:29:15 +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
Jonas Maebe
a302cbeff1 * more Win64 -> FPC_HAS_TYPE_EXTENDED check conversions
git-svn-id: trunk@15534 -
2010-07-07 19:02:18 +00:00
marco
20499117de * reenabled ttime and tdate in system.
git-svn-id: trunk@15295 -
2010-05-19 08:23:44 +00:00
florian
34f976afea * enabled internal sar support for sparc and mips as well
git-svn-id: trunk@14867 -
2010-02-04 22:04:19 +00:00
florian
dfc2652062 + support of compiler intrinsic sar* using a patch by Benjamin Rosseaux, resolves #15606
git-svn-id: trunk@14834 -
2010-01-31 16:47:01 +00:00
florian
775f532c95 * disabled TTime and TDate for now till a solution for the conflicts on unix is found
git-svn-id: trunk@14581 -
2010-01-08 21:22:25 +00:00
florian
06e604cffd + patch by Sven Barth to add TDate and TTime to the system unit, resolves #15474
git-svn-id: trunk@14573 -
2010-01-08 09:56:09 +00:00
florian
4faf2e9f0f * cleaned up redundant declarations of types like PP(P)Char/Byte and moved them to the system unit
git-svn-id: trunk@14481 -
2009-12-26 20:47:24 +00:00
Jonas Maebe
3138093fdf * changed errnum parameter of halt() from byte to longint to match the
definition of exitcode (mantis #15231)

git-svn-id: trunk@14339 -
2009-12-06 10:02:05 +00:00
marco
17062d667c * ansistring versions of mk/rm/chdir in objpas, Mantis 15010. The os-dependant routines of *nix/os2/win/dos have been converted
git-svn-id: trunk@14211 -
2009-11-18 18:04:51 +00:00
Jonas Maebe
335e159c11 Merged revisions 13351-13373,13376-13457 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

git-svn-id: branches/objc@13458 -
2009-07-26 14:31:50 +00:00
florian
90d71ee7da * SwapEndian(<16 Bit>) needs inline in the interface section as well
git-svn-id: trunk@13454 -
2009-07-26 13:57:51 +00:00
Jonas Maebe
92de010fe1 Merged revisions 13218-13347 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

git-svn-id: branches/objc@13350 -
2009-06-28 16:09:53 +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
b1b9894ae3 * initial Objective-C 1.0 support:
o support for declaring external Objective-C classes (see
      rtl/inc/objcbase.pas), including derived classes
    o support for converting methods of objcclasses into selectors
      (see tests/test/tobjc1.pp)
    o support for loading from/storing to fields of objcclasses
    o support for calling Objective-C methods using regular
      Object Pascal syntax (see tests/test/tobjc1.pp)
    o some things that are known to be not yet working:
      o automatic conversion from ID to objcclasses and back
      o declaring and implementing new objcclasses/methods in Pascal code
      o debug information (objcclasses are currently plain pointers
        as far as the debugger knows)

git-svn-id: branches/objc@13162 -
2009-05-17 13:42:50 +00:00
Jonas Maebe
b77bff2996 + cardinal/qword overloads for interlocked* routines (mantis #13281)
git-svn-id: trunk@13127 -
2009-05-10 15:22:38 +00:00
Jonas Maebe
ab8b32dafb - removed PARAOUTFILE define and ifdefs
git-svn-id: trunk@12898 -
2009-03-15 12:31:02 +00:00
Jonas Maebe
6165536b5e + added {$modeswitch objectivec1}/-Mobjectivec1 mode switch to enable
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
    can be used cumulatively with every syntax mode. Note that a {$mode xxx}
    statement resets all mode switches as well, so you cannot use the
    -Mobjectivec1 variant if you have such a statement in a unit. This
    modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
    as the backend support is not yet implemented for other platforms.
  + implemented selector() statement that can be used to create an Objective-C
    selector for the message with the specified *constant* name (in the future,
    it will also work for Objective-C method identifiers)
  + added SEL type to the system unit (the selector() statement returns it)
  + added all Objective-C segments to the assembler writers
  + (currently mostly dummy) objc1 unit that is automatically included if the
    {$modeswitch objectivec1} statement is used
  + some tests for the selector() statement

git-svn-id: trunk@12870 -
2009-03-08 18:40:32 +00:00
Jonas Maebe
213c00b17f * updated check for minimum version required to build trunk (at least
FPC 2.2.2)

git-svn-id: trunk@12671 -
2009-02-03 11:43:42 +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
florian
f64dbd70cf * make unicodechar equivalent to widechar, resolves #12233
git-svn-id: trunk@11830 -
2008-09-27 12:40:42 +00:00
Jonas Maebe
6b473862cf * give an error stating that you have to use the latest released compiler
to build 2.3.1 since the unicode branch merge

git-svn-id: trunk@11795 -
2008-09-16 21:59:15 +00:00
tom_at_work
8a5a6db065 * rol/ror inlines for powerpc/powerpc64 (only for 32/64 bit operands for now)
git-svn-id: trunk@11770 -
2008-09-13 16:29:42 +00:00
florian
b178b08ba7 Merged revisions 11665-11738 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

........
  r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * continued to work on unicodestring type support
........
  r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
  r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * more unicodestring stuff fixed, test results on win32 are already good
........
  r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * first fixes for unix bootstrapping
........
  r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
  
      * fixed 64bit bug in iconvenc.pas
........
  r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
  
  * fixed several errors when building on unix
........
  r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * fixed unix compilation
........
  r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * bootstrapping fix
........
  r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * more bootstrapping fixed
........
  r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
  
  + two missing compiler procs exported
........
  r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + lazarus project for the linux rtl
........
  r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + set unicode string procedures
........
  r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  * fixed several type casting stuff
........
  r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
  
  * fixed unicodestring compilation on windows after recent unix changes
........
  r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
  
  + UnicodeString support for Variants
........
  r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
  
  * patch by Martin Schreiber for UnicodeString streaming
........
  r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
  
  * fixed test
........
  r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
  
  * fixed typo when converting tunicodestring to punicodechar
........
  r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
  
  * fixed writing of UnicodeString properties
  * moved some helper routines to unicode headers
........
  r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
  
  * fixed bootstrapping
........
  r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
  
  * first fixes for persisten unicodestrings
........
  r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-11663" from 
  http://svn.freepascal.org/svn/fpc/trunk
........
  r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  * fixed unicodestring <-> variant handling
  * fixed unicodestring property reading
........

git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
Jonas Maebe
7b467fa2a0 * Don't inline ioresult. It's not speed critical and inlining it causes
code bloat.

git-svn-id: trunk@11596 -
2008-08-16 20:51:52 +00:00
florian
fe7cba52dc + support of inlined ror/rol on arm
git-svn-id: trunk@11473 -
2008-07-28 15:48:38 +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
giulio
9203f46e1a * Handling of -Sf parameter fixed
* Fixed definition of FPC_HAS_FEATURE_xxx macros for targets not supporting the full range of features
 * Added DYNLIBS feature

git-svn-id: trunk@10932 -
2008-05-10 17:00:04 +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
florian
48fb130be3 * fixed fpu type setting for avr
git-svn-id: trunk@10463 -
2008-03-08 17:09:40 +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
florian
c05d4912f4 + basic system unit for avr-embedded
* fixed several compiler stuff to be able to start system unit compilation on avr

git-svn-id: trunk@10318 -
2008-02-13 20:35:16 +00:00
tom_at_work
52135af71f * implement branchless fpc_abs_long in a generic way
* enable optimization for ppc/ppc64 (two times faster than 
"generic" rtl branching routine)

git-svn-id: trunk@10306 -
2008-02-11 21:13:52 +00:00
marco
bce663bb43 * Fix for 10491, pdatetime now defined.
git-svn-id: trunk@9563 -
2007-12-29 13:11:23 +00:00
peter
6ed3d91989 * CompareText for shortstrings added
* optimize CompareText
  * use CompareText for case-insenstive compares in the RTL
  patches from Sergei Gorelkin

git-svn-id: trunk@9384 -
2007-12-02 18:36:20 +00:00
florian
fb8bbd5ff0 + inline abs(<longint>) on x86
git-svn-id: trunk@9333 -
2007-11-25 18:54:40 +00:00
peter
43c446e742 * add DumpExceptionBackTrace
git-svn-id: trunk@9071 -
2007-11-02 22:08:17 +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
7878f0feb3 * made all fpc_*_to_shortstr helpers a procedure, resolves #8580
git-svn-id: trunk@8898 -
2007-10-21 17:33:18 +00:00
Jonas Maebe
8ed15c96bb - removed COMPPROCINLINEFIXED define and ifdefs (fixed in 2.2.0)
git-svn-id: trunk@8789 -
2007-10-14 09:44:18 +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
Tomas Hajny
58bca68e6a + infrastructure for CtrlBreakHandler added
git-svn-id: trunk@8691 -
2007-09-30 14:14:33 +00:00
florian
b11e861b0f + define DEFAULT_DOUBLE on m68k
git-svn-id: trunk@8499 -
2007-09-16 10:20:16 +00:00
Jonas Maebe
a57f9e0672 + added QWord overloads for IntToHex, hexStr, OctStr, binStr
git-svn-id: trunk@8332 -
2007-08-29 12:06:54 +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
daniel
35b6980254 * Put pptrint back in place.
git-svn-id: trunk@7897 -
2007-07-01 11:05:39 +00:00
daniel
ea47fcfc97 * ptrint -> ptruint
git-svn-id: trunk@7892 -
2007-07-01 10:14:19 +00:00
florian
5c58f69595 + ModuleIs* typed consts added
git-svn-id: trunk@7799 -
2007-06-24 20:28:40 +00:00
yury
5afc9355f8 * use proper runtime error codes for EIntfCastError and ESafecallException exceptions.
git-svn-id: trunk@7723 -
2007-06-18 17:38:07 +00:00
florian
041ff166cc * fixed arm compilation
git-svn-id: trunk@7499 -
2007-05-28 16:04:43 +00:00
peter
5c914393d5 * added uint64 alias
git-svn-id: trunk@7338 -
2007-05-15 05:41:02 +00:00
ivost
ed87187cad * removed InterlockedCompareExchange64 for i386 from system unit
git-svn-id: trunk@6775 -
2007-03-10 18:08:21 +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
daniel
0cc43888e9 * Redefine ucs4char as subrange type ($0..$10ffff), which is the legal
Unicode range.

git-svn-id: trunk@6618 -
2007-02-23 14:41:33 +00:00
florian
f42a2d67b9 * made exitcode a longint, at least windows supports it, delphi uses a longint too
git-svn-id: trunk@6549 -
2007-02-18 20:26:28 +00:00
florian
48e51671e5 * don't include compiler proc. in the docs
git-svn-id: trunk@5779 -
2007-01-01 22:55:40 +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
Jonas Maebe
4240479f5d * fixed datarace in CBeginThread
git-svn-id: trunk@5274 -
2006-11-07 14:05:09 +00:00
florian
4cbb67aa00 * some fpu emulation code from arm to generic code generator moved
* several m68k fixes

git-svn-id: trunk@5218 -
2006-11-04 10:23:35 +00:00
micha
53f935213f * re-export operatingsystem_result (only not needed for i386-linux-2.1.1)
git-svn-id: trunk@5203 -
2006-11-03 13:42:51 +00:00
micha
ad7d549965 + implement pascal inline asm start/halt code for linux/i386
git-svn-id: trunk@5181 -
2006-11-02 16:58:41 +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
daniel
bbc80554b1 * Turn cmdline into property on Linux.
* Move some procedure in Linux system unit.

git-svn-id: trunk@4964 -
2006-10-18 20:07:10 +00:00
florian
d7fe89c63d * Real is now defined in the system unit being an unique type, fixes #7425
git-svn-id: trunk@4628 -
2006-09-17 08:58:20 +00:00
florian
73083de898 * IsLibrary initialized by declaration
* IsLibrary for linux is set in dllprt0.as

git-svn-id: trunk@4547 -
2006-09-03 20:41:51 +00:00
yury
7ccca2e438 * Optimization for smartlinking. Removed command line parsing in system unit initialization for wince. The parser is called when command line is accessed first time in program. It saves 1.55KB exe size, when command line is not used.
git-svn-id: trunk@4275 -
2006-07-22 09:29:54 +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
peter
4c065bce45 * move InterLocked functions to system unit
git-svn-id: trunk@3933 -
2006-06-25 09:26:23 +00:00
florian
eab1f74b54 * exported SwapEndian
git-svn-id: trunk@3766 -
2006-06-02 12:03:42 +00:00
michael
5ef20e6215 + Added delphi compatibility Error procedure
git-svn-id: trunk@3610 -
2006-05-21 09:57:47 +00:00
florian
069ac7d163 * endian conversion functions
git-svn-id: trunk@3543 -
2006-05-15 19:42:13 +00:00
daniel
fea15be56f * Prepare for internal stack frame functions.
git-svn-id: trunk@3511 -
2006-05-13 20:57:37 +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
florian
acc016c9ec * finished safecall support
git-svn-id: trunk@3417 -
2006-05-04 20:40:31 +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
9566255122 * allow out file parameters
* assign has out file

git-svn-id: trunk@2717 -
2006-03-01 10:18:47 +00:00
peter
4c56a87d59 * integrate loaders in system unit
git-svn-id: trunk@2695 -
2006-02-26 18:21:35 +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
Jonas Maebe
2dea0c793f * made the target parameter of SetString an "out" instead of "var" parameter
git-svn-id: trunk@1896 -
2005-12-07 16:06:34 +00:00
daniel
63ea645207 var & const were sometimes lowercased, sometimes uppercased. Put them
in lowercase.

git-svn-id: trunk@1846 -
2005-11-29 23:28:32 +00:00
tom_at_work
67e5a7621a * fixes for successful cycle on 64 bit systems after 64 bit FS changes
git-svn-id: trunk@1794 -
2005-11-20 18:14:23 +00:00
florian
4a6939e354 * made generic basic file handling 64 bit
git-svn-id: trunk@1792 -
2005-11-20 12:23:54 +00:00
tom_at_work
367df58016 * stack related things (sizes, calculations, etc.) are now 64 bit on 64 bit platforms
* default stack size is now also 32k for Windows (allows the use of stack checking when using threads)

git-svn-id: trunk@1718 -
2005-11-10 17:06:25 +00:00
tom_at_work
4176b71277 * fixed variants unit to make it compile for 64 bit targets
git-svn-id: trunk@1451 -
2005-10-17 21:23:48 +00:00
michael
c15d1b280f + Initial implementation of RTL resource support
git-svn-id: trunk@991 -
2005-08-31 15:54:30 +00:00
marco
fa19bc05c8 * pos(shortstring,ansistring) for bug #4119
git-svn-id: trunk@828 -
2005-08-09 07:34:56 +00:00
Jonas Maebe
8cbdbc4951 - disabled SYSTEMINLINE until conflict with compilerprocs is fixed
git-svn-id: trunk@647 -
2005-07-18 12:58:51 +00:00
florian
30769ea013 * made variant operators inlined
* fixed some inline directives
+ variant<->olevariant cast operators

git-svn-id: trunk@632 -
2005-07-15 21:12:21 +00:00
peter
f8e713c9cb * check for FPC < 2.0.0
git-svn-id: trunk@395 -
2005-06-13 07:27:07 +00:00
michael
684b7fa85f + Removed HAS_INTERNAL_INTTYPES define
git-svn-id: trunk@303 -
2005-06-09 17:50:58 +00:00
michael
859bb30daa + Removed HASTHREADVAR SUPPORT_THREADVAR defines
git-svn-id: trunk@295 -
2005-06-09 17:40:29 +00:00
michael
a775d3d487 + Removed HASCURRENCY VALUEGETMEM VALUEFREEMEM defines
git-svn-id: trunk@293 -
2005-06-09 17:33:22 +00:00
florian
ad3b9b9464 * windows rtl restructuring to share code between win32 and win64
* BeginThread can take a qword on 64 bit targets as stacksize

git-svn-id: trunk@287 -
2005-06-08 19:08:49 +00:00
michael
3a2eaa94b1 + Removed INTERNCONSTINTF define
git-svn-id: trunk@267 -
2005-06-07 22:04:18 +00:00
michael
db5d9d75aa + Removed INTERNCOPY define
git-svn-id: trunk@259 -
2005-06-07 21:11:49 +00:00
michael
a20556e62d + Removed INTERNLENGTH/INTERNSETLENGTH defines
git-svn-id: trunk@257 -
2005-06-07 21:07:21 +00:00
michael
b6d3df6cb8 + Removed FPC_HASNOFARPOINTER define
git-svn-id: trunk@253 -
2005-06-07 21:01:02 +00:00
michael
21425e303c + Removed HASVARIANT define
git-svn-id: trunk@244 -
2005-06-07 20:48:31 +00:00
michael
8a226bba52 + Removed HASWIDESTRING/HASWIDECHAR defines
git-svn-id: trunk@241 -
2005-06-07 20:42:22 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
Jonas Maebe
7ba46ce6f0 * Darwin TThreadID is a pointer
* BeginThread now returns a TThreadID instead of dword

git-svn-id: trunk@189 -
2005-06-04 09:33:39 +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
florian
d18746bd15 * proper error message if the cthreads unit is included too late
uses clause
2005-04-03 19:29:28 +00:00
peter
7eeca4fdce * added HexStr(Pointer) 2005-02-25 12:34:46 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
f093fa9242 - killed power from system unit
* move operator ** to math unit
2005-02-08 20:25:28 +00:00
florian
6f47022b58 * InitProc gets an inital value 2005-02-06 20:37:31 +00:00
florian
aeac2a046d + InitProc 2005-02-06 20:35:54 +00:00
peter
2fbaae2b91 * threading in system unit
* removed systhrds unit
2005-02-06 11:20:52 +00:00
florian
b6ef0bf703 * fixed previous commit 2005-02-05 10:47:38 +00:00
florian
c73d4a0b96 * map farpointer to pointer on platforms not having farpointers 2005-02-05 10:07:21 +00:00
florian
4f7560d89e * improved widestring infrastructure manager 2005-02-01 20:22:49 +00:00
peter
8be342c36b * pinteger in non-delphi/objfpc mode is psmallint 2005-01-24 18:03:19 +00:00
Tomas Hajny
353d5cc3de + GetProcessID added 2004-12-05 14:36:37 +00:00
peter
645ed0feb1 * internconst for ptr() 2004-11-26 22:26:30 +00:00
michael
4c872834ab + Added phony documentation declarations 2004-11-22 22:48:10 +00:00
peter
14eb8f59b4 internconst, internproc and some external declarations moved to interface 2004-11-17 22:19:04 +00:00
peter
95e0ed26f8 * use helper call to retrieve address of input/output to reduce
code that is generated in the main program for loading the
    threadvar
2004-11-09 23:10:22 +00:00
peter
dbc2025604 ErrOutput added 2004-11-04 09:32:31 +00:00
marco
58a29c168d * arraytostring added 2004-10-30 20:49:10 +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
Tomas Hajny
ef512a0bfe * compilation fix 2004-09-22 05:56:11 +00:00
Tomas Hajny
88e2f51c72 * SetTextLineEnding implemented, FileRec.Name position alignment for CPU64 2004-09-21 23:43:26 +00:00
peter
97260ca1bf * AnsiChar is equivalent of Char, use only type renamings 2004-09-21 15:04:22 +00:00
peter
76c6e4dd83 no message 2004-08-29 10:23:12 +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
daniel
9fb7be7e77 * Add inline directive to sysresetfpu 2004-07-07 15:15:40 +00:00
daniel
a1229ff8fe * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
longer necessary
2004-07-03 21:50:30 +00:00
florian
fe8e9245f4 * fixed wrong commit 2004-06-11 19:21:53 +00:00
florian
0d7ee6197b * fixed arm system unit compilation 2004-06-11 13:45:33 +00:00
peter
c99d93c90b * sparc need software shl shr 2004-05-30 16:51:38 +00:00
florian
91733f9237 * some m68k and amiga related stuff fixed 2004-05-05 21:26:34 +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
peter
cafed35e77 * str() helpers now also use valint/valuint
* int64/qword helpers disabled for cpu64
2004-04-29 18:59:43 +00:00
peter
0fbb1fe9e8 * random(int64) added 2004-04-22 17:10:38 +00:00
peter
1a0a8db391 * new compiler has smallint,longint,word internal defined 2004-03-23 22:35:45 +00:00
florian
ff42d8657a + x86_64 dependend sysutils part added
* some 64 bit adaptions
2004-02-20 22:15:16 +00:00
daniel
173d1a2554 * Applied 2004-02-20 11:01:20 +00:00
florian
6cd2cddd33 + added prefetch(const mem) 2004-02-02 20:39:27 +00:00
florian
7b5dc40284 * compilation on arm fixed 2004-01-26 11:48:24 +00:00
Tomas Hajny
e0f9297e01 * ExecuteProcess fixes, ProcessID and ThreadID added 2004-01-20 23:05:31 +00:00
florian
021652683a + introduced PtrInt and PtrUInt
* made strscan 64 bit safe
2003-12-29 19:24:12 +00:00
michael
2f103d8153 + Added overloaded version of SetWideStringManager without old parameter 2003-11-29 17:27:05 +00:00
michael
51c296f60c + Added WideStringManager 2003-11-28 20:36:13 +00:00
florian
4ff69f3905 * fixed rtl to work with the integrated fpc ppc assembler reader 2003-11-15 19:01:27 +00:00