2
0
Эх сурвалжийг харах

Merged revisions 11337-11338,11341-11345,11348,11350-11361,11363-11368,11370,11376-11392,11397-11400,11402-11410,11415-11419,11421,11423-11426,11429-11464,11466-11468,11471-11486,11489,11491-11517,11522,11524-11527,11529-11534,11536-11550,11552,11554,11556,11558-11561,11563,11565-11570,11572-11587,11589-11618,11620,11623-11627,11629-11663,11668-11669,11671-11682,11684,11686-11688,11693,11697,11699-11700,11703-11704,11708-11711,11719-11722,11727,11730-11732,11738-11777,11779,11782-11784,11786-11809,11811-11821,11823-11830,11832-11835,11837-11847,11849-11871,11873-11875,11879-11880,11884-11888,11890,11896-11898,11903-11919,11926-11930,11933-11934,11936-11937,11939-11940,11942-11985,11987-11991,11993-12013,12015-12017,12019-12040,12043,12045 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

................
r11337 | marco | 2008-07-06 12:50:22 +0200 (Sun, 06 Jul 2008) | 2 lines

* mode objfpc in gzio to avoid 16-bit blocksize gzio as per #11611.

................
r11338 | Almindor | 2008-07-06 15:30:28 +0200 (Sun, 06 Jul 2008) | 2 lines

* remove useless redefinitions

................
r11341 | florian | 2008-07-07 19:59:48 +0200 (Mon, 07 Jul 2008) | 1 line

* support deprecated for types
................
r11342 | florian | 2008-07-07 20:35:46 +0200 (Mon, 07 Jul 2008) | 1 line

- $Id tag removed
................
r11343 | florian | 2008-07-07 20:41:10 +0200 (Mon, 07 Jul 2008) | 2 lines

* empty tprocess command line results on windows now in the same exception as on unix
* some code unified
................
r11344 | florian | 2008-07-07 20:41:44 +0200 (Mon, 07 Jul 2008) | 1 line

* moved to proper location
................
r11345 | jonas | 2008-07-07 22:12:03 +0200 (Mon, 07 Jul 2008) | 5 lines

* enabled smart linking by default for Darwin (will break building
on Mac OS X 10.2.x, and also on 10.3.x if not at least Xcode 1.5 is
installed; compiled programs can however still work on such systems
without any problem)

................
r11348 | Almindor | 2008-07-07 23:21:44 +0200 (Mon, 07 Jul 2008) | 2 lines

* patch from Vincent to fix TReader.ReadCollection calling clear() logic

................
r11350 | marco | 2008-07-09 15:43:27 +0200 (Wed, 09 Jul 2008) | 2 lines

* pboolean is now deprecated because it conflicts with system.pboolean. Under ifndef 2_2. (#11380)
Merging not needed, except maybe for documentation purposes?
................
r11351 | michael | 2008-07-09 15:49:05 +0200 (Wed, 09 Jul 2008) | 1 line

* Fixed saving/restoring of precision in TDDFielddef
................
r11352 | michael | 2008-07-09 15:50:12 +0200 (Wed, 09 Jul 2008) | 1 line

* Code generator for populating a data dictionary in code
................
r11353 | florian | 2008-07-09 23:06:24 +0200 (Wed, 09 Jul 2008) | 1 line

* don't crash when ranges are passed erroneously to an array of const, resolves #11632
................
r11354 | michael | 2008-07-10 11:08:40 +0200 (Thu, 10 Jul 2008) | 1 line

* Improvements to tiopf code generator, and build project for use with lazarus
................
r11355 | michael | 2008-07-10 11:40:37 +0200 (Thu, 10 Jul 2008) | 1 line

* Corrected int64 type name
................
r11356 | michael | 2008-07-10 16:37:27 +0200 (Thu, 10 Jul 2008) | 1 line

* Fixes so it compiles in all cases
................
r11357 | florian | 2008-07-10 18:44:45 +0200 (Thu, 10 Jul 2008) | 1 line

* quicker finalization of dyn. arrays, thanks to the hint of Volker Zipfel
................
r11358 | florian | 2008-07-10 21:22:21 +0200 (Thu, 10 Jul 2008) | 1 line

* enabled ports unit for x86_64-linux
................
r11359 | florian | 2008-07-10 21:28:12 +0200 (Thu, 10 Jul 2008) | 1 line

* reverted previous commit because it turned out when testing on x86-64, that unit x86 requires a deep overhaul
................
r11360 | florian | 2008-07-10 21:52:14 +0200 (Thu, 10 Jul 2008) | 2 lines

* fixed x86 unit for x86-64
* enabled ports again for x86_64-linux
................
r11361 | Almindor | 2008-07-11 11:39:34 +0200 (Fri, 11 Jul 2008) | 2 lines

* fix oversight bug in SDL.pas, SDL_WM_SetIcon() accepts a PUint8 as second argument

................
r11363 | michael | 2008-07-11 14:41:40 +0200 (Fri, 11 Jul 2008) | 1 line

* Support for indexes and creating sql from them
................
r11364 | michael | 2008-07-11 14:45:52 +0200 (Fri, 11 Jul 2008) | 1 line

* Set unit output path that does not disturb make
................
r11365 | michael | 2008-07-11 14:53:32 +0200 (Fri, 11 Jul 2008) | 1 line

* Session info in lps file
................
r11366 | michael | 2008-07-11 16:16:39 +0200 (Fri, 11 Jul 2008) | 1 line

* SqlScript committed
................
r11367 | florian | 2008-07-11 21:03:16 +0200 (Fri, 11 Jul 2008) | 1 line

* typos fixed
................
r11368 | michael | 2008-07-12 14:25:24 +0200 (Sat, 12 Jul 2008) | 1 line

* patch from Graeme Geldenhuys so it compiles again
................
r11370 | michael | 2008-07-12 14:35:35 +0200 (Sat, 12 Jul 2008) | 1 line

* Emit help text if options not correct
................
r11376 | florian | 2008-07-13 11:10:50 +0200 (Sun, 13 Jul 2008) | 1 line

* support ABSOLUTE32 in the COFF writer on x86-64, resolves #10641
................
r11377 | florian | 2008-07-13 12:26:25 +0200 (Sun, 13 Jul 2008) | 1 line

+ create jump tables for case statements on x86-64
................
r11378 | florian | 2008-07-13 20:13:46 +0200 (Sun, 13 Jul 2008) | 1 line

+ cpu32bitaddr,cpu32bitalu,cpu16bitaddr,cpu16bitalu
................
r11379 | florian | 2008-07-13 20:15:17 +0200 (Sun, 13 Jul 2008) | 1 line

* fixed copy&paste errors in cpunodefaultint
................
r11380 | florian | 2008-07-13 20:16:24 +0200 (Sun, 13 Jul 2008) | 2 lines

* some avr fixes
+ cpu16 type defines
................
r11381 | florian | 2008-07-13 20:16:53 +0200 (Sun, 13 Jul 2008) | 1 line

* fixed compilation
................
r11382 | joost | 2008-07-14 11:55:53 +0200 (Mon, 14 Jul 2008) | 2 lines

* Refactored indexes: TBufIndex is now a class instead of a record. All index-related code (such as for scrolling) should eventually be placed into this class. This is not done yet completely, but a start is made.
* From now on, FLastRecBuf.Next of the dl-list is linked to the first record. This way it is possible to move the cursur to the first record by setting the current record to the last record in the list. With this trick several corner-case checks which were necessary on every scroll-action on the dataset have become obsolete and are removed.
................
r11383 | jonas | 2008-07-15 14:08:54 +0200 (Tue, 15 Jul 2008) | 2 lines

* use $(TARPROG) rather than hardcoded tar (mantis #11658)

................
r11384 | joost | 2008-07-15 15:12:42 +0200 (Tue, 15 Jul 2008) | 1 line

* Add path-delimiters properly in GetAppConfigDir and GetAppConfigFile
................
r11385 | micha | 2008-07-15 22:24:07 +0200 (Tue, 15 Jul 2008) | 2 lines

* fix testsuite hostname to not use -s option; solaris hostname interprets this as new hostname
(in case of fqdn, cut off hostname ourself in Makefile)
................
r11386 | joost | 2008-07-15 23:37:10 +0200 (Tue, 15 Jul 2008) | 1 line

* Moved more index-related code into the TBufIndex class
................
r11387 | michael | 2008-07-16 19:32:26 +0200 (Wed, 16 Jul 2008) | 1 line

* ReadListClass SQL statement needs correct where, O not assigned in MapObjectToRow
................
r11388 | michael | 2008-07-17 16:40:33 +0200 (Thu, 17 Jul 2008) | 6 lines

* Patch from Graeme Geldenhuys:
* Minor classname adjustment
* Query.SQL.Text ---> Query.SQLText otherwise the setter method is bypassed,
which could contain custom code.
* uses clause cleanup

................
r11389 | michael | 2008-07-17 16:55:07 +0200 (Thu, 17 Jul 2008) | 1 line

* Patch from Sergei Gorelkin: * Makes TDOMParser.ParseURI throw EXMLReadError when URI is not resolvable (consistent with the Parse method).
................
r11390 | michael | 2008-07-17 16:57:31 +0200 (Thu, 17 Jul 2008) | 11 lines

* Initial testsuite from Sergei Gorelkin
* testgen.pp - an utility to convert w3.org tests from XML format
into fpcunit-compatible Pascal source. The official testsuite uses
xslt for conversion, but, since there is no xslt for Pascal, and no
xslt support in FCL yet, I wrote an utility.
* api.xml - API 'database', needed by testgen.
* domunit.pp - an fpcunit extension, provides DOM-specific runtime
support.
* README_DOM - provides some instructions about putting it all together.


................
r11391 | florian | 2008-07-17 21:49:03 +0200 (Thu, 17 Jul 2008) | 1 line

* fixes loop unrolling
................
r11392 | florian | 2008-07-17 21:49:38 +0200 (Thu, 17 Jul 2008) | 1 line

* allow goto inside finally blocks
................
r11397 | florian | 2008-07-18 15:24:50 +0200 (Fri, 18 Jul 2008) | 1 line

+ rescued old QNX RTL code
................
r11398 | tom_at_work | 2008-07-18 17:30:20 +0200 (Fri, 18 Jul 2008) | 1 line

* allow explicit conversion of enumeration values (in addition to integers) to object references in Delphi mode
................
r11399 | tom_at_work | 2008-07-18 17:33:48 +0200 (Fri, 18 Jul 2008) | 1 line

* undo accidently committed changes from r11398
................
r11400 | tom_at_work | 2008-07-18 17:53:37 +0200 (Fri, 18 Jul 2008) | 1 line

* tests for checking type casts from integers/enums to TObjects in Delphi and non-Delphi mode (see r11598)
................
r11402 | marco | 2008-07-18 22:05:32 +0200 (Fri, 18 Jul 2008) | 2 lines

* deprecation of tsearchrec.pathonly, under ifndef ver2_2 as per 11579

................
r11403 | peter | 2008-07-18 23:28:51 +0200 (Fri, 18 Jul 2008) | 2 lines

* remove svn:executable property

................
r11404 | peter | 2008-07-19 01:30:44 +0200 (Sat, 19 Jul 2008) | 9 lines

* store specializations in globalsymtable for units, use localsymtable
for programs. this allows speciailizations to be done in the interface
part of the unit
* support tobject.typemember.typemember nesting for generics
* fix generic parameter checking when a typemember was created with the
type of a parameter
* known issue is nested specializations don't work yet because the token
replay can't handled nested replays yet

................
r11405 | peter | 2008-07-19 01:31:02 +0200 (Sat, 19 Jul 2008) | 2 lines

* more generic tests

................
r11406 | peter | 2008-07-19 02:02:36 +0200 (Sat, 19 Jul 2008) | 2 lines

* handle (build)derefimpl also for objectdef so it also works for methods

................
r11407 | marco | 2008-07-19 12:58:53 +0200 (Sat, 19 Jul 2008) | 2 lines

* iconvenc packages, first version. Tested on Linux/x86 and FreeBSD/x86

................
r11408 | marco | 2008-07-19 14:30:59 +0200 (Sat, 19 Jul 2008) | 2 lines

* iconvenc enabled for FreeBSD,Linux and Darwin (tested only ppc of the latter)

................
r11409 | florian | 2008-07-19 19:01:47 +0200 (Sat, 19 Jul 2008) | 2 lines

* removed comments to defines not used anymore

................
r11410 | florian | 2008-07-19 19:06:16 +0200 (Sat, 19 Jul 2008) | 2 lines

* germanism fixed (aktexceptblock -> current_exceptblock)

................
r11415 | jonas | 2008-07-20 11:07:50 +0200 (Sun, 20 Jul 2008) | 3 lines

* use math.SetExceptionMask() to disable floating point exceptions
in the macpas initialisation code (mantis #11516)

................
r11416 | marco | 2008-07-20 14:10:31 +0200 (Sun, 20 Jul 2008) | 2 lines

* Removed the bootstrapping related charset.pas, and merged one minor fix from it to the rtl one.

................
r11417 | marco | 2008-07-20 14:11:26 +0200 (Sun, 20 Jul 2008) | 3 lines

* Makefile didn't work anymore after Jonas' changes. Added some missing dependancies that were previously not
specified due to fact that they can change with FPC_USE_LIBC

................
r11418 | marco | 2008-07-20 14:28:48 +0200 (Sun, 20 Jul 2008) | 2 lines

* reserved field now also initialized, from #8896's patch.

................
r11419 | jonas | 2008-07-20 15:05:03 +0200 (Sun, 20 Jul 2008) | 5 lines

- removed $(SYSTEMUNIT)$(PPUEXT) from the macpas unit dependencies
(that variable is not defined for all targets and is not necessary
anymore either)
* fixed building of win32/win64 (different because of the buildrtl unit)

................
r11421 | yury | 2008-07-20 22:28:37 +0200 (Sun, 20 Jul 2008) | 1 line

* For some unknown reason WM 6.1 requires .idata section to be read only. Otherwise it refuses to load DLLs greater than 64KB. Earlier versions of WinCE load DLLs regardless of .idata flags.
................
r11423 | giulio | 2008-07-20 23:37:48 +0200 (Sun, 20 Jul 2008) | 2 lines

IDE: Cleaned ifdefs related to Turbo Pascal and FPC 1.x

................
r11424 | yury | 2008-07-20 23:38:57 +0200 (Sun, 20 Jul 2008) | 1 line

* Compile fpintres just after system unit.
................
r11425 | yury | 2008-07-20 23:45:00 +0200 (Sun, 20 Jul 2008) | 1 line

* wince readme.txt is outdated. Leave link to wiki page only.
................
r11426 | yury | 2008-07-21 00:22:57 +0200 (Mon, 21 Jul 2008) | 1 line

* Use system_wince instead of [system_arm_wince,system_i386_wince].
................
r11429 | yury | 2008-07-21 00:39:19 +0200 (Mon, 21 Jul 2008) | 1 line

* Use system_wince in all places.
................
r11430 | yury | 2008-07-21 01:00:31 +0200 (Mon, 21 Jul 2008) | 1 line

* Removed/ifdefed/commented unused local variables.
................
r11431 | florian | 2008-07-21 21:01:46 +0200 (Mon, 21 Jul 2008) | 2 lines

* fixes reading/writing of extended properties on arm-linux, by Koenraad Lelong

................
r11432 | jonas | 2008-07-21 21:37:24 +0200 (Mon, 21 Jul 2008) | 2 lines

+ fpchown() for FPC_USE_LIBC (by Tobias Giesen, mantis #11705)

................
r11433 | yury | 2008-07-22 13:53:55 +0200 (Tue, 22 Jul 2008) | 2 lines

* Set PE_FILE_LARGE_ADDRESS_AWARE flag for win64 executables to allow access more than 2GB of memory.
* Fixed $setpeflags directive. Flags should be set in main PE header. LoaderFlags in optional header are obsolete.
................
r11434 | marco | 2008-07-22 15:55:58 +0200 (Tue, 22 Jul 2008) | 2 lines

* 160 clsids, with a fix for Felipe's IShelllink problem.

................
r11435 | marco | 2008-07-22 18:55:53 +0200 (Tue, 22 Jul 2008) | 3 lines

* (bug 6173) invalid drive when browsing over directories that start with a dot in Linux with the IDE's opendialog.
Reaason: Findfirst considers starting with a . "hidden".

................
r11436 | Almindor | 2008-07-23 10:43:54 +0200 (Wed, 23 Jul 2008) | 2 lines

* add initial gtk2ext unit for optional gtk2.8+ stuff

................
r11437 | yury | 2008-07-23 10:59:25 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed memory leak.
................
r11438 | yury | 2008-07-23 11:22:47 +0200 (Wed, 23 Jul 2008) | 1 line

* Removed/ifdefed/commented unused local variables.
................
r11439 | yury | 2008-07-23 11:36:07 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed 'mixed signed/unsigned' and pointer conversion warnings.
................
r11440 | yury | 2008-07-23 11:55:44 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed unreachable code warnings.
................
r11441 | yury | 2008-07-23 12:08:48 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed level 2 comment warnings.
................
r11442 | yury | 2008-07-23 12:48:53 +0200 (Wed, 23 Jul 2008) | 3 lines

* Removed/commented more unused variables.
* Fixed some uninitialized variable warnings.

................
r11443 | yury | 2008-07-23 13:00:03 +0200 (Wed, 23 Jul 2008) | 1 line

* Replaced all user defined warnings by TODO comments to reduce compiler noise.
................
r11444 | yury | 2008-07-23 13:17:27 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed 'mixed signed/unsigned' and pointer conversion warnings.
................
r11445 | yury | 2008-07-23 13:31:07 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed unreachable code warnings.
................
r11446 | yury | 2008-07-23 13:38:29 +0200 (Wed, 23 Jul 2008) | 1 line

* Don't use dispose for memory allocated with getmem.
................
r11447 | yury | 2008-07-23 13:44:24 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed warnings about uninitialized record fields.
................
r11448 | yury | 2008-07-23 13:47:03 +0200 (Wed, 23 Jul 2008) | 1 line

* Added function result for unimplemented methods to prevent warnings.
................
r11449 | yury | 2008-07-23 13:51:19 +0200 (Wed, 23 Jul 2008) | 1 line

* Fixed warnings about hiding inherited method.
................
r11450 | yury | 2008-07-23 14:24:25 +0200 (Wed, 23 Jul 2008) | 1 line

* Improved warning about constructing class instance with abstract methods. Warning is issued for each method and method name is specified in the message. It makes easy to find out which abstract methods still not overrode.
................
r11451 | yury | 2008-07-23 14:31:38 +0200 (Wed, 23 Jul 2008) | 1 line

* Removed unused abstract method tcg.getflagregister
................
r11452 | yury | 2008-07-23 14:33:18 +0200 (Wed, 23 Jul 2008) | 1 line

* Create instance of tdosinputfile instead of tinputfile to prevent warning about abstract methods.
................
r11453 | yury | 2008-07-23 14:49:53 +0200 (Wed, 23 Jul 2008) | 1 line

* Removed abstract modifier for some optional (not needed for every CPU target) methods in tcg and tparamanager classes. These methods throw internal error if not overrode.
................
r11454 | yury | 2008-07-23 14:55:31 +0200 (Wed, 23 Jul 2008) | 2 lines

* Suppressed "Values in enumeration types have to be ascending" note.

................
r11455 | yury | 2008-07-23 15:16:46 +0200 (Wed, 23 Jul 2008) | 3 lines

* Fixed 'mixed signed/unsigned' warnings.
* Suppressed 2 unreachable code warnings.
* Now x86 compiler compiles without warnings and notes! It will be great to keep such state in future...
................
r11456 | yury | 2008-07-23 15:22:36 +0200 (Wed, 23 Jul 2008) | 3 lines

* Define dummy tcgarm.g_stackpointer_alloc to fix abstract warning.
* Suppressed unreachable code warnings.
* Now ARM compiler compiles without warnings and notes.
................
r11457 | yury | 2008-07-23 19:26:36 +0200 (Wed, 23 Jul 2008) | 1 line

* Bring back tcg.getflagregister on Florian's request, but made it non-abstract. It may be used for IA64 support in future (if IA64 will live so long :).
................
r11458 | marco | 2008-07-24 16:43:20 +0200 (Thu, 24 Jul 2008) | 1 line

* removed beautifying (camelcasing) of main module filename on *nix. Fixed #5614
................
r11459 | florian | 2008-07-25 09:53:36 +0200 (Fri, 25 Jul 2008) | 1 line

* updated to libtar 2.0.8, resolves #11744
................
r11460 | marco | 2008-07-25 11:20:12 +0200 (Fri, 25 Jul 2008) | 2 lines

* or iconvlibfound according to initiconv lib result

................
r11461 | Almindor | 2008-07-26 12:31:23 +0200 (Sat, 26 Jul 2008) | 2 lines

* inline the ** operators since they just call functions directly

................
r11462 | marco | 2008-07-26 12:48:36 +0200 (Sat, 26 Jul 2008) | 4 lines

* disable iochecking when opening terminal (to avoid RTE of #11376).
This is damage control. The prime problem (text after pid) as described in
that bugrepo still has to be fixed.

................
r11463 | jonas | 2008-07-27 11:17:54 +0200 (Sun, 27 Jul 2008) | 2 lines

+ added test

................
r11464 | florian | 2008-07-27 11:21:03 +0200 (Sun, 27 Jul 2008) | 1 line

+ lazarus project to build win32 rtl
................
r11466 | florian | 2008-07-27 19:12:32 +0200 (Sun, 27 Jul 2008) | 2 lines

+ ror/rol functions
+ internal compiler support for ror/rol on i386
................
r11467 | jonas | 2008-07-27 21:15:56 +0200 (Sun, 27 Jul 2008) | 2 lines

+ test to make sure that {$x-} works properly for inlined functions

................
r11468 | florian | 2008-07-28 11:50:09 +0200 (Mon, 28 Jul 2008) | 2 lines

* teach peephole optimizer about ror/rol
* md5 unit uses system.rol
................
r11471 | florian | 2008-07-28 14:47:24 +0200 (Mon, 28 Jul 2008) | 2 lines

+ benchmark to test md5 improvement by internal rol

................
r11472 | florian | 2008-07-28 15:03:18 +0200 (Mon, 28 Jul 2008) | 1 line

* reorganized ror/rol defines
................
r11473 | florian | 2008-07-28 17:48:38 +0200 (Mon, 28 Jul 2008) | 2 lines

+ support of inlined ror/rol on arm

................
r11474 | florian | 2008-07-28 17:51:58 +0200 (Mon, 28 Jul 2008) | 1 line

* avoid shifter constant overflow on arm when optimizing two shifter operations into one
................
r11475 | florian | 2008-07-28 17:56:23 +0200 (Mon, 28 Jul 2008) | 2 lines

* properties properly set

................
r11476 | florian | 2008-07-28 18:18:42 +0200 (Mon, 28 Jul 2008) | 2 lines

* fixed timer unit name

................
r11477 | florian | 2008-07-28 20:09:34 +0200 (Mon, 28 Jul 2008) | 2 lines

* jump table is written to the data segment so create a proper label for it, resolves #11735

................
r11478 | florian | 2008-07-28 20:42:30 +0200 (Mon, 28 Jul 2008) | 2 lines

* possible fix for 11062

................
r11479 | jonas | 2008-07-28 22:15:03 +0200 (Mon, 28 Jul 2008) | 2 lines

* version which also fails in 2.3.1

................
r11480 | yury | 2008-07-28 22:29:25 +0200 (Mon, 28 Jul 2008) | 2 lines

* Use unsigned integers for sizes and positions to break 2GB limit in tdynamicarray, object writer, internal linker, coff and PE headers.

................
r11481 | yury | 2008-07-28 23:54:18 +0200 (Mon, 28 Jul 2008) | 1 line

* Added error message if resulting executable image size is too big to fit in memory. bug #11702.
................
r11482 | yury | 2008-07-29 00:06:15 +0200 (Tue, 29 Jul 2008) | 1 line

* Fixed executable size limit for wince.
................
r11483 | yury | 2008-07-29 00:30:46 +0200 (Tue, 29 Jul 2008) | 1 line

* Fixed overflow check for RELOC_RELATIVE_24.
................
r11484 | yury | 2008-07-29 10:44:05 +0200 (Tue, 29 Jul 2008) | 2 lines

* More correct fix for overflow check for RELOC_RELATIVE_24.
* Fixed 2007062701 while linking DLL.
................
r11485 | Almindor | 2008-07-29 11:27:15 +0200 (Tue, 29 Jul 2008) | 2 lines

* re-generate makefile with trunk fpcmake

................
r11486 | yury | 2008-07-29 11:59:00 +0200 (Tue, 29 Jul 2008) | 1 line

* Commented out unused var.
................
r11489 | yury | 2008-07-29 23:11:03 +0200 (Tue, 29 Jul 2008) | 1 line

* Fixed compiler cycling with enabled range and overflow checking.
................
r11491 | joost | 2008-07-30 23:37:49 +0200 (Wed, 30 Jul 2008) | 1 line

* Created two sub-classes of TBufIndex: TDoubleLinkedBufIndex and TArrayBufIndex, so that it is now possible to decide at run-time which kind of buffer should be used.
................
r11492 | joost | 2008-07-31 00:03:37 +0200 (Thu, 31 Jul 2008) | 1 line

* Cleaned up old Arraybuf defines and code
................
r11493 | florian | 2008-07-31 10:16:52 +0200 (Thu, 31 Jul 2008) | 2 lines

* more fixes for 11062

................
r11494 | michael | 2008-07-31 13:35:38 +0200 (Thu, 31 Jul 2008) | 1 line

* Added classname to assignparamtostream
................
r11495 | michael | 2008-07-31 13:37:14 +0200 (Thu, 31 Jul 2008) | 1 line

* Use AssignFieldAsStream for stream properties
................
r11496 | michael | 2008-07-31 14:56:09 +0200 (Thu, 31 Jul 2008) | 1 line

* Tablename property
................
r11497 | florian | 2008-08-01 17:27:58 +0200 (Fri, 01 Aug 2008) | 1 line

* proper support for tobject.getinterface with raw/corba interfaces, resolves #6798 and #6036
................
r11498 | florian | 2008-08-01 20:03:41 +0200 (Fri, 01 Aug 2008) | 1 line

* passing by value of variants with stdcall conventions, resolves #10042
................
r11499 | Almindor | 2008-08-01 20:27:03 +0200 (Fri, 01 Aug 2008) | 1 line

* don't load GL_ARB_IMAGING extension functions in Load_GL_Version_1_2() They don't exist on most cards
................
r11500 | micha | 2008-08-01 20:43:55 +0200 (Fri, 01 Aug 2008) | 1 line

* add test case for #11777
................
r11501 | marco | 2008-08-02 13:45:16 +0200 (Sat, 02 Aug 2008) | 2 lines

* Fix for cursor showing after coming back from dosshell (#11679). Does not fix the IDE because it has its own shelling routines.

................
r11502 | jonas | 2008-08-02 14:23:34 +0200 (Sat, 02 Aug 2008) | 3 lines

* disabled jump tables for darwin/x86_64 for now since they don't work
there yet

................
r11503 | florian | 2008-08-03 11:29:22 +0200 (Sun, 03 Aug 2008) | 1 line

- unnecessary type declaration removed
................
r11504 | florian | 2008-08-03 11:31:50 +0200 (Sun, 03 Aug 2008) | 3 lines

+ defined FPC_FULLVERSION as integer constant containing the version,
release and patch level are always two digits so the version can
be compared numerically: so 2.2.2 results in 20202, resolves #11568
................
r11505 | florian | 2008-08-03 12:34:41 +0200 (Sun, 03 Aug 2008) | 1 line

* fixes compiler crash with out of memory on illegal array declarations
................
r11506 | Almindor | 2008-08-03 16:48:09 +0200 (Sun, 03 Aug 2008) | 3 lines

* add GtkScaleButton and GtkVolumeButton
* add missing gtk2.8+ functions for GtkTextMark and GtkTextIter

................
r11507 | marco | 2008-08-03 21:06:20 +0200 (Sun, 03 Aug 2008) | 1 line

* handle wildcard parameters to the ide. (#6597)
................
r11508 | yury | 2008-08-03 23:19:33 +0200 (Sun, 03 Aug 2008) | 1 line

* Fixed hang while linking in some cases.
................
r11509 | marco | 2008-08-04 16:54:32 +0200 (Mon, 04 Aug 2008) | 2 lines

* copyright notice added.

................
r11510 | joost | 2008-08-04 20:34:46 +0200 (Mon, 04 Aug 2008) | 1 line

* Fixed GetFieldData for old field-values, now the OldValuesBuffer only contains the field-values
................
r11511 | michael | 2008-08-05 13:58:00 +0200 (Tue, 05 Aug 2008) | 1 line

* Fixed prepare for select statements
................
r11512 | joost | 2008-08-05 20:09:12 +0200 (Tue, 05 Aug 2008) | 1 line

* Implemented TBufDataset.SaveToFile and LoadFromFile + basic test
................
r11513 | joost | 2008-08-05 21:00:45 +0200 (Tue, 05 Aug 2008) | 1 line

* Do not scroll the dataset while saving it to file
................
r11514 | joost | 2008-08-05 23:09:46 +0200 (Tue, 05 Aug 2008) | 1 line

* Implemented TDataset.AppendRecord and InsertRecord + test (bug 11450)
................
r11515 | michael | 2008-08-06 10:29:29 +0200 (Wed, 06 Aug 2008) | 1 line

* Fixed memory leak when destroying TBUFdataset, indexdefs were not freed
................
r11516 | joost | 2008-08-06 11:14:48 +0200 (Wed, 06 Aug 2008) | 1 line

* Forgot to commit db.pas in r11514
................
r11517 | marco | 2008-08-06 14:52:43 +0200 (Wed, 06 Aug 2008) | 2 lines

* sigprocmask 2nd arg needs to be by ref. VAR added.

................
r11522 | michael | 2008-08-07 09:10:34 +0200 (Thu, 07 Aug 2008) | 1 line

Patch from Paul Ishenin to fix windowing constants
................
r11524 | ivost | 2008-08-07 10:37:14 +0200 (Thu, 07 Aug 2008) | 2 lines

* updated file properties

................
r11525 | ivost | 2008-08-07 10:37:43 +0200 (Thu, 07 Aug 2008) | 2 lines

* added libxml2 package

................
r11526 | ivost | 2008-08-07 10:39:33 +0200 (Thu, 07 Aug 2008) | 2 lines

* updated Makefile.fpc and Makefile to include libxml2

................
r11527 | Almindor | 2008-08-07 11:33:02 +0200 (Thu, 07 Aug 2008) | 2 lines

* use Available_ComponentName_2_x so specific version parts can be checked

................
r11529 | Almindor | 2008-08-07 12:22:30 +0200 (Thu, 07 Aug 2008) | 2 lines

* fix GetAppConfigDir and GetTmpDir for Windows(R)(c)(TM) and WinCE, unify with unix and provide pathdelim at end

................
r11530 | ivost | 2008-08-07 13:43:38 +0200 (Thu, 07 Aug 2008) | 3 lines

* renamed .h to .inc
* prepeared for dynamic linking support

................
r11531 | ivost | 2008-08-07 13:58:03 +0200 (Thu, 07 Aug 2008) | 2 lines

* more generalized cc and export macros

................
r11532 | ivost | 2008-08-07 14:01:22 +0200 (Thu, 07 Aug 2008) | 2 lines

* automatic dynamic / static linking detection

................
r11533 | ivost | 2008-08-07 14:11:32 +0200 (Thu, 07 Aug 2008) | 2 lines

* included libxml2 examples into build tree

................
r11534 | michael | 2008-08-07 14:39:52 +0200 (Thu, 07 Aug 2008) | 1 line

* Additional options implemented
................
r11536 | ivost | 2008-08-07 18:38:24 +0200 (Thu, 07 Aug 2008) | 2 lines

* removed deprecated include file

................
r11537 | joost | 2008-08-07 23:37:52 +0200 (Thu, 07 Aug 2008) | 3 lines

* Implemented FileName property. If set, the dataset is read from file on opening and saved to file on closing
* Defaultfields is now set before a dataset is read from file, so that CreateFields is only called when necessary
* A TSQLQuery can be read and saved to file also
................
r11538 | ivost | 2008-08-08 00:26:52 +0200 (Fri, 08 Aug 2008) | 2 lines

* new translated include files

................
r11539 | joost | 2008-08-09 12:37:03 +0200 (Sat, 09 Aug 2008) | 2 lines

* Implemented TBufDataset.CreateDataset
* TBufDataset can now be used as a memory-dataset like TMemDataset
................
r11540 | joost | 2008-08-10 15:39:59 +0200 (Sun, 10 Aug 2008) | 2 lines

* Splitted GetRecordUpdateBuffer in two parts: GetRecordUpdateBuffer and GetActiveREcordUpdateBuffer
* Save update-buffer on SafeToFile (xml)
................
r11541 | joost | 2008-08-10 20:57:33 +0200 (Sun, 10 Aug 2008) | 1 line

* Store the change_log in the xml file
................
r11542 | michael | 2008-08-11 12:03:48 +0200 (Mon, 11 Aug 2008) | 1 line

* Required fielddef property is now set correctly
................
r11543 | michael | 2008-08-11 12:04:30 +0200 (Mon, 11 Aug 2008) | 1 line

* More complete indexdef treatment
................
r11544 | michael | 2008-08-11 12:17:00 +0200 (Mon, 11 Aug 2008) | 1 line

* Data dictionary diff mechanism
................
r11545 | michael | 2008-08-11 12:18:48 +0200 (Mon, 11 Aug 2008) | 1 line

* test for Data dictionary diff mechanism
................
r11546 | florian | 2008-08-11 20:47:43 +0200 (Mon, 11 Aug 2008) | 2 lines

* write expressions when getting an invalid operand error in preprocessor

................
r11547 | florian | 2008-08-11 21:01:07 +0200 (Mon, 11 Aug 2008) | 1 line

* handle exit(<expr>) correctly in the dfa, resolves #11848
................
r11548 | florian | 2008-08-11 22:53:44 +0200 (Mon, 11 Aug 2008) | 2 lines

* handle more nodes when creating life info

................
r11549 | jonas | 2008-08-11 23:29:49 +0200 (Mon, 11 Aug 2008) | 2 lines

+ darwin implementation of ipc unit by Werner Bochtler (mantis #10612)

................
r11550 | michael | 2008-08-12 09:16:18 +0200 (Tue, 12 Aug 2008) | 5 lines

* Patch from Paul Ishenin <[email protected]>
- adds missing gtk+2.2 symbols
- moves existing gtk+2.2 declarations into {$IFDEF HasGTK2_2} blocks


................
r11552 | michael | 2008-08-12 13:35:54 +0200 (Tue, 12 Aug 2008) | 1 line

* Fixed memory corruption in SQL parameters
................
r11554 | michael | 2008-08-12 15:03:21 +0200 (Tue, 12 Aug 2008) | 5 lines

* Patch from Paul Ishenin:
- adds missing gdk 2.2 symbols
- added missing types: GdkDisplayManager, GdkDisplayPointerHooks


................
r11556 | michael | 2008-08-12 15:07:48 +0200 (Tue, 12 Aug 2008) | 1 line

* Patch from Martin Schreiber to fix grayscaled JPEG images
................
r11558 | florian | 2008-08-12 18:45:07 +0200 (Tue, 12 Aug 2008) | 2 lines

* fixed shared linker name for i386
* restored old shared linker search order as good as possible
................
r11559 | florian | 2008-08-12 22:58:55 +0200 (Tue, 12 Aug 2008) | 1 line

* fixed compilation of embedded system unit
................
r11560 | michael | 2008-08-13 17:17:35 +0200 (Wed, 13 Aug 2008) | 4 lines

* Patch from Paul Ishenin
- adds missing gdk 2.4 symbols


................
r11561 | florian | 2008-08-13 17:17:52 +0200 (Wed, 13 Aug 2008) | 1 line

+ lazarus project for avr
................
r11563 | michael | 2008-08-13 17:24:28 +0200 (Wed, 13 Aug 2008) | 1 line

* Patch from Paul Ishenin: - added pango_renderer_xxx and pango_matrix_xxx symbols from pango 1.6 version
................
r11565 | ivost | 2008-08-13 21:38:58 +0200 (Wed, 13 Aug 2008) | 2 lines

* progress in libxml2 translation

................
r11566 | marco | 2008-08-13 22:09:57 +0200 (Wed, 13 Aug 2008) | 1 line

* skip e0 scancodes in certain cases. bug #8978
................
r11567 | michael | 2008-08-14 10:07:16 +0200 (Thu, 14 Aug 2008) | 1 line

* Changed AssertException so "no exception" is displayed if there was no exception
................
r11568 | ivost | 2008-08-14 11:49:08 +0200 (Thu, 14 Aug 2008) | 2 lines

* progress on libxml2 translation

................
r11569 | marco | 2008-08-14 12:24:06 +0200 (Thu, 14 Aug 2008) | 1 line

* fix for #11865 -Oppentium3
................
r11570 | Almindor | 2008-08-14 12:31:06 +0200 (Thu, 14 Aug 2008) | 2 lines

* apply patch from Paul Ishenin which adds missing gdk2.6 symbols

................
r11572 | ivost | 2008-08-14 12:59:12 +0200 (Thu, 14 Aug 2008) | 2 lines

* progress on libxml2 translation

................
r11573 | michael | 2008-08-14 15:19:24 +0200 (Thu, 14 Aug 2008) | 1 line

* Corrections for BCD support
................
r11574 | michael | 2008-08-14 15:20:56 +0200 (Thu, 14 Aug 2008) | 1 line

* Improved import of data dictionary for Interbase connections
................
r11575 | florian | 2008-08-14 16:23:25 +0200 (Thu, 14 Aug 2008) | 1 line

* continued work on avr-embedded
................
r11576 | michael | 2008-08-14 16:37:04 +0200 (Thu, 14 Aug 2008) | 1 line

* Correct location for IB import...
................
r11577 | yury | 2008-08-14 16:49:36 +0200 (Thu, 14 Aug 2008) | 1 line

* LPMSG is pointer to MSG. Spotted by Vasil Maximov.
................
r11578 | yury | 2008-08-14 16:51:21 +0200 (Thu, 14 Aug 2008) | 1 line

* Some fixes and additions by Vasil Maximov.
................
r11579 | yury | 2008-08-14 16:56:28 +0200 (Thu, 14 Aug 2008) | 1 line

* Inlining is not supported for formal parameters. Disable inlining to prevent warning.
................
r11580 | yury | 2008-08-14 17:03:27 +0200 (Thu, 14 Aug 2008) | 1 line

* buildrtl does not depend on macpas unit.
................
r11581 | yury | 2008-08-14 20:55:10 +0200 (Thu, 14 Aug 2008) | 2 lines

* Fixed passing of open array of wide string literals to function which expects 'array of pwidechar' parameter in case source file has utf8 encoding. Compiler thrown the following error in such case: Incompatible type for arg no. 1: Got "Array Of Const/Constant Open Array of WideString", expected "Open Array Of PWideChar".
+ Test for this issue.
................
r11582 | ivost | 2008-08-14 21:46:02 +0200 (Thu, 14 Aug 2008) | 2 lines

* progress on libxml2 translation

................
r11583 | ivost | 2008-08-15 11:56:06 +0200 (Fri, 15 Aug 2008) | 2 lines

* progress on libxml2 translation

................
r11584 | florian | 2008-08-15 15:52:54 +0200 (Fri, 15 Aug 2008) | 1 line

* continued to play with avr
................
r11585 | ivost | 2008-08-15 22:38:21 +0200 (Fri, 15 Aug 2008) | 2 lines

* libxml2 translation alsmost finished

................
r11586 | jonas | 2008-08-16 10:12:23 +0200 (Sat, 16 Aug 2008) | 3 lines

* the fact that a procedure is local does not mean that it by definition
does not need a GOT pointer (mantis #11852)

................
r11587 | michael | 2008-08-16 11:19:38 +0200 (Sat, 16 Aug 2008) | 1 line

* Patch from Paul Ishenin to add GTK 2.4 symbols
................
r11589 | marco | 2008-08-16 13:18:06 +0200 (Sat, 16 Aug 2008) | 2 lines

* Patch from Mattias for #11809

................
r11590 | jonas | 2008-08-16 16:31:51 +0200 (Sat, 16 Aug 2008) | 2 lines

* fixed test for 64 bit platforms

................
r11591 | jonas | 2008-08-16 16:37:19 +0200 (Sat, 16 Aug 2008) | 2 lines

* fixed test for 64 bit platforms

................
r11592 | jonas | 2008-08-16 16:40:51 +0200 (Sat, 16 Aug 2008) | 2 lines

* don't call procvars passed to formal parameters (mantis #11861)

................
r11593 | jonas | 2008-08-16 16:46:20 +0200 (Sat, 16 Aug 2008) | 3 lines

* safecall is only supposed to do anything for Windows targets. Removed
partial implementation for other targets and run test only for Windows

................
r11594 | jonas | 2008-08-16 19:13:10 +0200 (Sat, 16 Aug 2008) | 2 lines

* %os -> %target

................
r11595 | jonas | 2008-08-16 22:08:25 +0200 (Sat, 16 Aug 2008) | 6 lines

* method definitions in "child" interfaces also hide those in "parent"
interfaces, even if they only differ in resulttype (mantis #11862)
* fixing this required that multiple entries for the same method in a
interface vmt are all written out (change in
ImplementedInterface.AddImplProc)

................
r11596 | jonas | 2008-08-16 22:51:52 +0200 (Sat, 16 Aug 2008) | 3 lines

* Don't inline ioresult. It's not speed critical and inlining it causes
code bloat.

................
r11597 | florian | 2008-08-17 09:51:15 +0200 (Sun, 17 Aug 2008) | 1 line

* fixed for 64 bit targets
................
r11598 | marco | 2008-08-17 14:10:35 +0200 (Sun, 17 Aug 2008) | 5 lines

* (IDE-sysutils) dateutil has now unpacktime/packtime alike to Delphi dt.
* newstr and disposestr for pshortstring in sysutils. Avoids import order
problems because of duplicate definitions of pstring between objects
and sysutils

................
r11599 | jonas | 2008-08-17 14:38:41 +0200 (Sun, 17 Aug 2008) | 5 lines

* also free memory when a destructor is called without an explicit
instance reference (mantis 11896)
* fixed double destructor call in tests/test/cg/tcalcla1.pp which
caused an error after this change

................
r11600 | marco | 2008-08-17 15:26:02 +0200 (Sun, 17 Aug 2008) | 2 lines

* booltostr overload

................
r11601 | michael | 2008-08-17 16:45:12 +0200 (Sun, 17 Aug 2008) | 1 line

* Added initial support for domains, foreign keys and sequences
................
r11602 | michael | 2008-08-17 16:52:58 +0200 (Sun, 17 Aug 2008) | 1 line

* Firebird/Interbase needs CREATE GENERATOR instead of sequence, added sequence/domain capability
................
r11603 | michael | 2008-08-17 16:56:05 +0200 (Sun, 17 Aug 2008) | 1 line

* Forgot to set capabilities
................
r11604 | florian | 2008-08-17 17:10:54 +0200 (Sun, 17 Aug 2008) | 1 line

+ forgotten test
................
r11605 | jonas | 2008-08-17 19:26:24 +0200 (Sun, 17 Aug 2008) | 3 lines

* "To many colors" -> "Too many colors" (remark by Gerold Veith, mantis
#11909)

................
r11606 | michael | 2008-08-18 09:13:51 +0200 (Mon, 18 Aug 2008) | 1 line

* Rework zodat domeinen aangemaakt kunnen worden
................
r11607 | michael | 2008-08-18 10:09:36 +0200 (Mon, 18 Aug 2008) | 1 line

* Domains and sequences are now also written to .ini
................
r11608 | michael | 2008-08-18 11:14:38 +0200 (Mon, 18 Aug 2008) | 1 line

* Added import routines for domains/seqences, and populate code
................
r11609 | michael | 2008-08-18 12:05:52 +0200 (Mon, 18 Aug 2008) | 1 line

* Diff domains and sequences
................
r11610 | michael | 2008-08-18 12:58:00 +0200 (Mon, 18 Aug 2008) | 1 line

* Patch from Vincent Snijders to fix EscapeText
................
r11611 | joost | 2008-08-18 22:49:14 +0200 (Mon, 18 Aug 2008) | 4 lines

* Moved the load-process from OpenCursor and LoadBuffer to InternalOpen
* Load the update-buffer from an xml-file properly
* Do not try to add a second entry for a deleted record in SaveToFile
* Added TBufIndex.StoreSpareRecIntoBookmark
................
r11612 | joost | 2008-08-18 23:00:24 +0200 (Mon, 18 Aug 2008) | 1 line

* Fixed bugs 9143 and 11706 (duplicates)
................
r11613 | vincents | 2008-08-19 00:23:32 +0200 (Tue, 19 Aug 2008) | 1 line

* fixed typos in comment
................
r11614 | vincents | 2008-08-20 10:32:08 +0200 (Wed, 20 Aug 2008) | 1 line

* fixed typo in comment of freetype header file
................
r11615 | florian | 2008-08-20 23:35:05 +0200 (Wed, 20 Aug 2008) | 3 lines

* new node flag nf_modify to mark nodes being read and then written by one load node
* dfa takes care of nf_modify to create better life information
o resolves #11846 and #11849
................
r11616 | michael | 2008-08-21 09:04:18 +0200 (Thu, 21 Aug 2008) | 1 line

* Finished support for sequences and domains
................
r11617 | michael | 2008-08-21 09:34:06 +0200 (Thu, 21 Aug 2008) | 10 lines

* Patch from Paul Ishenin:
- added goption.inc with apropriate glib symbols
- added gincludes.inc which contains all other include files (similar to
gtk/gdk bindings and simlify inclusion into glib2.pas)
- checked/corrected all the .inc files and make them follow to template used in gtk/gdk (4 sections:
read_forward_definitions, read_interface_types, read_interface_rest, read_implementation)
- removed from most of .inc files unneeded comments that has been taken from original glib .h files. Some of
them were used by glib devels and others repeats official documentation.


................
r11618 | michael | 2008-08-21 09:37:56 +0200 (Thu, 21 Aug 2008) | 1 line

* Patch from Paul Ishenin, adding gtk 2.6 symbols
................
r11620 | michael | 2008-08-21 10:01:49 +0200 (Thu, 21 Aug 2008) | 7 lines

* Forgot to commit pango-layout.inc
* Further patches from Paul Ishenin
- one error in gdk (translation was correct, but error is placed in the gdkpango.h)
- and ocasionally missed 3 functions and one constant.



................
r11623 | hajny | 2008-08-21 23:10:06 +0200 (Thu, 21 Aug 2008) | 1 line

* use modulename rather than realmodulename for import libraries to avoid packaging issues in case of different casing - 'unit X' in x.pas
................
r11624 | florian | 2008-08-21 23:38:50 +0200 (Thu, 21 Aug 2008) | 4 lines

+ tfornode.simply which removes for loops being never executed
* handle function results correctly in life dfa
* handle for loops with at least one iteration better in life dfa
o resolves #8151
................
r11625 | hajny | 2008-08-22 00:39:04 +0200 (Fri, 22 Aug 2008) | 1 line

* another attempt to fix casing for generated OS/2 import libraries
................
r11626 | hajny | 2008-08-22 01:58:07 +0200 (Fri, 22 Aug 2008) | 1 line

* reverted previous changes, proper fix still to be found :-(
................
r11627 | michael | 2008-08-22 09:03:36 +0200 (Fri, 22 Aug 2008) | 1 line

* Patch from Paul Ishenin to remove unneeded symbols
................
r11629 | joost | 2008-08-22 14:49:29 +0200 (Fri, 22 Aug 2008) | 1 line

* Fixed fixed-width char-parameters + test
................
r11630 | ivost | 2008-08-22 22:08:44 +0200 (Fri, 22 Aug 2008) | 2 lines

* adding more samples

................
r11631 | ivost | 2008-08-22 22:10:53 +0200 (Fri, 22 Aug 2008) | 2 lines

* add new libxml sample

................
r11632 | ivost | 2008-08-22 22:39:41 +0200 (Fri, 22 Aug 2008) | 2 lines

* fixed sample io1.pas

................
r11633 | ivost | 2008-08-22 23:15:51 +0200 (Fri, 22 Aug 2008) | 2 lines

* new libxml2 sample

................
r11634 | ivost | 2008-08-23 00:06:19 +0200 (Sat, 23 Aug 2008) | 2 lines

* new libxml2 samples

................
r11635 | florian | 2008-08-23 09:25:53 +0200 (Sat, 23 Aug 2008) | 2 lines

+ set node complexity of const. string nodes to 1
+ better approximation if a tmp. location for a parameter when inlining can be omitted
................
r11636 | florian | 2008-08-23 09:29:30 +0200 (Sat, 23 Aug 2008) | 1 line

* split typecast_string_to_string into simplify and firstpass, allows better constant propagation when inlining, resolves #11327
................
r11637 | michael | 2008-08-23 13:34:47 +0200 (Sat, 23 Aug 2008) | 1 line

* Patch from Sergei Gorelkin to handle unicode
................
r11638 | michael | 2008-08-23 13:35:34 +0200 (Sat, 23 Aug 2008) | 1 line

* Patch from Sergei Gorelkin to handle unicode
................
r11639 | michael | 2008-08-23 13:57:16 +0200 (Sat, 23 Aug 2008) | 1 line

* Fixed wrong string type, causing unicode characters to be dropped
................
r11640 | florian | 2008-08-23 15:08:30 +0200 (Sat, 23 Aug 2008) | 1 line

* patch by Sergei Gorelkin improving win32 command line handling, resolves #10175
................
r11641 | florian | 2008-08-23 15:24:31 +0200 (Sat, 23 Aug 2008) | 2 lines

* merged fix for #10175 to win64

................
r11642 | marco | 2008-08-23 16:44:45 +0200 (Sat, 23 Aug 2008) | 2 lines

* lowercase all platform.inc inclusions for fpdoc's sake.

................
r11643 | florian | 2008-08-23 20:42:14 +0200 (Sat, 23 Aug 2008) | 1 line

* ignore $region/$endregion directives, resolves #11937
................
r11644 | marco | 2008-08-24 10:23:02 +0200 (Sun, 24 Aug 2008) | 2 lines

* fix from Michalis K. for nesting depth of XMLs (# 11957)

................
r11645 | florian | 2008-08-24 14:46:42 +0200 (Sun, 24 Aug 2008) | 1 line

- removed obsolete USECMOV define
................
r11646 | ivost | 2008-08-25 11:47:09 +0200 (Mon, 25 Aug 2008) | 3 lines

* updates for libxml2
* disabled legacy mode in libxml2 headers

................
r11647 | michael | 2008-08-25 11:50:29 +0200 (Mon, 25 Aug 2008) | 1 line

* Created lazarus project file for easier editing
................
r11648 | michael | 2008-08-25 11:52:14 +0200 (Mon, 25 Aug 2008) | 1 line

* Created lazarus project file for easier editing
................
r11649 | michael | 2008-08-25 15:47:06 +0200 (Mon, 25 Aug 2008) | 1 line

* Initial implementation
................
r11650 | michael | 2008-08-25 15:50:26 +0200 (Mon, 25 Aug 2008) | 1 line

* Added IsForward define to class declaration type
................
r11651 | paul | 2008-08-25 16:19:29 +0200 (Mon, 25 Aug 2008) | 4 lines

gtk2:
- add Has_GtkFileSystem define
- hide filesystem macroses by $ifdef block
fixes #0011837
................
r11652 | michael | 2008-08-25 17:42:14 +0200 (Mon, 25 Aug 2008) | 1 line

* Removed session info
................
r11653 | Almindor | 2008-08-25 22:31:00 +0200 (Mon, 25 Aug 2008) | 2 lines

* fix lua_alloc callback definition

................
r11654 | ivost | 2008-08-25 23:14:23 +0200 (Mon, 25 Aug 2008) | 3 lines

* xmlxsd helper unit
* removed csrc from libxml directory

................
r11655 | ivost | 2008-08-26 00:19:48 +0200 (Tue, 26 Aug 2008) | 3 lines

* fixed bug in libxml2 tree.inc
* added new xsd helper functions

................
r11656 | yury | 2008-08-26 10:02:20 +0200 (Tue, 26 Aug 2008) | 2 lines

* Patch by Carolos Foscolos. PCEOID, CREATE_INVALIDGUID and cleaned up file also included windbase_edb.inc which is now called by windbase.

................
r11657 | florian | 2008-08-27 17:16:45 +0200 (Wed, 27 Aug 2008) | 12 lines

o patch from Sergej Gorelkin to improvement code generation for string literals
* Replaces linear search through assembler list by the hash lookup.
This considerably improves performance on large projects
(one example is winunits-jedi package, in which tcgstringconstnode.pass_generate_code
was top #1 in calltree, consuming about 12% IRefs).
* Enables reusing memory locations for widestring constants
(and in general, the same approach may be used for any other type of constants).
* Saves a sizeof(pointer) bytes per constant, by removing a location
which points to the string. This location is necessary for the
typed consts which may be modified, but redundant for string literals
because the language does not allow to modify string literals in any way.

................
r11658 | jonas | 2008-08-28 00:38:05 +0200 (Thu, 28 Aug 2008) | 2 lines

* fixed asd_references for ansi/widestrings on Darwin

................
r11659 | Almindor | 2008-08-28 11:54:48 +0200 (Thu, 28 Aug 2008) | 2 lines

* applied patch from Hansi, fixes TInetSocket.DoConnect

................
r11660 | yury | 2008-08-28 17:45:04 +0200 (Thu, 28 Aug 2008) | 2 lines

* Patch by Carolos Foscolos.

................
r11661 | jonas | 2008-08-28 23:03:14 +0200 (Thu, 28 Aug 2008) | 2 lines

* use LOC_REGISTER instead of LOC_CREGISTER for constant string pointers

................
r11662 | jonas | 2008-08-29 09:42:21 +0200 (Fri, 29 Aug 2008) | 2 lines

* fixed oo_is_forward flag (from old patch by Dave Strodt)

................
r11663 | yury | 2008-08-29 10:56:22 +0200 (Fri, 29 Aug 2008) | 1 line

* Keep declaration of CeOidGetInfoEx2 with var parameter for backward compatibility.
................
r11668 | michael | 2008-08-30 23:05:52 +0200 (Sat, 30 Aug 2008) | 1 line

* Print short description of linked node in class overview
................
r11669 | michael | 2008-08-30 23:15:04 +0200 (Sat, 30 Aug 2008) | 1 line

* Added RunArguments
................
r11671 | michael | 2008-08-30 23:48:39 +0200 (Sat, 30 Aug 2008) | 2 lines

* Call EndThread manually if thread function returns (mantis #11490)

................
r11672 | jonas | 2008-08-31 12:07:53 +0200 (Sun, 31 Aug 2008) | 3 lines

* only set dynarray pointer to nil in decref in case the last reference
has been destroyed (mantis #12000)

................
r11673 | michael | 2008-08-31 17:01:05 +0200 (Sun, 31 Aug 2008) | 1 line

* Patch so uninitialized sockets are not closed
................
r11674 | michael | 2008-08-31 22:14:05 +0200 (Sun, 31 Aug 2008) | 5 lines

* Fixed bug #0011528,
* StripQuotes now also does single quotes.
* Note that for TMemIniFile the previous behaviour (StripQuotes=False) is kept, which
is Delphi compatible.

................
r11675 | michael | 2008-08-31 22:22:21 +0200 (Sun, 31 Aug 2008) | 1 line

* Patch from Zolotov Alex to include apr_hash
................
r11676 | michael | 2008-08-31 23:09:21 +0200 (Sun, 31 Aug 2008) | 1 line

* Fixed link detection to units that have not yet been scanned
................
r11677 | michael | 2008-08-31 23:25:21 +0200 (Sun, 31 Aug 2008) | 1 line

* Added support for interface delegation (Implements)
................
r11678 | michael | 2008-08-31 23:25:53 +0200 (Sun, 31 Aug 2008) | 1 line

* Added support for interface delegation (Implements)
................
r11679 | michael | 2008-08-31 23:57:27 +0200 (Sun, 31 Aug 2008) | 3 lines

* Patch from Martin Schreiber to fix streaming inherited collections
(mantis #11774)

................
r11680 | michael | 2008-09-01 00:25:19 +0200 (Mon, 01 Sep 2008) | 1 line

* Fixed formaatfloat for negative numbers (Bug ID 11711) objpas/sysutils/sysstr.inc
................
r11681 | michael | 2008-09-01 11:17:58 +0200 (Mon, 01 Sep 2008) | 3 lines

* Added overloaded call for fplstat which has var argument (as for stat)
* Implemented support for faSymlink, as per 9915

................
r11682 | michael | 2008-09-01 12:05:52 +0200 (Mon, 01 Sep 2008) | 1 line

* In case no default is specified and no NoDefault is present, act as if NoDefault was given. (bug ID 10080, now we are Delphi compatible)
................
r11684 | marco | 2008-09-01 13:54:49 +0200 (Mon, 01 Sep 2008) | 1 line

* shappbarmessage missed a indirection (pointer), bug #12024
................
r11686 | michael | 2008-09-01 18:06:28 +0200 (Mon, 01 Sep 2008) | 2 lines

* Implemented StrictDelimiter without the delphi bugs (mantis #8910)

................
r11687 | michael | 2008-09-01 18:54:05 +0200 (Mon, 01 Sep 2008) | 2 lines

* Fixed default value for floats (mantis #9183)

................
r11688 | ivost | 2008-09-01 20:46:40 +0200 (Mon, 01 Sep 2008) | 2 lines

* fixed 64bit bug in iconvenc.pas

................
r11693 | jonas | 2008-09-02 12:14:45 +0200 (Tue, 02 Sep 2008) | 4 lines

* moved fplstat(ansistring,pstat) overload to bunxovl(h).inc, so all
platforms have (fixes compilation for FPC_USE_LIBC platforms after
r11681)

................
r11697 | peter | 2008-09-03 22:46:04 +0200 (Wed, 03 Sep 2008) | 5 lines

* fix writing of goto node to ppu
* replace derefnode with resolveppuidx method that only needs to be
implemented for nodes referencing other nodes
* fix IE when a label is not defined in inline function

................
r11699 | peter | 2008-09-03 23:04:53 +0200 (Wed, 03 Sep 2008) | 2 lines

* fphashlist, update hashcapacity also if capacity is changed

................
r11700 | florian | 2008-09-04 10:52:04 +0200 (Thu, 04 Sep 2008) | 2 lines

+ missing {$goto on} added

................
r11703 | jonas | 2008-09-04 20:15:26 +0200 (Thu, 04 Sep 2008) | 4 lines

* give warning if a routine in the interface of a non-interface-only
macpas routine is not implemented and therefore considered to be
external

................
r11704 | jonas | 2008-09-04 20:48:25 +0200 (Thu, 04 Sep 2008) | 2 lines

+ test for mantis #12051 (already works correctly in 2.3.1)

................
r11708 | jonas | 2008-09-04 23:42:51 +0200 (Thu, 04 Sep 2008) | 3 lines

* fixed alignment code in generic fillchar (not sure why
tests/test/tfillchr didn't fail in the nightly sparc tests)

................
r11709 | jonas | 2008-09-05 09:28:05 +0200 (Fri, 05 Sep 2008) | 2 lines

* fixed test (it should fail)

................
r11710 | marco | 2008-09-05 09:47:25 +0200 (Fri, 05 Sep 2008) | 1 line

* shared suffix use for fb (for mac os x compat), bug #12062
................
r11711 | jonas | 2008-09-05 15:14:41 +0200 (Fri, 05 Sep 2008) | 4 lines

* 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)

................
r11719 | jonas | 2008-09-07 14:24:57 +0200 (Sun, 07 Sep 2008) | 6 lines

* keep the syms that need to be checked for forward definitions in a
separate list, so that procsyms, constsym, varsyms etc are not checked
and so that every sym is checked only once (rather than at the end
of every type block). This makes parsing units with lots of declarations
much faster (e.g., compiling MacOSAll is now 2 to 3 times faster)

................
r11720 | jonas | 2008-09-07 14:45:08 +0200 (Sun, 07 Sep 2008) | 2 lines

- reverted r11719, there are still some problems with it

................
r11721 | jonas | 2008-09-07 15:31:39 +0200 (Sun, 07 Sep 2008) | 2 lines

* use p.resultdef (representing a property array range) before freeing p

................
r11722 | jonas | 2008-09-07 15:51:04 +0200 (Sun, 07 Sep 2008) | 3 lines

* fixed version of r11719 (faster parsing of units with lots of declarations
in many different type blocks)

................
r11727 | sekelsenmat | 2008-09-07 21:17:12 +0200 (Sun, 07 Sep 2008) | 1 line

Allows the maximum record size in TFixedDataset and descendents to be modifyed.
................
r11730 | sekelsenmat | 2008-09-08 20:19:33 +0200 (Mon, 08 Sep 2008) | 1 line

Renames MaxRecordLength to the better DefaultRecordLength and fixes default size setting in sdfdata
................
r11731 | jonas | 2008-09-08 23:10:38 +0200 (Mon, 08 Sep 2008) | 2 lines

* reverted r11671 because it breaks tthread.waitfor on unix

................
r11732 | michael | 2008-09-09 08:41:57 +0200 (Tue, 09 Sep 2008) | 1 line

* Fixed SetItem as per bugreport of Paul Ishenin
................
r11738 | florian | 2008-09-10 21:12:38 +0200 (Wed, 10 Sep 2008) | 3 lines

Initialized merge tracking via "svnmerge" with revisions "1-11664" from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

................
r11739 | florian | 2008-09-10 22:14:31 +0200 (Wed, 10 Sep 2008) | 100 lines

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
........

................
r11740 | joost | 2008-09-10 22:23:33 +0200 (Wed, 10 Sep 2008) | 1 line

* Implemented abstract class TBufDatasetReader and TXMLBufDatasetReader
................
r11741 | jonas | 2008-09-10 22:54:00 +0200 (Wed, 10 Sep 2008) | 2 lines

* fixed compilation

................
r11742 | ivost | 2008-09-10 23:02:41 +0200 (Wed, 10 Sep 2008) | 3 lines

* fixed bug in libxml2
* added AnsiString version of BAD_CAST macro

................
r11743 | florian | 2008-09-10 23:02:50 +0200 (Wed, 10 Sep 2008) | 1 line

* fixed widestring/unicodemanager initialisiation
................
r11744 | ivost | 2008-09-10 23:04:11 +0200 (Wed, 10 Sep 2008) | 2 lines

* added {H+} to enable ansistring inside libxml2

................
r11745 | florian | 2008-09-10 23:25:59 +0200 (Wed, 10 Sep 2008) | 1 line

* unified some win32/win64 code
................
r11746 | florian | 2008-09-11 15:41:54 +0200 (Thu, 11 Sep 2008) | 4 lines

o patch by Markus Beth
* improves ReadInteger speed
* unified ChPos variable casing

................
r11747 | michael | 2008-09-11 20:47:41 +0200 (Thu, 11 Sep 2008) | 9 lines

* Bugfixes from Attila Borka:
- Bug fix in the template parser. Bug0012095
- Fixed: CGI applications did not create and populate contentfields (caused AV if someone
tried to access it) for the http request, both the query and content parameters were put
into the queryfields list
- Bug0012094 fix: CGI applications AllowDefaultModule=true did not work for Delphi style calls (it is ok
for querystring parameter passed module names)
- fptemplate.pp->TTemplateParser: Added support for template tag parameters.

................
r11748 | michael | 2008-09-11 21:04:26 +0200 (Thu, 11 Sep 2008) | 1 line

* Fixed writing of default float values
................
r11749 | michael | 2008-09-11 21:37:18 +0200 (Thu, 11 Sep 2008) | 1 line

* Fixed writing of default boolean values
................
r11750 | florian | 2008-09-11 22:55:18 +0200 (Thu, 11 Sep 2008) | 1 line

* fix building of simple x86_64-freebsd executables
................
r11751 | marco | 2008-09-12 18:59:56 +0200 (Fri, 12 Sep 2008) | 2 lines

* committed fix for unaligned access from id 12079

................
r11752 | ivost | 2008-09-12 23:42:12 +0200 (Fri, 12 Sep 2008) | 1 line

added size_t type in ctypes.pp for non unix systems
................
r11753 | ivost | 2008-09-13 02:27:27 +0200 (Sat, 13 Sep 2008) | 1 line

* enabled libxml2 for win32 (hope it's still working for linux)
................
r11754 | marco | 2008-09-13 10:41:57 +0200 (Sat, 13 Sep 2008) | 2 lines

* GL_ARB_Vertex_buffer_object returned true when it should be false in some cases, mantis 12128

................
r11755 | florian | 2008-09-13 10:42:35 +0200 (Sat, 13 Sep 2008) | 1 line

* use unaligned instead some hacking :)
................
r11756 | florian | 2008-09-13 10:58:54 +0200 (Sat, 13 Sep 2008) | 1 line

+ FreeBSD lazarus project
................
r11757 | florian | 2008-09-13 11:18:14 +0200 (Sat, 13 Sep 2008) | 1 line

* fixed syntax error caused by extra :
................
r11758 | florian | 2008-09-13 11:18:27 +0200 (Sat, 13 Sep 2008) | 1 line

* fixed typo
................
r11759 | marco | 2008-09-13 11:54:13 +0200 (Sat, 13 Sep 2008) | 2 lines

* more unaligned fixes for xmlread. Mantis 12137

................
r11760 | ivost | 2008-09-13 12:30:53 +0200 (Sat, 13 Sep 2008) | 2 lines

* fixed libxml2 for linux

................
r11761 | jonas | 2008-09-13 14:20:01 +0200 (Sat, 13 Sep 2008) | 3 lines

* fixed indentation
* fixed use of instruction instance after it has been freed

................
r11762 | jonas | 2008-09-13 14:20:23 +0200 (Sat, 13 Sep 2008) | 2 lines

* fixed memory leaks

................
r11763 | jonas | 2008-09-13 14:28:55 +0200 (Sat, 13 Sep 2008) | 3 lines

- removed global "resolving_forward" variable (was no longer used)
* moved forward type checking from pdecl/symbase to symtable/symsym

................
r11764 | florian | 2008-09-13 16:51:48 +0200 (Sat, 13 Sep 2008) | 1 line

* line breaks fixed
................
r11765 | florian | 2008-09-13 16:54:08 +0200 (Sat, 13 Sep 2008) | 1 line

+ non working dummies, makes make happy though
................
r11766 | florian | 2008-09-13 17:21:17 +0200 (Sat, 13 Sep 2008) | 1 line

* fixed several syscall stuff for x86_64-freebsd
................
r11767 | florian | 2008-09-13 17:37:06 +0200 (Sat, 13 Sep 2008) | 1 line

* intAssignPipe is i386 only code
................
r11768 | florian | 2008-09-13 17:46:33 +0200 (Sat, 13 Sep 2008) | 1 line

* exports need pic on x86_64-freebsd
................
r11769 | florian | 2008-09-13 17:50:32 +0200 (Sat, 13 Sep 2008) | 2 lines

* target flags for x86_64-freebsd fixed
* use external assembler on x86_64-freebsd for now because dwarf doesn't work with the internal one
................
r11770 | tom_at_work | 2008-09-13 18:29:42 +0200 (Sat, 13 Sep 2008) | 1 line

* rol/ror inlines for powerpc/powerpc64 (only for 32/64 bit operands for now)
................
r11771 | florian | 2008-09-13 20:17:13 +0200 (Sat, 13 Sep 2008) | 2 lines

* jb -> jnb

................
r11772 | jonas | 2008-09-13 21:59:21 +0200 (Sat, 13 Sep 2008) | 3 lines

* moved the forwardchecksyms back to symbase (but the main functionality
remains in symtable) to simplify (and fix) its memory management

................
r11773 | jonas | 2008-09-13 22:01:47 +0200 (Sat, 13 Sep 2008) | 2 lines

* set finalized dynarrays to nil (mantis #12048)

................
r11774 | tom_at_work | 2008-09-13 22:37:43 +0200 (Sat, 13 Sep 2008) | 1 line

* fixed compilation with -dEXTDEBUG after adding ROL/ROR internal opcodes
................
r11775 | marco | 2008-09-14 16:19:56 +0200 (Sun, 14 Sep 2008) | 2 lines

* files for amd64-freebsd

................
r11776 | florian | 2008-09-14 17:22:32 +0200 (Sun, 14 Sep 2008) | 3 lines

* fixed wrongly written system.$unicodetype type definition
* improved code generation for unicodestrings

................
r11777 | jonas | 2008-09-14 18:11:22 +0200 (Sun, 14 Sep 2008) | 4 lines

* reduced register pressure when indexing arrays with regvars (regvar
no longer needs to be copied to a temporary register if it isn't
modified)

................
r11779 | florian | 2008-09-14 19:19:20 +0200 (Sun, 14 Sep 2008) | 1 line

* fixed constant char to unicodestring conversion
................
r11782 | ivost | 2008-09-14 20:54:55 +0200 (Sun, 14 Sep 2008) | 2 lines

* added unixtype unit in addition to baseunix unit (currently baseunix contains all types of unixtype)

................
r11783 | joost | 2008-09-14 22:34:30 +0200 (Sun, 14 Sep 2008) | 4 lines

* Renamed TBufDatasetReader to TDataPacketReader
* Start of TFpcBinaryDatapacketReader
* Implemented TBufDataset.SetDatasetPacket, GetDatasetPacket, LoadFromStream and SaveToStream

................
r11784 | marco | 2008-09-14 22:42:46 +0200 (Sun, 14 Sep 2008) | 2 lines

* correction for omfsnamelen, which hopefully fixes ostat

................
r11786 | ivost | 2008-09-14 22:58:37 +0200 (Sun, 14 Sep 2008) | 2 lines

* removed size_t from ctypes.pp in trunk (reverted)

................
r11787 | ivost | 2008-09-14 22:59:20 +0200 (Sun, 14 Sep 2008) | 2 lines

* reverted usage of ctypes.size_t in libxml2

................
r11788 | joost | 2008-09-15 10:17:35 +0200 (Mon, 15 Sep 2008) | 1 line

* Removed unnessesary var-keyword in declaration of ReadXMLFile (Fixes compilation)
................
r11789 | tom_at_work | 2008-09-15 21:37:47 +0200 (Mon, 15 Sep 2008) | 1 line

* removed superfluous masking of rotation count for rol/ror inlines
................
r11790 | marco | 2008-09-15 22:01:17 +0200 (Mon, 15 Sep 2008) | 2 lines

* lots of little longint() to TSysParam() fixes. Ancient code, brr.

................
r11791 | florian | 2008-09-16 10:36:28 +0200 (Tue, 16 Sep 2008) | 1 line

+ dummy intassignpipe for non-i386
................
r11792 | ivost | 2008-09-16 12:32:43 +0200 (Tue, 16 Sep 2008) | 4 lines

* extended libxml2
* xmlCharPtr is no longer compatible to pchar (use BAD_CAST to cast instead)
* fixed bugs

................
r11793 | marco | 2008-09-16 22:25:57 +0200 (Tue, 16 Sep 2008) | 2 lines

* more freebsd/x86_64 fixes

................
r11794 | marco | 2008-09-16 22:48:02 +0200 (Tue, 16 Sep 2008) | 2 lines

* another fix.

................
r11795 | jonas | 2008-09-16 23:59:15 +0200 (Tue, 16 Sep 2008) | 3 lines

* give an error stating that you have to use the latest released compiler
to build 2.3.1 since the unicode branch merge

................
r11796 | ivost | 2008-09-17 00:35:57 +0200 (Wed, 17 Sep 2008) | 2 lines

* added several new helper functions to libxml2 (xmlxsd.pas)

................
r11797 | ivost | 2008-09-17 00:57:07 +0200 (Wed, 17 Sep 2008) | 2 lines

* added S_IRWXG and S_IRWXU constants to ostypes.inc of linux (defined in sys/stat.h)

................
r11798 | florian | 2008-09-17 22:21:19 +0200 (Wed, 17 Sep 2008) | 1 line

* renamed optunrol into optloop
................
r11799 | marco | 2008-09-17 23:03:44 +0200 (Wed, 17 Sep 2008) | 2 lines

* initial version

................
r11800 | michael | 2008-09-18 08:44:41 +0200 (Thu, 18 Sep 2008) | 1 line

* Partially applied the patch from Attila Borka, added UseStreaming class method so datamodules without streamed content can be used (bug ID 12158)
................
r11801 | vincents | 2008-09-18 13:49:19 +0200 (Thu, 18 Sep 2008) | 1 line

* fpdoc: fixed memleak
................
r11802 | marco | 2008-09-18 16:29:36 +0200 (Thu, 18 Sep 2008) | 2 lines

* csu leftovers

................
r11803 | florian | 2008-09-18 18:53:36 +0200 (Thu, 18 Sep 2008) | 2 lines

+ framework for strength reduction of induction variables
+ constant multiplications can be eliminated testwise
................
r11804 | florian | 2008-09-18 20:33:43 +0200 (Thu, 18 Sep 2008) | 2 lines

* set successor properly for for-nodes
+ CalcDefSum
................
r11805 | florian | 2008-09-18 20:49:09 +0200 (Thu, 18 Sep 2008) | 1 line

+ first full implementation of induction variable strength reduction
................
r11806 | florian | 2008-09-18 21:08:57 +0200 (Thu, 18 Sep 2008) | 1 line

* variables where the address is taken could have aliases so they aren't invariant
................
r11807 | florian | 2008-09-18 23:39:38 +0200 (Thu, 18 Sep 2008) | 1 line

* ttemprefnode -> ctemprefnode
................
r11808 | vincents | 2008-09-19 15:24:22 +0200 (Fri, 19 Sep 2008) | 1 line

* fpdoc: fixed AV when looking for link tags, patch from Michael van Canneyt
................
r11809 | florian | 2008-09-20 21:51:29 +0200 (Sat, 20 Sep 2008) | 1 line

+ support for & and % in char constants, resolves #12186
................
r11811 | ivost | 2008-09-21 02:56:06 +0200 (Sun, 21 Sep 2008) | 2 lines

* added GetPropList function for TClass parameter

................
r11812 | florian | 2008-09-21 19:42:53 +0200 (Sun, 21 Sep 2008) | 1 line

* don't waste a register for inc/dec(<pointer>,const);
................
r11813 | jonas | 2008-09-21 20:52:13 +0200 (Sun, 21 Sep 2008) | 2 lines

* fixed range check error

................
r11814 | vincents | 2008-09-21 21:47:35 +0200 (Sun, 21 Sep 2008) | 1 line

+ mandelbrot test output for n=200
................
r11815 | vincents | 2008-09-21 22:48:44 +0200 (Sun, 21 Sep 2008) | 1 line

* add real mandelbrot test output for n=200
................
r11816 | micha | 2008-09-21 23:02:51 +0200 (Sun, 21 Sep 2008) | 1 line

* fix armeb compiler cleaning
................
r11817 | vincents | 2008-09-22 13:04:00 +0200 (Mon, 22 Sep 2008) | 1 line

* another attempt to put the expected mandlebrot test output in svn
................
r11818 | marco | 2008-09-23 10:36:56 +0200 (Tue, 23 Sep 2008) | 2 lines

* getcombobox changes dll. (12200)

................
r11819 | marco | 2008-09-24 21:57:15 +0200 (Wed, 24 Sep 2008) | 2 lines

* fix for 10292, baudrates for x86_64

................
r11820 | florian | 2008-09-25 21:15:54 +0200 (Thu, 25 Sep 2008) | 1 line

* reset FPU properly after an exception, resolves #12214
................
r11821 | florian | 2008-09-25 21:31:16 +0200 (Thu, 25 Sep 2008) | 1 line

+ applied a fix similar to 11820 to x86-64
................
r11823 | jonas | 2008-09-26 15:28:53 +0200 (Fri, 26 Sep 2008) | 2 lines

* don't "round" 0.0 when converting to a string (mantis #12202)

................
r11824 | jonas | 2008-09-26 15:32:40 +0200 (Fri, 26 Sep 2008) | 2 lines

+ test for mantis #12202

................
r11825 | florian | 2008-09-26 20:23:31 +0200 (Fri, 26 Sep 2008) | 4 lines

+ strength reduction for array accesses inside for loops
* export get_mul_size so we can use it for strength reduction
* ensure loop counter is marked as being written
* typos fixed
................
r11826 | marco | 2008-09-26 21:32:39 +0200 (Fri, 26 Sep 2008) | 2 lines

* yet another fix for 10292, mea culpa. (identifiers were added for the wrong architecture)

................
r11827 | florian | 2008-09-27 12:06:56 +0200 (Sat, 27 Sep 2008) | 2 lines

* when cross compiling, fallback to fpc when no cross compiler is found

................
r11828 | florian | 2008-09-27 14:05:35 +0200 (Sat, 27 Sep 2008) | 1 line

* fix wince building after unicodestring changes
................
r11829 | florian | 2008-09-27 14:37:30 +0200 (Sat, 27 Sep 2008) | 1 line

* typo fixed
................
r11830 | florian | 2008-09-27 14:40:42 +0200 (Sat, 27 Sep 2008) | 1 line

* make unicodechar equivalent to widechar, resolves #12233
................
r11832 | florian | 2008-09-27 15:25:11 +0200 (Sat, 27 Sep 2008) | 1 line

* fix by Inoussa OUEDRAOGO to improve UnicodeString property handling, resolves #12224
................
r11833 | michael | 2008-09-28 16:35:28 +0200 (Sun, 28 Sep 2008) | 1 line

* Added possibility to set filename in archive, and added possibility to use streams
................
r11834 | michael | 2008-09-28 16:42:29 +0200 (Sun, 28 Sep 2008) | 1 line

* Fixed assign
................
r11835 | florian | 2008-09-28 20:45:37 +0200 (Sun, 28 Sep 2008) | 2 lines

* force static; being repeated in the procedure body, this avoids trouble as in #12242
+ add static when using fullprocname
................
r11837 | joost | 2008-09-28 21:53:00 +0200 (Sun, 28 Sep 2008) | 1 line

* Register DataPacketReaders
................
r11838 | florian | 2008-09-28 22:16:13 +0200 (Sun, 28 Sep 2008) | 2 lines

* forbid access to properties in class methods
* readability fix
................
r11839 | joost | 2008-09-28 22:52:10 +0200 (Sun, 28 Sep 2008) | 1 line

* Extracted TXMLDatapacketReader into a seperate unit.
................
r11840 | jonas | 2008-09-29 16:37:17 +0200 (Mon, 29 Sep 2008) | 3 lines

* improved firstcomplex() in case one of the two nodes does not need any
floating point registers, or in case they both need just as many

................
r11841 | joost | 2008-09-29 17:48:43 +0200 (Mon, 29 Sep 2008) | 1 line

* Fix AV when DebugDisabled is true and the program quits
................
r11842 | florian | 2008-09-29 21:59:27 +0200 (Mon, 29 Sep 2008) | 1 line

* fixes array overflow in VarTypeAsText when an 'Array of' or 'Ref to' variant type is passed
................
r11843 | joost | 2008-09-30 15:20:42 +0200 (Tue, 30 Sep 2008) | 1 line

* If InitDebugClient fails, do not try to write a debug-message
................
r11844 | yury | 2008-10-01 14:19:55 +0200 (Wed, 01 Oct 2008) | 1 line

* Use MB_SETFOREGROUND and ICON_ERROR flags for unhandled exception message box on wince to prevent message box hiding when sequential error messages are displayed.
................
r11845 | yury | 2008-10-01 14:25:03 +0200 (Wed, 01 Oct 2008) | 1 line

* Removed unused code and unused local variable.
................
r11846 | ivost | 2008-10-01 23:34:48 +0200 (Wed, 01 Oct 2008) | 2 lines

* implemented VarSupports helpers

................
r11847 | ivost | 2008-10-02 00:39:16 +0200 (Thu, 02 Oct 2008) | 2 lines

* fixed bug in VarSupports (accessviolation when variant was nil)

................
r11849 | jonas | 2008-10-02 17:10:13 +0200 (Thu, 02 Oct 2008) | 2 lines

+ some generic changes preparing for darwin/arm support

................
r11850 | vincents | 2008-10-02 19:50:01 +0200 (Thu, 02 Oct 2008) | 1 line

* fixed mandelbrot shootout benchmark for non i386 targets
................
r11851 | jonas | 2008-10-02 21:47:36 +0200 (Thu, 02 Oct 2008) | 2 lines

+ darwin/arm versions

................
r11852 | jonas | 2008-10-02 23:32:53 +0200 (Thu, 02 Oct 2008) | 2 lines

* disabled pic default for arm/darwin (pic isn't supported yet for arm)

................
r11853 | jonas | 2008-10-02 23:33:16 +0200 (Thu, 02 Oct 2008) | 2 lines

+ darwin/arm assembler writer

................
r11854 | jonas | 2008-10-02 23:52:47 +0200 (Thu, 02 Oct 2008) | 4 lines

* moved adding of '-mfpu=softvfp' for arm/softfloat to overridden
method in TArmGNUAssembler, because it's cleaner (no ifdef) and it
mustn't be added for darwin (which uses TArmAppleGNUAssembler)

................
r11855 | jonas | 2008-10-02 23:53:45 +0200 (Thu, 02 Oct 2008) | 2 lines

* forgot inherited call in previous commit for non-darwin

................
r11856 | ivost | 2008-10-02 23:56:54 +0200 (Thu, 02 Oct 2008) | 2 lines

* added helper function "FindPropInfo" with additional TypeKind filter parameter

................
r11857 | vincents | 2008-10-03 10:03:54 +0200 (Fri, 03 Oct 2008) | 1 line

* removed compiler directives from source as per Isaac's request
................
r11858 | vincents | 2008-10-03 10:40:37 +0200 (Fri, 03 Oct 2008) | 1 line

* fixed compilation on x86_64
................
r11859 | vincents | 2008-10-03 10:46:14 +0200 (Fri, 03 Oct 2008) | 1 line

+ expected output for meteor benchmark
................
r11860 | vincents | 2008-10-03 11:02:25 +0200 (Fri, 03 Oct 2008) | 1 line

* removed accidentally committed change
................
r11861 | jonas | 2008-10-04 16:06:09 +0200 (Sat, 04 Oct 2008) | 4 lines

* changed abi for darwin/arm from eabi to default, as it appears to be
more closely related to the old abi
* make sure softfloat is still default for darwin/arm after this change

................
r11862 | jonas | 2008-10-04 16:07:52 +0200 (Sat, 04 Oct 2008) | 5 lines

+ support for generating non-pic darwin/arm call stubs
+ write the header for non-pic darwin/arm call stubs properly in aggas
* r9 is not available for general use on darwin/arm according to the llvm
code generator

................
r11863 | florian | 2008-10-04 21:25:34 +0200 (Sat, 04 Oct 2008) | 1 line

+ VFP instructions for arm
................
r11864 | vincents | 2008-10-04 21:42:45 +0200 (Sat, 04 Oct 2008) | 1 line

* cleanup on shootout maintainers request
................
r11865 | michael | 2008-10-05 16:37:01 +0200 (Sun, 05 Oct 2008) | 1 line

* Initial check-in
................
r11866 | jonas | 2008-10-07 17:36:05 +0200 (Tue, 07 Oct 2008) | 2 lines

* fixed int64 to boolean conversion for loc_(c)reference based on ppc code

................
r11867 | karoly | 2008-10-07 21:33:30 +0200 (Tue, 07 Oct 2008) | 2 lines

+ fixed Sysutils' ExecuteProcess() to allow longer ComLine than 256 chars (smartlinking needs this badly)

................
r11868 | karoly | 2008-10-07 22:04:37 +0200 (Tue, 07 Oct 2008) | 2 lines

+ re-enable smartlinking for MorphOS

................
r11869 | michael | 2008-10-08 20:06:52 +0200 (Wed, 08 Oct 2008) | 49 lines

* Large patch from Sergei Gorelkin:
xmlutils.pp, names.inc:
* exclude colon from the NameChar bitmap and handle it in code.

dom.pp:
+ TDOMText.IsElementContentWhitespace now implemented completely.
* Attributes created by TDOMElement.SetAttribute get their
OwnerElement property assigned properly
* Attribute replaced by TDOMNamedNodeMap.SetNamedItem get their
OwnerElement reset to nil
* TDOMElement.SetAttributeNode does not destroy the attribute when it
is being replaced by itself
* Most node boolean properties collected into a single FFlags field
to reduce memory requirements.

xmlread.pp:
+ Syntax-level support of namespaces: handle colons in names, check
correct qualified name syntax, prohibit colons in entity/notation/PI
names and ID/IDREF attribute values (all this only happens when
Options.Namespaces is set to True - not by default).
* Reaching end of input while parsing the Ignore Section is a fatal
error because parameter entities are not recognized there.
* Reaching end of input while parsing entity value literal that was
started in a parameter entity aborts immediately instead of hopelessly
scanning the whole document up to its end.
* Fixed parsing duplicate Element declarations. The content models of
subsequent declarations are now discarded as they should - not
appended to the existing model.
* Fixed parsing duplicate Attlist declarations. In addition to dropping
the attribute declaration itself, do not modify the corresponding
element declaration and suppress 'Duplicate ID attribute' and
'Duplicate NOTATION attribute' validation errors.
* Fixed error position in cases when attribute value lacks the closing
quote.
* Some refactoring in order to reduce number of WideString vars and code
size (some SkipX and ExpectX merged into SkipX(required: Boolean)).
* TXMLCharSource.FLocation record replaced by single integer FLineNo
because LinePosition is always calculated.
* TXMLCharSource.FCursor replaced by local var.
* TXMLReader.NameIs changed to a more general BufEquals(), it eliminates
TXMLReader.GetString and some WideString variables.

tests/xmlts.pp:
* Ignored tests do not change suite conformance state.

tests/testgen.pp
* Added a forgotten semicolon.


................
r11870 | michael | 2008-10-09 11:55:21 +0200 (Thu, 09 Oct 2008) | 1 line

* Fixed bug #12323. Bug is in getting default value of string parameters, unterminated memory copy
................
r11871 | karoly | 2008-10-09 20:37:56 +0200 (Thu, 09 Oct 2008) | 2 lines

* fix bug #8391 only for arm-wince, because otherwise it breaks other platforms (incl. i386-win32)

................
r11873 | karoly | 2008-10-10 09:10:21 +0200 (Fri, 10 Oct 2008) | 2 lines

* another attempt to properly fix the fix for 8391

................
r11874 | jonas | 2008-10-10 16:11:00 +0200 (Fri, 10 Oct 2008) | 4 lines

* don't warn that a unit won't be smartlinked in case no .a file is
available when smart linking happens using the plain object files
(mantis #12316)

................
r11875 | jonas | 2008-10-10 17:01:56 +0200 (Fri, 10 Oct 2008) | 3 lines

* don't crash when someone uses an integer value to declare a wide/unicode
string (mantis #12329)

................
r11879 | jonas | 2008-10-11 15:39:27 +0200 (Sat, 11 Oct 2008) | 2 lines

* fixed range check error when writing const pointers > high(longint)

................
r11880 | mazen | 2008-10-11 16:42:37 +0200 (Sat, 11 Oct 2008) | 2 lines

* If no custom libgdb.a file is found, then we try to look for a system default libgdb.a before deciding to build IDE without debugger support. Some distributions like Debian provide package libgdb-dev with libgdb.a on which official IDE in Debian package should link.

................
r11884 | marco | 2008-10-12 12:02:18 +0200 (Sun, 12 Oct 2008) | 2 lines

* avoid double free when reusing chmsitemap objects

................
r11885 | marco | 2008-10-12 12:22:47 +0200 (Sun, 12 Oct 2008) | 2 lines

* Initial CHM support for textmode IDE.

................
r11886 | marco | 2008-10-12 12:56:15 +0200 (Sun, 12 Oct 2008) | 1 line

* small enhancement to wutils 'writeln(stderr,...); kind of debugging'
................
r11887 | marco | 2008-10-12 13:14:35 +0200 (Sun, 12 Oct 2008) | 2 lines

* some more minor fixes to the debug info

................
r11888 | jonas | 2008-10-12 14:19:41 +0200 (Sun, 12 Oct 2008) | 7 lines

+ -vq parameter to show message numbers
+ -vm<x>,<y> parameter to mask messages <x> and <y>
(both based on a patch submitted by Petr Kristan)
* alphabetically ordered -v<x> option processing code so it's easier
to see which characters are still free (not many anymore)
+ some tests for the -vm functionality

................
r11890 | marco | 2008-10-12 16:52:48 +0200 (Sun, 12 Oct 2008) | 2 lines

* removed a forgotten writeln that could cause havoc in GUI programs.

................
r11896 | michael | 2008-10-13 16:17:06 +0200 (Mon, 13 Oct 2008) | 4 lines

* Override EnableIgnore in TDecorator
* Pass EnableIgnore to TTest when a test is added to a TSuite


................
r11897 | joost | 2008-10-14 11:08:31 +0200 (Tue, 14 Oct 2008) | 1 line

* Implemented TNumericField.GetAsboolean
................
r11898 | florian | 2008-10-14 19:06:55 +0200 (Tue, 14 Oct 2008) | 2 lines

* fix range check error in options handling, resolves #12365
+ better error output (print filename and line number) for config file directive errors
................
r11903 | jonas | 2008-10-16 13:12:37 +0200 (Thu, 16 Oct 2008) | 2 lines

+ fpmkfifo for libc

................
r11904 | yury | 2008-10-16 13:43:01 +0200 (Thu, 16 Oct 2008) | 1 line

+ New wince api units and some fixes to existing api units by Vasil Maximov.
................
r11905 | yury | 2008-10-17 12:41:46 +0200 (Fri, 17 Oct 2008) | 1 line

+ Some fixes to wince api units by Vasil Maximov.
................
r11906 | yury | 2008-10-17 12:45:52 +0200 (Fri, 17 Oct 2008) | 1 line

+ ras and raserror wince api units by Vasil Maximov.
................
r11907 | peter | 2008-10-17 20:36:45 +0200 (Fri, 17 Oct 2008) | 2 lines

* reset version to latest release: 2.2.2-0

................
r11908 | florian | 2008-10-17 21:00:58 +0200 (Fri, 17 Oct 2008) | 1 line

* arm-linux-eabi uses mmap2 and ugetrlimit
................
r11909 | peter | 2008-10-17 23:37:13 +0200 (Fri, 17 Oct 2008) | 2 lines

* use AvailableRepository when compiling new packages

................
r11910 | marco | 2008-10-18 14:16:00 +0200 (Sat, 18 Oct 2008) | 2 lines

* fixed a bunch of structural errors and missing escapes to get the docs building again.

................
r11911 | marco | 2008-10-18 14:24:16 +0200 (Sat, 18 Oct 2008) | 2 lines

* Add the main unit URL to the index, the fp IDE uses the index for context sensitive help.

................
r11912 | florian | 2008-10-18 15:48:17 +0200 (Sat, 18 Oct 2008) | 2 lines

* removed packed, the stat record should be c packed
* deprecated old fields as it is done on other architectures
................
r11913 | florian | 2008-10-18 15:48:57 +0200 (Sat, 18 Oct 2008) | 1 line

* handle 64 bit parameters correctly for arm eabi
................
r11914 | florian | 2008-10-18 15:49:39 +0200 (Sat, 18 Oct 2008) | 1 line

* fixed syscall0 for arm eabi
................
r11915 | florian | 2008-10-18 15:50:55 +0200 (Sat, 18 Oct 2008) | 2 lines

* made fptime based on usgettimeofday available
* moved defines selecting the right syscall from ossysc.inc to osdefs.inc
................
r11916 | florian | 2008-10-18 16:07:42 +0200 (Sat, 18 Oct 2008) | 1 line

+ missing includes of fpcdefs.inc added
................
r11917 | florian | 2008-10-18 16:08:18 +0200 (Sat, 18 Oct 2008) | 1 line

+ propagate FPC_ARMEL if FPC_OARM isn't defined
................
r11918 | florian | 2008-10-18 16:45:03 +0200 (Sat, 18 Oct 2008) | 3 lines

+ support for TEST_ABI in the testsuite
+ arm-linux-eabi object files

................
r11919 | florian | 2008-10-18 16:46:30 +0200 (Sat, 18 Oct 2008) | 2 lines

+ TEST_ABI documented

................
r11926 | marco | 2008-10-18 19:53:42 +0200 (Sat, 18 Oct 2008) | 2 lines

* fixes from Attila Borka, mantis 12374, updating to 2.2.9 + demo update

................
r11927 | marco | 2008-10-18 19:57:23 +0200 (Sat, 18 Oct 2008) | 2 lines

* patches from Attila Borka. Mantis 12373. One minor addition.

................
r11928 | marco | 2008-10-18 20:28:56 +0200 (Sat, 18 Oct 2008) | 2 lines

* put expansion of pathname for debugging purposes under ifdef to ease mingw use.

................
r11929 | marco | 2008-10-18 20:29:32 +0200 (Sat, 18 Oct 2008) | 2 lines

* fixed typo

................
r11930 | florian | 2008-10-18 20:57:20 +0200 (Sat, 18 Oct 2008) | 1 line

+ arm linux syscalls updated
................
r11933 | marco | 2008-10-18 22:11:00 +0200 (Sat, 18 Oct 2008) | 2 lines

* Makefile fix that adds httpd22 dependancy to fcl-web. Maybe fpapache should move to a new package?

................
r11934 | florian | 2008-10-18 23:20:54 +0200 (Sat, 18 Oct 2008) | 2 lines

* keep stack aligned at 8 byte boundary inside the startup code

................
r11936 | marco | 2008-10-19 14:52:56 +0200 (Sun, 19 Oct 2008) | 2 lines

* added chm to default extensions to search in help->files "new" dialog.

................
r11937 | jonas | 2008-10-19 18:50:43 +0200 (Sun, 19 Oct 2008) | 2 lines

+ some missing docompare() overrides

................
r11939 | Almindor | 2008-10-20 18:57:32 +0200 (Mon, 20 Oct 2008) | 2 lines

+ add missing SHUT_* constants for fpshutdown() (aliases from winsock2)

................
r11940 | Almindor | 2008-10-20 18:59:58 +0200 (Mon, 20 Oct 2008) | 2 lines

+ add missing SHUT_* constants to openbsd

................
r11942 | michael | 2008-10-22 14:25:12 +0200 (Wed, 22 Oct 2008) | 24 lines

* Patch from Sergei Gorelkin
xmlutils.pp:
+ Added THashTable - a simple hashed container with WideString keys.

dom.pp:
* Use the hash table instead of a sorted list for storing document IDs.
* Replaced all TLists by TFPList (which is smaller and faster).
* Fixed TDOMElement.RemoveAttributeNode to throw NOT_FOUND_ERR when
the requested node is not one of the element's attributes.
+ Added node read-only checks where required by the specs, this fixes
about 50 DOM tests.

xmlread.pp:

* Got rid of TXMLCharSource.FReloadHook, the corresponding procedure may
be called directly.
* Used a separate buffer to store the entity value literals, this
enables correct including of external PEs that have a text declaration
at the beginning.
* Some refactoring: ParseAttribute has been split into a separate
procedure, ProcessTextAndRefs was merged into ParseContent.



................
r11943 | marco | 2008-10-22 18:30:20 +0200 (Wed, 22 Oct 2008) | 2 lines

* patch from peter

................
r11944 | marco | 2008-10-22 19:15:59 +0200 (Wed, 22 Oct 2008) | 2 lines

* Modernized debug code, fixed crash for .chms without index.

................
r11945 | marco | 2008-10-22 19:19:13 +0200 (Wed, 22 Oct 2008) | 2 lines

* updated all makefile.fpc versions to 2.2.2 for fppkg compat.

................
r11946 | marco | 2008-10-22 19:29:31 +0200 (Wed, 22 Oct 2008) | 2 lines

* Apparantly this version can't be skipped. Fix later.

................
r11947 | marco | 2008-10-22 19:32:15 +0200 (Wed, 22 Oct 2008) | 2 lines

* regened makefiles to propagate makefile versions

................
r11948 | marco | 2008-10-22 20:16:54 +0200 (Wed, 22 Oct 2008) | 2 lines

* First batch of fpmake improvements. Mostly adding examples and fixing small omissions.

................
r11949 | marco | 2008-10-23 00:08:05 +0200 (Thu, 23 Oct 2008) | 3 lines

* More fpmake fixes. Exampledirs and includefiles mostly fixed for these.
gdbint moves two examples from src to exampledir + makefile fix.

................
r11950 | marco | 2008-10-23 16:03:16 +0200 (Thu, 23 Oct 2008) | 2 lines

* 3rd batch of fpmake updates (demoes + includepaths)

................
r11951 | jonas | 2008-10-23 16:22:00 +0200 (Thu, 23 Oct 2008) | 5 lines

- reverted r11751, 11755 and 11759 because
a) they should not be necessary and only hide the symptoms of a not
understood bug on some platforms
b) doing so breaks things on some other platforms

................
r11952 | marco | 2008-10-23 18:12:45 +0200 (Thu, 23 Oct 2008) | 2 lines

* fpmakes batch #4. Most work now, but toplevel does not. Dependancies also not complete

................
r11953 | peter | 2008-10-23 21:20:15 +0200 (Thu, 23 Oct 2008) | 2 lines

* log configuration settings

................
r11954 | peter | 2008-10-23 21:32:07 +0200 (Thu, 23 Oct 2008) | 2 lines

* remove debug writeln

................
r11955 | peter | 2008-10-23 21:43:50 +0200 (Thu, 23 Oct 2008) | 2 lines

* added missing directory prefix for ALLPACKAGES define

................
r11956 | peter | 2008-10-23 22:05:36 +0200 (Thu, 23 Oct 2008) | 2 lines

* use stdout only

................
r11957 | peter | 2008-10-23 22:05:59 +0200 (Thu, 23 Oct 2008) | 2 lines

* use stdout only

................
r11958 | marco | 2008-10-23 22:15:59 +0200 (Thu, 23 Oct 2008) | 2 lines

* fpmake: Small fixes + first round of manifests

................
r11959 | peter | 2008-10-23 22:41:35 +0200 (Thu, 23 Oct 2008) | 2 lines

* use eventlog.inc for Unix,Win32,Win64. other targets use felog.inc

................
r11960 | karoly | 2008-10-23 22:50:51 +0200 (Thu, 23 Oct 2008) | 2 lines

+ made FV to compile on MorphOS

................
r11961 | peter | 2008-10-23 23:00:40 +0200 (Thu, 23 Oct 2008) | 2 lines

* missing quote

................
r11962 | marco | 2008-10-23 23:09:14 +0200 (Thu, 23 Oct 2008) | 2 lines

* FCL fpmake manifests

................
r11963 | marco | 2008-10-24 00:27:48 +0200 (Fri, 24 Oct 2008) | 2 lines

* Some more manifests

................
r11964 | karoly | 2008-10-24 01:40:36 +0200 (Fri, 24 Oct 2008) | 9 lines

* fixes and optimizations in video unit
+ now properly sets ScreenColor to true
+ optimized DrawChar() to use BltTemplate() instead of WritePixel() loops
this results in less gfx operations, major speedup, and elimination of
possible display trashing (WritePixel() doesn't wait for blit operations
to finish)
+ updated vgafont in videodata.inc to be in proper format for BltTemplate()
+ other tweaks here and there

................
r11965 | karoly | 2008-10-24 02:26:20 +0200 (Fri, 24 Oct 2008) | 2 lines

+ added a quick'n'dirty Sysutils.Sleep() implementation

................
r11966 | karoly | 2008-10-24 03:34:07 +0200 (Fri, 24 Oct 2008) | 2 lines

+ changes to make the IDE compile on MorphOS (probably doesn't work yet)

................
r11967 | marco | 2008-10-24 12:20:28 +0200 (Fri, 24 Oct 2008) | 1 line

* allow disabling of mirrors.xml when a custom remoterepository is configured
................
r11968 | karoly | 2008-10-24 15:07:59 +0200 (Fri, 24 Oct 2008) | 2 lines

+ quick & dirty UserScreen implementation for Amiga/MorphOS

................
r11969 | marco | 2008-10-24 17:36:34 +0200 (Fri, 24 Oct 2008) | 2 lines

* memleak in chm support fixed, added some comments

................
r11970 | karoly | 2008-10-24 18:56:59 +0200 (Fri, 24 Oct 2008) | 4 lines

+ minor Amiga/MorphOS FV tweaks:
* GiveUpTimeSlice() now Sleep()s for shorter time
* Amiga "all files" are "*" and not "*.*", this fixes file dialogs somewhat

................
r11971 | karoly | 2008-10-24 19:44:04 +0200 (Fri, 24 Oct 2008) | 6 lines

+ minor IDE tweaks
* define Amiga and MorphOS as FSCaseInsensitve systems
* get EOL and DirSep from System unit, and do not redefine it
with tons of $ifdefs
* for temp files, use T: on Amiga and MorphOS

................
r11972 | Almindor | 2008-10-24 22:15:11 +0200 (Fri, 24 Oct 2008) | 2 lines

* apply patch for libXi pascal interface from Ido Kanner

................
r11973 | karoly | 2008-10-25 02:49:42 +0200 (Sat, 25 Oct 2008) | 5 lines

+ more work on video and keyboard units
* less debug during init
* SysGetShiftState() support, reworked RawKeyCode support
* support for more keys, with qualifiers. for example some clipboard operations work now in FV.

................
r11974 | marco | 2008-10-26 14:49:03 +0100 (Sun, 26 Oct 2008) | 2 lines

* added test for bug #11711, to help fix regression for 12385

................
r11975 | marco | 2008-10-26 21:18:05 +0100 (Sun, 26 Oct 2008) | 2 lines

* Another batch of manifests added to the respective fpmakes. Until httpd22.

................
r11976 | marco | 2008-10-26 21:54:00 +0100 (Sun, 26 Oct 2008) | 2 lines

* more manifests, up to libcurl now

................
r11977 | vincents | 2008-10-26 22:03:48 +0100 (Sun, 26 Oct 2008) | 1 line

* fixed compilation on win64
................
r11978 | vincents | 2008-10-26 22:06:57 +0100 (Sun, 26 Oct 2008) | 1 line

* enabled compilation of httpd packages on win64, so fcl-web compiles again
................
r11979 | marco | 2008-10-26 23:15:47 +0100 (Sun, 26 Oct 2008) | 2 lines

* removed some 1.0 defines

................
r11980 | karoly | 2008-10-27 00:47:41 +0100 (Mon, 27 Oct 2008) | 2 lines

+ initial version of Amiga sysmsgs support

................
r11981 | karoly | 2008-10-27 10:27:07 +0100 (Mon, 27 Oct 2008) | 5 lines

+ ObtainPen()'s 2nd argument is actually a longint, not cardinal,
because -1 is a valid argument for this function there.
This bug is also in the original AmigaOS C SDK, which specifies
this argument as ULONG, and defines -1 as valid argument for it.

................
r11982 | karoly | 2008-10-27 10:30:46 +0100 (Mon, 27 Oct 2008) | 5 lines

+ Huge video unit rework for Amiga/MorphOS
* removed tons of Win32 unit leftovers, and other cleanups
* cursor handling fixes, additions (like changing cursor shapes)
* added initial support for sysmsgs

................
r11983 | karoly | 2008-10-27 10:33:36 +0100 (Mon, 27 Oct 2008) | 4 lines

+ Some keyboard unit rework
* moved more RawKeyCode handling into our nice table from custom code
* initial sysmsg support (SysClose, for now)

................
r11984 | marco | 2008-10-27 13:32:57 +0100 (Mon, 27 Oct 2008) | 2 lines

* TLogBrush.lbHatch should be ulong_ptr (win64 problem)

................
r11985 | marco | 2008-10-27 14:43:01 +0100 (Mon, 27 Oct 2008) | 1 line

* 64-bit fix for extlogpen
................
r11987 | joost | 2008-10-27 16:52:58 +0100 (Mon, 27 Oct 2008) | 1 line

* Partly reverted r11927, in which perfectly valid code was replaced with a one-line obfuscation which can cause an AV
................
r11988 | vincents | 2008-10-27 22:49:20 +0100 (Mon, 27 Oct 2008) | 1 line

* fixed memleak
................
r11989 | marco | 2008-10-28 15:28:38 +0100 (Tue, 28 Oct 2008) | 2 lines

* fix for several -W macro's.

................
r11990 | michael | 2008-10-28 16:40:47 +0100 (Tue, 28 Oct 2008) | 1 line

* Added TIFF reader/Writer from Mattias gaertner
................
r11991 | peter | 2008-10-28 17:31:55 +0100 (Tue, 28 Oct 2008) | 2 lines

* fixed crash in error message when specialization is not resolved

................
r11993 | peter | 2008-10-29 10:59:42 +0100 (Wed, 29 Oct 2008) | 2 lines

* new bug

................
r11994 | Almindor | 2008-10-29 20:17:53 +0100 (Wed, 29 Oct 2008) | 2 lines

* proper fix for the kqueue struct. Use PtrUInt and PtrInt respectively...

................
r11995 | andrew | 2008-10-30 02:43:54 +0100 (Thu, 30 Oct 2008) | 3 lines

Fixed a bug in chmfilewriter.pas where an uninitialized variable was used. I eliminated the variable.


................
r11996 | Almindor | 2008-10-30 13:42:13 +0100 (Thu, 30 Oct 2008) | 2 lines

* fix AssignPipe for FreeBSD

................
r11997 | karoly | 2008-10-30 21:52:22 +0100 (Thu, 30 Oct 2008) | 3 lines

+ support for changing window size in keyboard and video units
* still has bugs, but good for a start

................
r11998 | karoly | 2008-10-30 21:56:01 +0100 (Thu, 30 Oct 2008) | 2 lines

+ support for SysResize event for Amiga

................
r11999 | karoly | 2008-10-30 22:08:53 +0100 (Thu, 30 Oct 2008) | 2 lines

+ have proper bullet on Amiga and MorphOS too

................
r12000 | karoly | 2008-10-30 22:59:59 +0100 (Thu, 30 Oct 2008) | 2 lines

+ fixed SysUpdateScreen(true) refresh bugs

................
r12001 | Almindor | 2008-10-30 23:25:40 +0100 (Thu, 30 Oct 2008) | 3 lines

* use iterarive numbering to find first usable libaspell.so.xx on linux
* don't use specific libaspell.so.xx on BSDs (they have dev by default)

................
r12002 | Almindor | 2008-10-31 14:28:00 +0100 (Fri, 31 Oct 2008) | 2 lines

* revert previous AssignPipe change, will need different approach

................
r12003 | Almindor | 2008-10-31 19:19:44 +0100 (Fri, 31 Oct 2008) | 2 lines

* remove unused oldfpccall from amd64 BSD syscall code

................
r12004 | Almindor | 2008-10-31 23:35:30 +0100 (Fri, 31 Oct 2008) | 2 lines

* fix compilation and bug in new aspell lib loading code

................
r12005 | michael | 2008-11-01 12:05:21 +0100 (Sat, 01 Nov 2008) | 1 line

* Fixed strtotime. Last character was never taken into account
................
r12006 | marco | 2008-11-01 12:43:43 +0100 (Sat, 01 Nov 2008) | 2 lines

* pipe cleanup from Ales, also fixes TProcess for AMD64.

................
r12007 | marco | 2008-11-01 12:53:21 +0100 (Sat, 01 Nov 2008) | 2 lines

* another part of Almindor's fix.

................
r12008 | jonas | 2008-11-01 18:08:26 +0100 (Sat, 01 Nov 2008) | 2 lines

* fixed invalid type cast in case of errors in a library's export section

................
r12009 | jonas | 2008-11-01 19:38:32 +0100 (Sat, 01 Nov 2008) | 7 lines

+ "weakexternal" support for imported procedures and variables.
the syntax is exactly the same as for "external", except for
the keyword. It is currently only active for Darwin targets.
It should also work at least for Linux targets, but only with
the GNU assembler (which is why it is not activated there)
+ test for this functionality

................
r12010 | michael | 2008-11-01 23:15:23 +0100 (Sat, 01 Nov 2008) | 1 line

* Added expression parser
................
r12011 | michael | 2008-11-01 23:28:04 +0100 (Sat, 01 Nov 2008) | 1 line

* Some more explanations
................
r12012 | jonas | 2008-11-02 10:23:26 +0100 (Sun, 02 Nov 2008) | 2 lines

* regenerated using more recent fpcmake

................
r12013 | florian | 2008-11-02 10:23:34 +0100 (Sun, 02 Nov 2008) | 2 lines

+ fixed zlib for windows, resolves #12451
+ test
................
r12015 | florian | 2008-11-02 10:41:30 +0100 (Sun, 02 Nov 2008) | 1 line

* tabs/spaces fixed
................
r12016 | florian | 2008-11-02 10:42:49 +0100 (Sun, 02 Nov 2008) | 1 line

* newline changes
................
r12017 | florian | 2008-11-02 13:36:31 +0100 (Sun, 02 Nov 2008) | 1 line

+ check if forward definitions and real definitions have the same type, resolves #11970
................
r12019 | jonas | 2008-11-02 15:23:55 +0100 (Sun, 02 Nov 2008) | 3 lines

+ test to make sure any future fix of mantis #12508 takes this special
case into account

................
r12020 | jonas | 2008-11-02 15:50:17 +0100 (Sun, 02 Nov 2008) | 3 lines

* fixed node complexity calculation for certain inlinenodes
(mantis 12404)

................
r12021 | jonas | 2008-11-02 16:13:20 +0100 (Sun, 02 Nov 2008) | 2 lines

* disabled last safecall code for non-windows (mantis #12237)

................
r12022 | jonas | 2008-11-03 21:08:02 +0100 (Mon, 03 Nov 2008) | 2 lines

* formatting fixes of requirements

................
r12023 | jonas | 2008-11-03 21:13:03 +0100 (Mon, 03 Nov 2008) | 2 lines

* put program header in the right place

................
r12024 | jonas | 2008-11-03 21:19:38 +0100 (Mon, 03 Nov 2008) | 2 lines

* more program header fixes

................
r12025 | jonas | 2008-11-03 22:18:27 +0100 (Mon, 03 Nov 2008) | 12 lines

* delay verbosity changes just like localswitches changes
* store a node's verbosity in the node so that e.g. disabling warnings
also disables warnings for this node in pass_1
(the above together fix mantis #12076)
* save/restore verbosity with {$push}/{$pop} (mantis #12075)
* if warnings/notes/hints are turned off, also do not count encountered
ones for the totals (otherwise -Sew cannot be used properly in
combination with {$warnings off}, because disabled warnings will still
trigger a compiler error) -- this required adding -vw/-vn/-vh to all
tests using -Sew/-Sen/-Seh
- removed some superfluous state saving/restoring from firstpass()

................
r12026 | michael | 2008-11-04 19:33:05 +0100 (Tue, 04 Nov 2008) | 17 lines

* Patch from Sergei Gorelkin:
src/xmlread.pp, src/dom.pp
* Improvements to attribute processing: attributes are now validated as
they come. This enables reporting of the corresponding validation
errors at correct positions (previously everything was reported at the
end of element start-tag).
* Search for a declaration for attribute, not for an attribute
corresponding to the declaration. This reduces number of lookups
(because unspecified attributes are not searched) and obsoletes the
need in FDeclared field on every attribute.

tests/domunit.pp, tests/testgen.pp:

* Various improvements required to support converting of the
DOM level 3 XPath module.


................
r12027 | peter | 2008-11-06 20:46:31 +0100 (Thu, 06 Nov 2008) | 2 lines

* rename aktobjectdef to current_objectdef

................
r12028 | jonas | 2008-11-06 22:03:10 +0100 (Thu, 06 Nov 2008) | 3 lines

* implementation of 32x32->64 multiplication for i386 based on patch
by Sergei Gorelkin

................
r12029 | peter | 2008-11-07 00:25:00 +0100 (Fri, 07 Nov 2008) | 2 lines

* tobjectdef.set_parent also inherits oo_can_have_published

................
r12030 | peter | 2008-11-07 00:25:50 +0100 (Fri, 07 Nov 2008) | 2 lines

* refactor, no functional changes

................
r12031 | peter | 2008-11-07 01:14:08 +0100 (Fri, 07 Nov 2008) | 2 lines

* remove obsolete bt_specialize

................
r12032 | jonas | 2008-11-07 21:00:06 +0100 (Fri, 07 Nov 2008) | 3 lines

* changed test so it also produces a warning (and hence fails) on 64 bit
platforms

................
r12033 | paul | 2008-11-08 11:10:24 +0100 (Sat, 08 Nov 2008) | 1 line

gtk2: add g_slice_xxx functions from glib 2.10
................
r12034 | marco | 2008-11-08 12:52:59 +0100 (Sat, 08 Nov 2008) | 1 line

* fix for 12480, unify multiple styles of stderr debugmsgs
................
r12035 | marco | 2008-11-08 14:58:46 +0100 (Sat, 08 Nov 2008) | 2 lines

* splitting of long lines when copying a TStringlist to a dos (shortstring) eq.

................
r12036 | jonas | 2008-11-08 23:20:47 +0100 (Sat, 08 Nov 2008) | 6 lines

* always specify an explicit alignment for tgobj.gettemp (so e.g.
shortstring temps don't get maximum alignment)
* changed some gettemptyed() calls into gettemp() calls (gettemptyped
means that this temp can only be used for temps of that type,
which is necessary for refcounted types but not for floats)

................
r12037 | jonas | 2008-11-09 10:46:47 +0100 (Sun, 09 Nov 2008) | 3 lines

* fixed setting EInoutError.ErrorCode (mantis #12575, thanks to
Bart Broersma for the analysis)

................
r12038 | jonas | 2008-11-09 11:19:29 +0100 (Sun, 09 Nov 2008) | 8 lines

* explicitly check whether the methodpointer isn't the same as the result
before optimising function result assignment, because at this point the
hidden self parameter is not yet inserted (mantis #12597)
* changed ttypeconvnode.actualtargetnode to use the same logic as what
is used to determine whether something can be assigned to the result
of a type conversion (so the above check also works if the methodpointer
contains a typecast to a different object type)

................
r12039 | jonas | 2008-11-09 11:24:23 +0100 (Sun, 09 Nov 2008) | 4 lines

* only make the target of a type conversion not regable after checking
whether it's assignable if 1) the size/sign changes (was already the
case) and 2) in case something actually can be assigned to it

................
r12040 | florian | 2008-11-09 11:24:59 +0100 (Sun, 09 Nov 2008) | 3 lines

* fixes assembling of mov ax,<mem16>
* fixes assembling of test <mem8>,reg8; resolves #11786

................
r12043 | florian | 2008-11-09 22:14:45 +0100 (Sun, 09 Nov 2008) | 2 lines

* fixes taking the address of an assembler block defined label
* create short jumps also for asm blocks, thanks to Sergej Gorelkin for the patch, resolves #11638
................
r12045 | peter | 2008-11-09 23:07:36 +0100 (Sun, 09 Nov 2008) | 4 lines

* refactor the forward type declaration handling, remove
global typecanbeforward and move 'class of ..' parsing
to ptype

................

git-svn-id: branches/llvm@12046 -

Jonas Maebe 17 жил өмнө
parent
commit
11083d88b3
100 өөрчлөгдсөн 2831 нэмэгдсэн , 1320 устгасан
  1. 278 21
      .gitattributes
  2. 0 14
      .gitignore
  3. 6 2
      Makefile
  4. 1 1
      Makefile.fpc
  5. 8 4
      compiler/Makefile
  6. 3 3
      compiler/Makefile.fpc
  7. 1 1
      compiler/aasmbase.pas
  8. 32 2
      compiler/aasmdata.pas
  9. 2 2
      compiler/aasmtai.pas
  10. 35 3
      compiler/aggas.pas
  11. 8 10
      compiler/aopt.pas
  12. 4 2
      compiler/aoptda.pas
  13. 29 17
      compiler/aoptobj.pas
  14. 13 12
      compiler/arm/aasmcpu.pas
  15. 38 1
      compiler/arm/agarmgas.pas
  16. 20 0
      compiler/arm/aoptcpu.pas
  17. 64 1
      compiler/arm/armatt.inc
  18. 63 0
      compiler/arm/armatts.inc
  19. 129 0
      compiler/arm/armins.dat
  20. 64 1
      compiler/arm/armop.inc
  21. 127 13
      compiler/arm/cgcpu.pas
  22. 1 1
      compiler/arm/cpubase.pas
  23. 6 2
      compiler/arm/cpupara.pas
  24. 1 1
      compiler/arm/cpupi.pas
  25. 3 0
      compiler/arm/cputarg.pas
  26. 0 1
      compiler/arm/narmcon.pas
  27. 1 1
      compiler/arm/narmmat.pas
  28. 4 8
      compiler/arm/raarmgas.pas
  29. 0 5
      compiler/assemble.pas
  30. 1 1
      compiler/avr/cpubase.pas
  31. 1 0
      compiler/avr/cpunode.pas
  32. 26 83
      compiler/avr/navradd.pas
  33. 264 0
      compiler/avr/navrmat.pas
  34. 4 4
      compiler/avr/raavrgas.pas
  35. 37 0
      compiler/avr/rgcpu.pas
  36. 9 7
      compiler/ccharset.pas
  37. 279 45
      compiler/cclasses.pas
  38. 1 1
      compiler/cfidwarf.pas
  39. 3 2
      compiler/cfileutl.pas
  40. 3 3
      compiler/cg64f32.pas
  41. 4 2
      compiler/cgbase.pas
  42. 78 37
      compiler/cgobj.pas
  43. 28 0
      compiler/cmsgs.pas
  44. 6 3
      compiler/comphook.pas
  45. 2 2
      compiler/compiler.pas
  46. 5 0
      compiler/compinnr.inc
  47. 1 1
      compiler/cp1251.pas
  48. 1 1
      compiler/cp437.pas
  49. 1 1
      compiler/cp850.pas
  50. 1 1
      compiler/cp866.pas
  51. 1 1
      compiler/cp8859_1.pas
  52. 1 1
      compiler/cp8859_5.pas
  53. 65 65
      compiler/crefs.pas
  54. 7 9
      compiler/cutils.pas
  55. 6 3
      compiler/dbgdwarf.pas
  56. 11 11
      compiler/dbgstabs.pas
  57. 20 15
      compiler/defcmp.pas
  58. 26 3
      compiler/defutil.pas
  59. 2 2
      compiler/expunix.pas
  60. 6 0
      compiler/fmodule.pas
  61. 16 2
      compiler/fpcdefs.inc
  62. 3 3
      compiler/fppu.pas
  63. 13 7
      compiler/globals.pas
  64. 24 8
      compiler/globtype.pas
  65. 62 51
      compiler/htypechk.pas
  66. 3 4
      compiler/i386/cgcpu.pas
  67. 8 1
      compiler/i386/cpupara.pas
  68. 8 10
      compiler/i386/csopt386.pas
  69. 2 2
      compiler/i386/daopt386.pas
  70. 1 1
      compiler/i386/i386nop.inc
  71. 10 3
      compiler/i386/i386tab.inc
  72. 60 17
      compiler/i386/n386add.pas
  73. 29 11
      compiler/i386/n386mem.pas
  74. 2 72
      compiler/i386/n386set.pas
  75. 15 20
      compiler/i386/popt386.pas
  76. 2 2
      compiler/i386/ra386int.pas
  77. 9 5
      compiler/link.pas
  78. 2 2
      compiler/m68k/aasmcpu.pas
  79. 10 8
      compiler/m68k/cgcpu.pas
  80. 7 7
      compiler/m68k/cpubase.pas
  81. 1 1
      compiler/m68k/cpupara.pas
  82. 1 1
      compiler/m68k/n68kcnv.pas
  83. 1 1
      compiler/m68k/n68kmat.pas
  84. 1 1
      compiler/mips/cpubase.pas
  85. 39 10
      compiler/msg/errore.msg
  86. 8 3
      compiler/msgidx.inc
  87. 273 267
      compiler/msgtxt.inc
  88. 47 24
      compiler/nadd.pas
  89. 5 15
      compiler/nbas.pas
  90. 31 34
      compiler/ncal.pas
  91. 1 1
      compiler/ncgbas.pas
  92. 10 5
      compiler/ncgcal.pas
  93. 8 21
      compiler/ncgcnv.pas
  94. 60 147
      compiler/ncgcon.pas
  95. 30 27
      compiler/ncgflw.pas
  96. 76 22
      compiler/ncginl.pas
  97. 61 29
      compiler/ncgld.pas
  98. 4 4
      compiler/ncgmat.pas
  99. 46 37
      compiler/ncgmem.pas
  100. 1 1
      compiler/ncgopt.pas

+ 278 - 21
.gitattributes

@@ -90,6 +90,7 @@ compiler/avr/cpupi.pas svneol=native#text/plain
 compiler/avr/cputarg.pas svneol=native#text/plain
 compiler/avr/itcpugas.pas svneol=native#text/plain
 compiler/avr/navradd.pas svneol=native#text/plain
+compiler/avr/navrmat.pas svneol=native#text/plain
 compiler/avr/raavr.pas svneol=native#text/plain
 compiler/avr/raavrgas.pas svneol=native#text/plain
 compiler/avr/ravrcon.inc svneol=native#text/plain
@@ -105,6 +106,7 @@ compiler/avr/rgcpu.pas svneol=native#text/plain
 compiler/browcol.pas svneol=native#text/plain
 compiler/bsdcompile -text
 compiler/catch.pas svneol=native#text/plain
+compiler/ccharset.pas svneol=native#text/plain
 compiler/cclasses.pas svneol=native#text/plain
 compiler/cfidwarf.pas svneol=native#text/plain
 compiler/cfileutl.pas svneol=native#text/plain
@@ -112,7 +114,6 @@ compiler/cg64f32.pas svneol=native#text/plain
 compiler/cgbase.pas svneol=native#text/plain
 compiler/cgobj.pas svneol=native#text/plain
 compiler/cgutils.pas svneol=native#text/plain
-compiler/charset.pas svneol=native#text/plain
 compiler/cmsgs.pas svneol=native#text/plain
 compiler/comphook.pas svneol=native#text/plain
 compiler/compiler.pas svneol=native#text/plain
@@ -314,8 +315,8 @@ compiler/optbase.pas svneol=native#text/plain
 compiler/optcse.pas svneol=native#text/plain
 compiler/optdfa.pas svneol=native#text/plain
 compiler/options.pas svneol=native#text/plain
+compiler/optloop.pas svneol=native#text/plain
 compiler/opttail.pas svneol=native#text/plain
-compiler/optunrol.pas svneol=native#text/plain
 compiler/optutils.pas svneol=native#text/plain
 compiler/owar.pas svneol=native#text/plain
 compiler/owbase.pas svneol=native#text/plain
@@ -410,6 +411,7 @@ compiler/ppc.conf -text
 compiler/ppc.dof -text
 compiler/ppc68k.lpi svneol=native#text/plain
 compiler/ppcarm.lpi svneol=native#text/plain
+compiler/ppcavr.lpi svneol=native#text/plain
 compiler/ppcgen/aasmcpu.pas svneol=native#text/plain
 compiler/ppcgen/agppcgas.pas svneol=native#text/plain
 compiler/ppcgen/cgppc.pas svneol=native#text/plain
@@ -496,7 +498,7 @@ compiler/systems/i_haiku.pas svneol=native#text/plain
 compiler/systems/i_linux.pas svneol=native#text/plain
 compiler/systems/i_macos.pas svneol=native#text/plain
 compiler/systems/i_morph.pas svneol=native#text/plain
-compiler/systems/i_nds.pas -text
+compiler/systems/i_nds.pas svneol=native#text/plain
 compiler/systems/i_nwl.pas svneol=native#text/plain
 compiler/systems/i_nwm.pas svneol=native#text/plain
 compiler/systems/i_os2.pas svneol=native#text/plain
@@ -519,7 +521,7 @@ compiler/systems/t_haiku.pas svneol=native#text/plain
 compiler/systems/t_linux.pas svneol=native#text/plain
 compiler/systems/t_macos.pas svneol=native#text/plain
 compiler/systems/t_morph.pas svneol=native#text/plain
-compiler/systems/t_nds.pas svneol=native#text/x-pascal
+compiler/systems/t_nds.pas svneol=native#text/plain
 compiler/systems/t_nwl.pas svneol=native#text/plain
 compiler/systems/t_nwm.pas svneol=native#text/plain
 compiler/systems/t_os2.pas svneol=native#text/plain
@@ -533,14 +535,14 @@ compiler/tgobj.pas svneol=native#text/plain
 compiler/tokens.pas svneol=native#text/plain
 compiler/utils/Makefile svneol=native#text/plain
 compiler/utils/Makefile.fpc svneol=native#text/plain
-compiler/utils/README -text
-compiler/utils/dummyas.pp -text
+compiler/utils/README svneol=native#text/plain
+compiler/utils/dummyas.pp svneol=native#text/plain
 compiler/utils/fixlog.pp svneol=native#text/plain
 compiler/utils/fixmsg.pp svneol=native#text/plain
 compiler/utils/fixnasm.pp svneol=native#text/plain
 compiler/utils/fixtab.pp svneol=native#text/plain
 compiler/utils/fpc.cft svneol=native#text/plain
-compiler/utils/fpc.mpw -text
+compiler/utils/fpc.mpw svneol=native#text/plain
 compiler/utils/fpc.pp svneol=native#text/plain
 compiler/utils/fpccfg.inc svneol=native#text/plain
 compiler/utils/fpcfg.inc svneol=native#text/plain
@@ -563,11 +565,11 @@ compiler/utils/mkx86ins.pp svneol=native#text/plain
 compiler/utils/mkx86reg.pp svneol=native#text/plain
 compiler/utils/msg2inc.pp svneol=native#text/plain
 compiler/utils/msgdif.pp svneol=native#text/plain
-compiler/utils/msgused.pl -text
+compiler/utils/msgused.pl svneol=native#text/plain
 compiler/utils/ppudump.pp svneol=native#text/plain
 compiler/utils/ppufiles.pp svneol=native#text/plain
 compiler/utils/ppumove.pp svneol=native#text/plain
-compiler/utils/samplecfg -text
+compiler/utils/samplecfg svneol=native#text/plain
 compiler/utils/usubst.pp svneol=native#text/plain
 compiler/verbose.pas svneol=native#text/plain
 compiler/version.pas svneol=native#text/plain
@@ -698,11 +700,9 @@ ide/globdir.inc svneol=native#text/plain
 ide/gplprog.pt -text
 ide/gplunit.pt -text
 ide/grep.tdf -text
-ide/maketp.bat -text
 ide/pmode.pas svneol=native#text/plain
 ide/program.pt -text
 ide/readme.ide -text
-ide/realintr.inc svneol=native#text/plain
 ide/test.pas svneol=native#text/plain
 ide/test1.pas svneol=native#text/plain
 ide/test2.pas svneol=native#text/plain
@@ -711,6 +711,7 @@ ide/unit.pt -text
 ide/vesa.pas svneol=native#text/plain
 ide/wansi.pas svneol=native#text/plain
 ide/wcedit.pas svneol=native#text/plain
+ide/wchmhwrap.pas svneol=native#text/plain
 ide/wconsole.pas svneol=native#text/plain
 ide/wconsts.pas svneol=native#text/plain
 ide/wconstse.inc svneol=native#text/plain
@@ -938,6 +939,7 @@ packages/cdrom/src/cdromioctl.pp svneol=native#text/plain
 packages/cdrom/src/cdromlin.inc svneol=native#text/plain
 packages/cdrom/src/cdromw32.inc svneol=native#text/plain
 packages/cdrom/src/discid.pp svneol=native#text/plain
+packages/cdrom/src/fpcddb.pp svneol=native#text/plain
 packages/cdrom/src/lincd.pp svneol=native#text/plain
 packages/cdrom/src/major.pp svneol=native#text/plain
 packages/cdrom/src/scsidefs.pp svneol=native#text/plain
@@ -1019,6 +1021,7 @@ packages/fcl-base/examples/dparser.pp svneol=native#text/plain
 packages/fcl-base/examples/dsockcli.pp svneol=native#text/plain
 packages/fcl-base/examples/dsocksvr.pp svneol=native#text/plain
 packages/fcl-base/examples/fpdoc.dtd -text
+packages/fcl-base/examples/fpexprpars.txt svneol=native#text/plain
 packages/fcl-base/examples/fstream.pp svneol=native#text/plain
 packages/fcl-base/examples/htdump.pp svneol=native#text/plain
 packages/fcl-base/examples/intl/Makefile svneol=native#text/plain
@@ -1063,6 +1066,7 @@ packages/fcl-base/examples/testbs.pp svneol=native#text/plain
 packages/fcl-base/examples/testcgi.html -text
 packages/fcl-base/examples/testcgi.pp svneol=native#text/plain
 packages/fcl-base/examples/testcont.pp svneol=native#text/plain
+packages/fcl-base/examples/testexprpars.pp svneol=native#text/plain
 packages/fcl-base/examples/testez.pp svneol=native#text/plain
 packages/fcl-base/examples/testhres.pp svneol=native#text/plain
 packages/fcl-base/examples/testnres.pp svneol=native#text/plain
@@ -1089,10 +1093,8 @@ packages/fcl-base/examples/tstelgtk.pp svneol=native#text/plain
 packages/fcl-base/examples/txmlreg.pp svneol=native#text/plain
 packages/fcl-base/examples/xmldump.pp svneol=native#text/plain
 packages/fcl-base/fpmake.pp svneol=native#text/plain
-packages/fcl-base/src/amiga/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/avl_tree.pp svneol=native#text/plain
 packages/fcl-base/src/base64.pp svneol=native#text/plain
-packages/fcl-base/src/beos/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/blowfish.pp svneol=native#text/plain
 packages/fcl-base/src/bufstream.pp svneol=native#text/plain
 packages/fcl-base/src/cachecls.pp svneol=native#text/plain
@@ -1101,22 +1103,18 @@ packages/fcl-base/src/custapp.pp svneol=native#text/plain
 packages/fcl-base/src/daemonapp.pp svneol=native#text/plain
 packages/fcl-base/src/eventlog.pp svneol=native#text/plain
 packages/fcl-base/src/felog.inc svneol=native#text/plain
+packages/fcl-base/src/fpexprpars.pp svneol=native#text/plain
 packages/fcl-base/src/fptimer.pp svneol=native#text/plain
 packages/fcl-base/src/gettext.pp svneol=native#text/plain
 packages/fcl-base/src/go32v2/custapp.inc svneol=native#text/plain
-packages/fcl-base/src/go32v2/eventlog.inc svneol=native#text/plain
-packages/fcl-base/src/haiku/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/idea.pp svneol=native#text/plain
 packages/fcl-base/src/inicol.pp svneol=native#text/plain
 packages/fcl-base/src/inifiles.pp svneol=native#text/plain
 packages/fcl-base/src/iostream.pp svneol=native#text/plain
 packages/fcl-base/src/libtar.pp svneol=native#text/plain
 packages/fcl-base/src/maskutils.pp svneol=native#text/plain
-packages/fcl-base/src/morphos/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/netware/custapp.inc svneol=native#text/plain
-packages/fcl-base/src/netware/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/netwlibc/custapp.inc svneol=native#text/plain
-packages/fcl-base/src/netwlibc/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/os2/custapp.inc svneol=native#text/plain
 packages/fcl-base/src/os2/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/pooledmm.pp svneol=native#text/plain
@@ -1139,7 +1137,6 @@ packages/fcl-base/src/win/fclel.mc -text
 packages/fcl-base/src/win/fclel.rc -text
 packages/fcl-base/src/win/fclel.res -text
 packages/fcl-base/src/win/fileinfo.pp svneol=native#text/plain
-packages/fcl-base/src/wince/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/wince/fileinfo.pp svneol=native#text/plain
 packages/fcl-base/src/wtex.pp svneol=native#text/plain
 packages/fcl-db/Makefile svneol=native#text/plain
@@ -1162,19 +1159,25 @@ packages/fcl-db/src/base/dsparams.inc svneol=native#text/plain
 packages/fcl-db/src/base/fields.inc svneol=native#text/plain
 packages/fcl-db/src/base/fpmake.inc svneol=native#text/plain
 packages/fcl-db/src/base/fpmake.pp svneol=native#text/plain
+packages/fcl-db/src/base/sqlscript.pp svneol=native#text/plain
+packages/fcl-db/src/base/xmldatapacketreader.pp svneol=native#text/plain
 packages/fcl-db/src/codegen/Makefile svneol=native#text/plain
 packages/fcl-db/src/codegen/Makefile.fpc svneol=native#text/plain
+packages/fcl-db/src/codegen/buildddcg.lpi svneol=native#text/plain
+packages/fcl-db/src/codegen/buildddcg.lpr svneol=native#text/plain
 packages/fcl-db/src/codegen/fpcgcreatedbf.pp svneol=native#text/plain
 packages/fcl-db/src/codegen/fpcgdbcoll.pp svneol=native#text/plain
 packages/fcl-db/src/codegen/fpcgsqlconst.pp svneol=native#text/plain
 packages/fcl-db/src/codegen/fpcgtiopf.pp svneol=native#text/plain
 packages/fcl-db/src/codegen/fpddcodegen.pp svneol=native#text/plain
+packages/fcl-db/src/codegen/fpddpopcode.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/Makefile svneol=native#text/plain
 packages/fcl-db/src/datadict/Makefile.fpc svneol=native#text/plain
 packages/fcl-db/src/datadict/buildd.lpi svneol=native#text/plain
 packages/fcl-db/src/datadict/buildd.lpr svneol=native#text/plain
 packages/fcl-db/src/datadict/fpdatadict.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpdddbf.pp svneol=native#text/plain
+packages/fcl-db/src/datadict/fpdddiff.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddfb.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddmysql40.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddmysql41.pp svneol=native#text/plain
@@ -1326,7 +1329,9 @@ packages/fcl-db/tests/sqldbtoolsunit.pas -text
 packages/fcl-db/tests/testbasics.pas svneol=native#text/plain
 packages/fcl-db/tests/testdatasources.pas svneol=native#text/plain
 packages/fcl-db/tests/testdbbasics.pas -text
+packages/fcl-db/tests/testdddiff.pp svneol=native#text/plain
 packages/fcl-db/tests/testfieldtypes.pas svneol=native#text/plain
+packages/fcl-db/tests/testsqlscript.pas svneol=native#text/plain
 packages/fcl-db/tests/toolsunit.pas -text
 packages/fcl-fpcunit/Makefile svneol=native#text/plain
 packages/fcl-fpcunit/Makefile.fpc svneol=native#text/plain
@@ -1400,13 +1405,16 @@ packages/fcl-image/src/fpreadpcx.pas svneol=native#text/plain
 packages/fcl-image/src/fpreadpng.pp svneol=native#text/plain
 packages/fcl-image/src/fpreadpnm.pp svneol=native#text/plain
 packages/fcl-image/src/fpreadtga.pp svneol=native#text/plain
+packages/fcl-image/src/fpreadtiff.pas svneol=native#text/plain
 packages/fcl-image/src/fpreadxpm.pp svneol=native#text/plain
+packages/fcl-image/src/fptiffcmn.pas svneol=native#text/plain
 packages/fcl-image/src/fpwritebmp.pp svneol=native#text/plain
 packages/fcl-image/src/fpwritejpeg.pas svneol=native#text/plain
 packages/fcl-image/src/fpwritepcx.pas svneol=native#text/plain
 packages/fcl-image/src/fpwritepng.pp svneol=native#text/plain
 packages/fcl-image/src/fpwritepnm.pp svneol=native#text/plain
 packages/fcl-image/src/fpwritetga.pp svneol=native#text/plain
+packages/fcl-image/src/fpwritetiff.pas svneol=native#text/plain
 packages/fcl-image/src/fpwritexpm.pp svneol=native#text/plain
 packages/fcl-image/src/freetype.pp svneol=native#text/plain
 packages/fcl-image/src/freetypeh.pp svneol=native#text/plain
@@ -1604,6 +1612,7 @@ packages/fcl-res/xml/winpeimagereader.xml svneol=native#text/plain
 packages/fcl-web/Makefile svneol=native#text/plain
 packages/fcl-web/Makefile.fpc svneol=native#text/plain
 packages/fcl-web/fpmake.pp svneol=native#text/plain
+packages/fcl-web/fptemplate.txt svneol=native#text/plain
 packages/fcl-web/src/README svneol=native#text/plain
 packages/fcl-web/src/cgiapp.pp svneol=native#text/plain
 packages/fcl-web/src/custcgi.pp svneol=native#text/plain
@@ -1645,7 +1654,11 @@ packages/fcl-xml/src/xmlutils.pp svneol=native#text/plain
 packages/fcl-xml/src/xmlwrite.pp svneol=native#text/plain
 packages/fcl-xml/src/xpath.pp svneol=native#text/plain
 packages/fcl-xml/tests/README svneol=native#text/plain
+packages/fcl-xml/tests/README_DOM svneol=native#text/plain
+packages/fcl-xml/tests/api.xml svneol=native#text/plain
+packages/fcl-xml/tests/domunit.pp svneol=native#text/plain
 packages/fcl-xml/tests/template.xml svneol=native#text/plain
+packages/fcl-xml/tests/testgen.pp svneol=native#text/plain
 packages/fcl-xml/tests/xmlts.pp svneol=native#text/plain
 packages/fftw/Makefile svneol=native#text/plain
 packages/fftw/Makefile.fpc svneol=native#text/plain
@@ -1690,6 +1703,7 @@ packages/fv/examples/platform.inc svneol=native#text/plain
 packages/fv/examples/testapp.lpi svneol=native#text/plain
 packages/fv/examples/testapp.pas svneol=native#text/plain
 packages/fv/fpmake.pp svneol=native#text/plain
+packages/fv/src/amismsg.inc svneol=native#text/plain
 packages/fv/src/app.pas svneol=native#text/plain
 packages/fv/src/asciitab.pas svneol=native#text/plain
 packages/fv/src/buildfv.pas svneol=native#text/plain
@@ -1723,6 +1737,8 @@ packages/fv/src/views.pas svneol=native#text/plain
 packages/fv/src/w32smsg.inc svneol=native#text/plain
 packages/gdbint/Makefile svneol=native#text/plain
 packages/gdbint/Makefile.fpc svneol=native#text/plain
+packages/gdbint/examples/symify.pp svneol=native#text/plain
+packages/gdbint/examples/testgdb.pp svneol=native#text/plain
 packages/gdbint/fpmake.pp svneol=native#text/plain
 packages/gdbint/src/freadlin.pp svneol=native#text/x-pascal
 packages/gdbint/src/gdbcon.pp svneol=native#text/plain
@@ -1730,8 +1746,6 @@ packages/gdbint/src/gdbint.pp svneol=native#text/plain
 packages/gdbint/src/gdbobjs.inc svneol=native#text/plain
 packages/gdbint/src/gdbver.pp svneol=native#text/plain
 packages/gdbint/src/gdbver_nogdb.inc svneol=native#text/x-pascal
-packages/gdbint/src/symify.pp svneol=native#text/plain
-packages/gdbint/src/testgdb.pp svneol=native#text/plain
 packages/gdbm/Makefile svneol=native#text/plain
 packages/gdbm/Makefile.fpc svneol=native#text/plain
 packages/gdbm/README svneol=native#text/plain
@@ -2135,6 +2149,7 @@ packages/gtk2/src/glib/gerror.inc svneol=native#text/plain
 packages/gtk2/src/glib/gfileutils.inc svneol=native#text/plain
 packages/gtk2/src/glib/ghash.inc svneol=native#text/plain
 packages/gtk2/src/glib/ghook.inc svneol=native#text/plain
+packages/gtk2/src/glib/gincludes.inc svneol=native#text/plain
 packages/gtk2/src/glib/giochannel.inc svneol=native#text/plain
 packages/gtk2/src/glib/glib2.pas svneol=native#text/plain
 packages/gtk2/src/glib/glibconfig.inc svneol=native#text/plain
@@ -2148,6 +2163,7 @@ packages/gtk2/src/glib/gmessages.inc svneol=native#text/plain
 packages/gtk2/src/glib/gmodule.inc svneol=native#text/plain
 packages/gtk2/src/glib/gnode.inc svneol=native#text/plain
 packages/gtk2/src/glib/gobject.inc svneol=native#text/plain
+packages/gtk2/src/glib/goption.inc svneol=native#text/plain
 packages/gtk2/src/glib/gparam.inc svneol=native#text/plain
 packages/gtk2/src/glib/gparamspecs.inc svneol=native#text/plain
 packages/gtk2/src/glib/gpattern.inc svneol=native#text/plain
@@ -2160,6 +2176,7 @@ packages/gtk2/src/glib/grel.inc svneol=native#text/plain
 packages/gtk2/src/glib/gscanner.inc svneol=native#text/plain
 packages/gtk2/src/glib/gshell.inc svneol=native#text/plain
 packages/gtk2/src/glib/gsignal.inc svneol=native#text/plain
+packages/gtk2/src/glib/gslice.inc svneol=native#text/pascal
 packages/gtk2/src/glib/gslist.inc svneol=native#text/plain
 packages/gtk2/src/glib/gsourceclosure.inc svneol=native#text/plain
 packages/gtk2/src/glib/gspawn.inc svneol=native#text/plain
@@ -2186,6 +2203,7 @@ packages/gtk2/src/gtk+/gdk/gdk2.pas svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkcolor.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkcursor.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkdisplay.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gdk/gdkdisplaymanager.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkdnd.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkdrawable.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkevents.inc svneol=native#text/plain
@@ -2208,11 +2226,13 @@ packages/gtk2/src/gtk+/gdk/gdkregion.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkrgb.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkscreen.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkselection.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gdk/gdkspawn.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdktypes.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkvisual.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gdk/gdkwindow.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/fnmatch.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtk2.pas svneol=native#text/plain
+packages/gtk2/src/gtk+/gtk/gtkaboutdialog.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkaccelgroup.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkaccellabel.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkaccelmap.inc svneol=native#text/plain
@@ -2234,8 +2254,10 @@ packages/gtk2/src/gtk+/gtk/gtkcelllayout.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcellrenderer.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcellrenderercombo.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcellrendererpixbuf.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gtk/gtkcellrendererprogress.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcellrenderertext.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcellrenderertoggle.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gtk/gtkcellview.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcheckbutton.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkcheckmenuitem.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkclipboard.inc svneol=native#text/plain
@@ -2260,6 +2282,7 @@ packages/gtk2/src/gtk+/gtk/gtkenums.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkeventbox.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkexpander.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkfilechooser.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gtk/gtkfilechooserbutton.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkfilechooserdefault.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkfilechooserdialog.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkfilechooserembed.inc svneol=native#text/plain
@@ -2311,6 +2334,7 @@ packages/gtk2/src/gtk+/gtk/gtkmenu.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkmenubar.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkmenuitem.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkmenushell.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gtk/gtkmenutoolbutton.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkmessagedialog.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkmisc.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtknotebook.inc svneol=native#text/plain
@@ -2337,6 +2361,7 @@ packages/gtk2/src/gtk+/gtk/gtkscrolledwindow.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkselection.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkseparator.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtkseparatormenuitem.inc svneol=native#text/plain
+packages/gtk2/src/gtk+/gtk/gtkseparatortoolitem.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtksettings.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtksignal.inc svneol=native#text/plain
 packages/gtk2/src/gtk+/gtk/gtksizegroup.inc svneol=native#text/plain
@@ -2417,6 +2442,17 @@ packages/gtk2/src/gtk2x11/include/mwmutil.inc svneol=native#text/plain
 packages/gtk2/src/gtk2x11/include/xsettings-client.inc svneol=native#text/plain
 packages/gtk2/src/gtk2x11/include/xsettings-common.inc svneol=native#text/plain
 packages/gtk2/src/gtk2x11/scripts/gdkx11_h2pas.sh svneol=native#text/plain
+packages/gtk2/src/gtkext/gtk2ext.pp svneol=native#text/plain
+packages/gtk2/src/gtkext/gtkscalebutton.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtkscalebuttonh.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtkstatusicon.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtkstatusiconh.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtktextiter.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtktextiterh.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtktextmark.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtktextmarkh.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtkvolumebutton.inc svneol=native#text/plain
+packages/gtk2/src/gtkext/gtkvolumebuttonh.inc svneol=native#text/plain
 packages/gtk2/src/gtkglext/gdkglconfig.inc svneol=native#text/plain
 packages/gtk2/src/gtkglext/gdkglcontext.inc svneol=native#text/plain
 packages/gtk2/src/gtkglext/gdkgldefs.inc svneol=native#text/plain
@@ -2468,6 +2504,8 @@ packages/gtk2/src/pango/pango-fontset.inc svneol=native#text/plain
 packages/gtk2/src/pango/pango-glyph.inc svneol=native#text/plain
 packages/gtk2/src/pango/pango-item.inc svneol=native#text/plain
 packages/gtk2/src/pango/pango-layout.inc svneol=native#text/plain
+packages/gtk2/src/pango/pango-matrix.inc svneol=native#text/plain
+packages/gtk2/src/pango/pango-renderer.inc svneol=native#text/plain
 packages/gtk2/src/pango/pango-tabs.inc svneol=native#text/plain
 packages/gtk2/src/pango/pango-types.inc svneol=native#text/plain
 packages/gtk2/src/pango/pango.pas svneol=native#text/plain
@@ -2686,6 +2724,13 @@ packages/ibase/src/ibase60.pp svneol=native#text/plain
 packages/ibase/src/ibase60dyn.pp svneol=native#text/plain
 packages/ibase/tests/testib40.pp svneol=native#text/plain
 packages/ibase/tests/testib60.pp svneol=native#text/plain
+packages/iconvenc/Makefile svneol=native#text/plain
+packages/iconvenc/Makefile.fpc svneol=native#text/plain
+packages/iconvenc/examples/Makefile svneol=native#text/plain
+packages/iconvenc/examples/Makefile.fpc svneol=native#text/plain
+packages/iconvenc/examples/iconvtest.pp svneol=native#text/plain
+packages/iconvenc/fpmake.pp svneol=native#text/plain
+packages/iconvenc/src/iconvenc.pas svneol=native#text/plain
 packages/imagemagick/Makefile svneol=native#text/plain
 packages/imagemagick/Makefile.fpc svneol=native#text/plain
 packages/imagemagick/examples/image.png -text svneol=unset#image/png
@@ -3193,6 +3238,68 @@ packages/libpng/Makefile svneol=native#text/plain
 packages/libpng/Makefile.fpc svneol=native#text/plain
 packages/libpng/fpmake.pp svneol=native#text/plain
 packages/libpng/src/png.pp svneol=native#text/plain
+packages/libxml/Makefile svneol=native#text/plain
+packages/libxml/Makefile.fpc svneol=native#text/plain
+packages/libxml/examples/Makefile svneol=native#text/plain
+packages/libxml/examples/Makefile.fpc svneol=native#text/plain
+packages/libxml/examples/exutils.pas svneol=native#text/plain
+packages/libxml/examples/io1.pas svneol=native#text/plain
+packages/libxml/examples/io2.pas svneol=native#text/plain
+packages/libxml/examples/reader1.pas svneol=native#text/plain
+packages/libxml/examples/reader2.pas svneol=native#text/plain
+packages/libxml/examples/test1.xml svneol=native#text/plain
+packages/libxml/examples/test2.xml svneol=native#text/plain
+packages/libxml/examples/tree1.pas svneol=native#text/plain
+packages/libxml/examples/tree2.pas svneol=native#text/plain
+packages/libxml/fpmake.pp svneol=native#text/plain
+packages/libxml/src/HTMLparser.inc svneol=native#text/plain
+packages/libxml/src/HTMLtree.inc svneol=native#text/plain
+packages/libxml/src/SAX.inc svneol=native#text/plain
+packages/libxml/src/SAX2.inc svneol=native#text/plain
+packages/libxml/src/c14n.inc svneol=native#text/plain
+packages/libxml/src/catalog.inc svneol=native#text/plain
+packages/libxml/src/chvalid.inc svneol=native#text/plain
+packages/libxml/src/debugXML.inc svneol=native#text/plain
+packages/libxml/src/dict.inc svneol=native#text/plain
+packages/libxml/src/encoding.inc svneol=native#text/plain
+packages/libxml/src/entities.inc svneol=native#text/plain
+packages/libxml/src/globals.inc svneol=native#text/plain
+packages/libxml/src/hash.inc svneol=native#text/plain
+packages/libxml/src/libxml2.pas svneol=native#text/plain
+packages/libxml/src/list.inc svneol=native#text/plain
+packages/libxml/src/nanoftp.inc svneol=native#text/plain
+packages/libxml/src/nanohttp.inc svneol=native#text/plain
+packages/libxml/src/parser.inc svneol=native#text/plain
+packages/libxml/src/parserInternals.inc svneol=native#text/plain
+packages/libxml/src/pattern.inc svneol=native#text/plain
+packages/libxml/src/relaxng.inc svneol=native#text/plain
+packages/libxml/src/schemasInternals.inc svneol=native#text/plain
+packages/libxml/src/schematron.inc svneol=native#text/plain
+packages/libxml/src/threads.inc svneol=native#text/plain
+packages/libxml/src/tree.inc svneol=native#text/plain
+packages/libxml/src/uri.inc svneol=native#text/plain
+packages/libxml/src/valid.inc svneol=native#text/plain
+packages/libxml/src/xinclude.inc svneol=native#text/plain
+packages/libxml/src/xlink.inc svneol=native#text/plain
+packages/libxml/src/xmlIO.inc svneol=native#text/plain
+packages/libxml/src/xmlautomata.inc svneol=native#text/plain
+packages/libxml/src/xmlerror.inc svneol=native#text/plain
+packages/libxml/src/xmlexports.inc svneol=native#text/plain
+packages/libxml/src/xmlmemory.inc svneol=native#text/plain
+packages/libxml/src/xmlmodule.inc svneol=native#text/plain
+packages/libxml/src/xmlreader.inc svneol=native#text/plain
+packages/libxml/src/xmlregexp.inc svneol=native#text/plain
+packages/libxml/src/xmlsave.inc svneol=native#text/plain
+packages/libxml/src/xmlschemas.inc svneol=native#text/plain
+packages/libxml/src/xmlschemastypes.inc svneol=native#text/plain
+packages/libxml/src/xmlstring.inc svneol=native#text/plain
+packages/libxml/src/xmlunicode.inc svneol=native#text/plain
+packages/libxml/src/xmlversion.inc svneol=native#text/plain
+packages/libxml/src/xmlwriter.inc svneol=native#text/plain
+packages/libxml/src/xmlxsd.pas svneol=native#text/plain
+packages/libxml/src/xpath.inc svneol=native#text/plain
+packages/libxml/src/xpathInternals.inc svneol=native#text/plain
+packages/libxml/src/xpointer.inc svneol=native#text/plain
 packages/lua/Makefile svneol=native#text/plain
 packages/lua/Makefile.fpc svneol=native#text/plain
 packages/lua/fpmake.pp svneol=native#text/plain
@@ -4501,12 +4608,18 @@ packages/winceunits/src/buildwinceunits.pp svneol=native#text/plain
 packages/winceunits/src/cesync.pp svneol=native#text/plain
 packages/winceunits/src/commctrl.pp svneol=native#text/plain
 packages/winceunits/src/commdlg.pp svneol=native#text/plain
+packages/winceunits/src/connmgr.pp svneol=native#text/plain
 packages/winceunits/src/cpl.pp svneol=native#text/plain
+packages/winceunits/src/devload.pp svneol=native#text/plain
+packages/winceunits/src/devmgmt.pp svneol=native#text/plain
 packages/winceunits/src/gpsapi.pp svneol=native#text/plain
 packages/winceunits/src/gx.pp svneol=native#text/plain
 packages/winceunits/src/htmlctrl.pp svneol=native#text/plain
 packages/winceunits/src/iphlpapi.pp svneol=native#text/plain
 packages/winceunits/src/keybd.pp svneol=native#text/plain
+packages/winceunits/src/mmreg.pp svneol=native#text/plain
+packages/winceunits/src/mmsystem.pp svneol=native#text/plain
+packages/winceunits/src/msacm.pp svneol=native#text/plain
 packages/winceunits/src/msgqueue.pp svneol=native#text/plain
 packages/winceunits/src/nled.pp svneol=native#text/plain
 packages/winceunits/src/notify.pp svneol=native#text/plain
@@ -4516,6 +4629,8 @@ packages/winceunits/src/pimstore.pp svneol=native#text/plain
 packages/winceunits/src/pm.pp svneol=native#text/plain
 packages/winceunits/src/power.pp svneol=native#text/plain
 packages/winceunits/src/rapi.pp svneol=native#text/plain
+packages/winceunits/src/ras.pp svneol=native#text/plain
+packages/winceunits/src/raserror.pp svneol=native#text/plain
 packages/winceunits/src/ril.pp svneol=native#text/plain
 packages/winceunits/src/service.pp svneol=native#text/plain
 packages/winceunits/src/shellapi.pp svneol=native#text/plain
@@ -4525,6 +4640,8 @@ packages/winceunits/src/sms.pp svneol=native#text/plain
 packages/winceunits/src/tapi.pp svneol=native#text/plain
 packages/winceunits/src/todaycmn.pp svneol=native#text/plain
 packages/winceunits/src/windbase.pp svneol=native#text/plain
+packages/winceunits/src/windbase_edb.inc svneol=native#text/plain
+packages/winceunits/src/wininet.pp svneol=native#text/plain
 packages/winceunits/src/winioctl.pp svneol=native#text/plain
 packages/winceunits/src/ws2bth.pp svneol=native#text/plain
 packages/winunits-base/Makefile svneol=native#text/plain
@@ -5060,6 +5177,8 @@ rtl/fpmake.pp svneol=native#text/plain
 rtl/freebsd/Makefile svneol=native#text/plain
 rtl/freebsd/Makefile.fpc svneol=native#text/plain
 rtl/freebsd/bsdport.txt svneol=native#text/plain
+rtl/freebsd/buildrtl.lpi svneol=native#text/plain
+rtl/freebsd/buildrtl.pp svneol=native#text/plain
 rtl/freebsd/console.pp svneol=native#text/plain
 rtl/freebsd/errno.inc svneol=native#text/plain
 rtl/freebsd/errnostr.inc -text
@@ -5092,7 +5211,10 @@ rtl/freebsd/unxfunc.inc svneol=native#text/plain
 rtl/freebsd/unxsockh.inc svneol=native#text/plain
 rtl/freebsd/unxsysc.inc svneol=native#text/plain
 rtl/freebsd/x86_64/bsyscall.inc svneol=native#text/plain
+rtl/freebsd/x86_64/cprt0.as svneol=native#text/plain
+rtl/freebsd/x86_64/gprt0.as svneol=native#text/plain
 rtl/freebsd/x86_64/prt0.as svneol=native#text/plain
+rtl/freebsd/x86_64/si_c.inc svneol=native#text/plain
 rtl/freebsd/x86_64/sighnd.inc svneol=native#text/plain
 rtl/gba/Makefile svneol=native#text/plain
 rtl/gba/Makefile.fpc svneol=native#text/plain
@@ -5282,14 +5404,18 @@ rtl/inc/threadvr.inc svneol=native#text/plain
 rtl/inc/typefile.inc svneol=native#text/plain
 rtl/inc/ucomplex.pp svneol=native#text/plain
 rtl/inc/ufloat128.pp svneol=native#text/plain
+rtl/inc/ustringh.inc svneol=native#text/plain
+rtl/inc/ustrings.inc svneol=native#text/plain
 rtl/inc/varerror.inc svneol=native#text/plain
 rtl/inc/variant.inc svneol=native#text/plain
 rtl/inc/varianth.inc svneol=native#text/plain
 rtl/inc/variants.pp svneol=native#text/plain
 rtl/inc/video.inc svneol=native#text/plain
 rtl/inc/videoh.inc svneol=native#text/plain
+rtl/inc/wstring22h.inc svneol=native#text/plain
 rtl/inc/wstringh.inc svneol=native#text/plain
 rtl/inc/wstrings.inc -text
+rtl/inc/wustring22.inc svneol=native#text/plain
 rtl/inc/wustrings.inc svneol=native#text/plain
 rtl/linux/Makefile svneol=native#text/plain
 rtl/linux/Makefile.fpc svneol=native#text/plain
@@ -5305,6 +5431,8 @@ rtl/linux/arm/syscall.inc svneol=native#text/plain
 rtl/linux/arm/syscallh.inc svneol=native#text/plain
 rtl/linux/arm/sysnr.inc svneol=native#text/plain
 rtl/linux/arm/ucprt0.as svneol=native#text/plain
+rtl/linux/buildrtl.lpi svneol=native#text/plain
+rtl/linux/buildrtl.pp svneol=native#text/plain
 rtl/linux/bunxsysc.inc svneol=native#text/plain
 rtl/linux/errno.inc svneol=native#text/plain
 rtl/linux/errnostr.inc -text
@@ -5870,6 +5998,19 @@ rtl/powerpc64/strings.inc svneol=native#text/plain
 rtl/powerpc64/stringss.inc svneol=native#text/plain
 rtl/powerpc64/strlen.inc svneol=native#text/plain
 rtl/powerpc64/strpas.inc svneol=native#text/plain
+rtl/qnx/Makefile svneol=native#text/plain
+rtl/qnx/Makefile.fpc svneol=native#text/plain
+rtl/qnx/dos.inc svneol=native#text/plain
+rtl/qnx/errno.inc svneol=native#text/plain
+rtl/qnx/i386/cprt0.as svneol=native#text/plain
+rtl/qnx/i386/crti.s svneol=native#text/plain
+rtl/qnx/i386/crtn.s svneol=native#text/plain
+rtl/qnx/osposix.inc svneol=native#text/plain
+rtl/qnx/osposixh.inc svneol=native#text/plain
+rtl/qnx/posix.pp svneol=native#text/plain
+rtl/qnx/qnx.inc svneol=native#text/plain
+rtl/qnx/signal.inc svneol=native#text/plain
+rtl/qnx/system.pp svneol=native#text/plain
 rtl/solaris/Makefile svneol=native#text/plain
 rtl/solaris/Makefile.fpc svneol=native#text/plain
 rtl/solaris/errno.inc svneol=native#text/plain
@@ -6052,6 +6193,7 @@ rtl/win/sysos.inc svneol=native#text/plain
 rtl/win/sysosh.inc svneol=native#text/plain
 rtl/win/systhrd.inc svneol=native#text/plain
 rtl/win/sysutils.pp svneol=native#text/plain
+rtl/win/syswin.inc svneol=native#text/plain
 rtl/win/tthread.inc svneol=native#text/plain
 rtl/win/varutils.pp svneol=native#text/plain
 rtl/win/video.pp svneol=native#text/plain
@@ -6076,6 +6218,7 @@ rtl/win/winsock.pp svneol=native#text/plain
 rtl/win/winsock2.pp svneol=native#text/plain
 rtl/win32/Makefile svneol=native#text/plain
 rtl/win32/Makefile.fpc svneol=native#text/plain
+rtl/win32/buildrtl.lpi svneol=native#text/plain
 rtl/win32/buildrtl.pp svneol=native#text/plain
 rtl/win32/classes.pp svneol=native#text/plain
 rtl/win32/gprt0.as svneol=native#text/plain
@@ -6140,6 +6283,7 @@ tests/bench/bansi1.pp -text
 tests/bench/bansi1mt.pp svneol=native#text/plain
 tests/bench/blists1.inc svneol=native#text/plain
 tests/bench/blists1.pp svneol=native#text/plain
+tests/bench/bmd5.pp svneol=native#text/plain
 tests/bench/dmisc.pas svneol=native#text/plain
 tests/bench/drystone.pas svneol=native#text/plain
 tests/bench/pi.c -text
@@ -6148,6 +6292,8 @@ tests/bench/shootout/README.txt svneol=native#text/plain
 tests/bench/shootout/fpascal2.diff svneol=native#text/plain
 tests/bench/shootout/io/binarytrees-output.txt svneol=native#text/plain
 tests/bench/shootout/io/knucleotide-output.txt svneol=native#text/plain
+tests/bench/shootout/io/mandelbrot-output.txt -text svneol=unset#image/x-portable-bitmap
+tests/bench/shootout/io/meteor-output.txt svneol=native#text/plain
 tests/bench/shootout/io/moments.in -text
 tests/bench/shootout/io/moments.out -text
 tests/bench/shootout/io/recursive-output.txt svneol=native#text/plain
@@ -6431,6 +6577,11 @@ tests/tbf/tb0205.pp svneol=native#text/plain
 tests/tbf/tb0206.pp svneol=native#text/plain
 tests/tbf/tb0207.pp svneol=native#text/plain
 tests/tbf/tb0208.pp svneol=native#text/plain
+tests/tbf/tb0209.pp svneol=native#text/plain
+tests/tbf/tb0210.pp svneol=native#text/plain
+tests/tbf/tb0211.pp svneol=native#text/plain
+tests/tbf/tb0212.pp svneol=native#text/plain
+tests/tbf/tb0213.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
@@ -6979,6 +7130,11 @@ tests/tbs/tb0550.pp svneol=native#text/plain
 tests/tbs/tb0550a.pp svneol=native#text/plain
 tests/tbs/tb0550b.pp svneol=native#text/plain
 tests/tbs/tb0551.pp svneol=native#text/plain
+tests/tbs/tb0552.pp svneol=native#text/plain
+tests/tbs/tb0553.pp svneol=native#text/plain
+tests/tbs/tb0554.pp svneol=native#text/plain
+tests/tbs/tb0555.pp svneol=native#text/plain
+tests/tbs/tb0556.pp svneol=native#text/plain
 tests/tbs/tb205.pp svneol=native#text/plain
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain
@@ -7027,6 +7183,10 @@ tests/test/cg/obj/beos/i386/ctest.o -text
 tests/test/cg/obj/beos/i386/tcext3.o -text
 tests/test/cg/obj/beos/i386/tcext4.o -text
 tests/test/cg/obj/beos/i386/tcext5.o -text
+tests/test/cg/obj/darwin/arm/ctest.o -text
+tests/test/cg/obj/darwin/arm/tcext3.o -text
+tests/test/cg/obj/darwin/arm/tcext4.o -text
+tests/test/cg/obj/darwin/arm/tcext5.o -text
 tests/test/cg/obj/darwin/i386/ctest.o -text
 tests/test/cg/obj/darwin/i386/tcext3.o -text
 tests/test/cg/obj/darwin/i386/tcext4.o -text
@@ -7043,10 +7203,18 @@ tests/test/cg/obj/freebsd/i386/ctest.o -text
 tests/test/cg/obj/freebsd/i386/tcext3.o -text
 tests/test/cg/obj/freebsd/i386/tcext4.o -text
 tests/test/cg/obj/freebsd/i386/tcext5.o -text
+tests/test/cg/obj/freebsd/x86_64/ctest.o -text
+tests/test/cg/obj/freebsd/x86_64/tcext3.o -text
+tests/test/cg/obj/freebsd/x86_64/tcext4.o -text
+tests/test/cg/obj/freebsd/x86_64/tcext5.o -text
 tests/test/cg/obj/go32v2/i386/ctest.o -text
 tests/test/cg/obj/go32v2/i386/tcext3.o -text
 tests/test/cg/obj/go32v2/i386/tcext4.o -text
 tests/test/cg/obj/go32v2/i386/tcext5.o -text
+tests/test/cg/obj/linux/arm-eabi/ctest.o -text
+tests/test/cg/obj/linux/arm-eabi/tcext3.o -text
+tests/test/cg/obj/linux/arm-eabi/tcext4.o -text
+tests/test/cg/obj/linux/arm-eabi/tcext5.o -text
 tests/test/cg/obj/linux/arm/ctest.o -text
 tests/test/cg/obj/linux/arm/tcext3.o -text
 tests/test/cg/obj/linux/arm/tcext4.o -text
@@ -7411,6 +7579,7 @@ tests/test/cg/variants/tvarol96.pp svneol=native#text/plain
 tests/test/dumpclass.pp svneol=native#text/plain
 tests/test/dumpmethods.pp svneol=native#text/plain
 tests/test/opt/README -text
+tests/test/opt/tarmshift.pp svneol=native#text/plain
 tests/test/opt/tcaseopt1.pp svneol=native#text/plain
 tests/test/opt/tcmov.pp svneol=native#text/plain
 tests/test/opt/tcse1.pp svneol=native#text/plain
@@ -7426,9 +7595,12 @@ tests/test/opt/tspace.pp svneol=native#text/plain
 tests/test/packages/fcl-registry/tregistry1.pp svneol=native#text/plain
 tests/test/packages/hash/tmdtest.pp svneol=native#text/plain
 tests/test/packages/webtbs/tw10045.pp svneol=native#text/plain
+tests/test/packages/webtbs/tw11142.pp svneol=native#text/plain
+tests/test/packages/webtbs/tw11570.pp svneol=native#text/plain
 tests/test/packages/webtbs/tw1808.pp svneol=native#text/plain
 tests/test/packages/webtbs/tw3820.pp svneol=native#text/plain
 tests/test/packages/win-base/tdispvar1.pp svneol=native#text/plain
+tests/test/packages/zlib/tzlib1.pp svneol=native#text/plain
 tests/test/t4cc1.pp svneol=native#text/plain
 tests/test/t4cc2.pp svneol=native#text/plain
 tests/test/tabstrcl.pp svneol=native#text/plain
@@ -7510,6 +7682,7 @@ tests/test/tgeneric13.pp svneol=native#text/plain
 tests/test/tgeneric14.pp svneol=native#text/plain
 tests/test/tgeneric15.pp svneol=native#text/plain
 tests/test/tgeneric16.pp svneol=native#text/plain
+tests/test/tgeneric17.pp svneol=native#text/plain
 tests/test/tgeneric2.pp svneol=native#text/plain
 tests/test/tgeneric3.pp svneol=native#text/plain
 tests/test/tgeneric4.pp svneol=native#text/plain
@@ -7578,6 +7751,10 @@ tests/test/tmath1.pp svneol=native#text/plain
 tests/test/tmcbool2.pp svneol=native#text/plain
 tests/test/tmmx1.pp svneol=native#text/plain
 tests/test/tmove.pp svneol=native#text/plain
+tests/test/tmsg1.pp svneol=native#text/plain
+tests/test/tmsg2.pp svneol=native#text/plain
+tests/test/tmsg3.pp svneol=native#text/plain
+tests/test/tmsg4.pp svneol=native#text/plain
 tests/test/tmt1.pp svneol=native#text/plain
 tests/test/tobject1.pp svneol=native#text/plain
 tests/test/tobject2.pp svneol=native#text/plain
@@ -7662,6 +7839,8 @@ tests/test/trecreg2.pp svneol=native#text/plain
 tests/test/trecreg3.pp -text
 tests/test/trecreg4.pp svneol=native#text/plain
 tests/test/tresstr.pp svneol=native#text/plain
+tests/test/trox1.pp svneol=native#text/plain
+tests/test/trox2.pp svneol=native#text/plain
 tests/test/trstr1.pp svneol=native#text/plain
 tests/test/trstr2.pp svneol=native#text/plain
 tests/test/trstr3.pp svneol=native#text/plain
@@ -7691,6 +7870,7 @@ tests/test/tsetsize.pp svneol=native#text/plain
 tests/test/tstack.pp svneol=native#text/plain
 tests/test/tstprocv.pp svneol=native#text/plain
 tests/test/tstring1.pp svneol=native#text/plain
+tests/test/tstring10.pp svneol=native#text/plain
 tests/test/tstring2.pp svneol=native#text/plain
 tests/test/tstring3.pp svneol=native#text/plain
 tests/test/tstring4.pp svneol=native#text/plain
@@ -7704,6 +7884,12 @@ tests/test/tstrreal2.pp svneol=native#text/plain
 tests/test/tstrreal3.pp -text
 tests/test/tsubdecl.pp svneol=native#text/plain
 tests/test/tunaligned1.pp svneol=native#text/plain
+tests/test/tunistr1.pp svneol=native#text/plain
+tests/test/tunistr2.pp svneol=native#text/plain
+tests/test/tunistr4.pp svneol=native#text/plain
+tests/test/tunistr5.pp svneol=native#text/plain
+tests/test/tunistr6.pp svneol=native#text/plain
+tests/test/tunistr7.pp svneol=native#text/plain
 tests/test/tunit1.pp svneol=native#text/plain
 tests/test/tunit2.pp svneol=native#text/plain
 tests/test/tunit3.pp svneol=native#text/plain
@@ -7711,6 +7897,10 @@ tests/test/tunroll1.pp svneol=native#text/plain
 tests/test/tutf81.pp svneol=native#text/plain%3Bcharset%3Dutf-8
 tests/test/tutf82.pp svneol=native#text/plain%3Bcharset%3Dutf-8
 tests/test/tvarset1.pp svneol=native#text/plain
+tests/test/tweaklib1.pp svneol=native#text/plain
+tests/test/tweaklib2.pp svneol=native#text/plain
+tests/test/tweaklib3.pp svneol=native#text/plain
+tests/test/tweaklib4.pp svneol=native#text/plain
 tests/test/twide1.pp svneol=native#text/plain
 tests/test/twide2.pp svneol=native#text/plain
 tests/test/twide3.pp svneol=native#text/plain
@@ -7937,6 +8127,20 @@ tests/webtbf/tw11254a.pp svneol=native#text/plain
 tests/webtbf/tw11295a.pp svneol=native#text/plain
 tests/webtbf/tw11295b.pp svneol=native#text/plain
 tests/webtbf/tw1157a.pp svneol=native#text/plain
+tests/webtbf/tw11619b.pp svneol=native#text/plain
+tests/webtbf/tw11632.pp svneol=native#text/plain
+tests/webtbf/tw11846.pp svneol=native#text/plain
+tests/webtbf/tw11846c.pp svneol=native#text/plain
+tests/webtbf/tw11848a.pp svneol=native#text/plain
+tests/webtbf/tw11849a.pp svneol=native#text/plain
+tests/webtbf/tw11862a.pp svneol=native#text/plain
+tests/webtbf/tw11970.pp svneol=native#text/plain
+tests/webtbf/tw12075.pp svneol=native#text/plain
+tests/webtbf/tw12329.pp svneol=native#text/plain
+tests/webtbf/tw12365a.cfg svneol=native#text/plain
+tests/webtbf/tw12365a.pp svneol=native#text/plain
+tests/webtbf/tw12365b.cfg svneol=native#text/plain
+tests/webtbf/tw12365b.pp svneol=native#text/plain
 tests/webtbf/tw1238.pp svneol=native#text/plain
 tests/webtbf/tw1251a.pp svneol=native#text/plain
 tests/webtbf/tw1270.pp svneol=native#text/plain
@@ -8094,6 +8298,7 @@ tests/webtbf/tw4893e.pp svneol=native#text/plain
 tests/webtbf/tw4911.pp svneol=native#text/plain
 tests/webtbf/tw4913.pp -text
 tests/webtbf/tw5896a.pp svneol=native#text/plain
+tests/webtbf/tw6036b.pp svneol=native#text/plain
 tests/webtbf/tw6420.pp svneol=native#text/plain
 tests/webtbf/tw6631.pp svneol=native#text/plain
 tests/webtbf/tw6686.pp svneol=native#text/plain
@@ -8122,6 +8327,8 @@ tests/webtbf/tw8150c.pp svneol=native#text/plain
 tests/webtbf/tw8150e.pp svneol=native#text/plain
 tests/webtbf/tw8150f.pp svneol=native#text/plain
 tests/webtbf/tw8150g.pp svneol=native#text/plain
+tests/webtbf/tw8151b.pp svneol=native#text/plain
+tests/webtbf/tw8151c.pp svneol=native#text/plain
 tests/webtbf/tw8264a.pp svneol=native#text/plain
 tests/webtbf/tw8398.pp svneol=native#text/plain
 tests/webtbf/tw8451.pp svneol=native#text/plain
@@ -8266,6 +8473,7 @@ tests/webtbs/tw10002.pp svneol=native#text/plain
 tests/webtbs/tw10009.pp svneol=native#text/plain
 tests/webtbs/tw10013.pp svneol=native#text/plain
 tests/webtbs/tw10033.pp svneol=native#text/plain
+tests/webtbs/tw10042.pp svneol=native#text/plain
 tests/webtbs/tw10072.pp svneol=native#text/plain
 tests/webtbs/tw10203.pp svneol=native#text/plain
 tests/webtbs/tw1021.pp svneol=native#text/plain
@@ -8273,6 +8481,8 @@ tests/webtbs/tw10210.pp svneol=native#text/plain
 tests/webtbs/tw10224.pp svneol=native#text/plain
 tests/webtbs/tw1023.pp svneol=native#text/plain
 tests/webtbs/tw10233.pp svneol=native#text/plain
+tests/webtbs/tw10247.pp svneol=native#text/plain
+tests/webtbs/tw10247b.pp svneol=native#text/plain
 tests/webtbs/tw10320.pp svneol=native#text/plain
 tests/webtbs/tw10350.pp svneol=native#text/plain
 tests/webtbs/tw10371.pp svneol=native#text/plain
@@ -8289,6 +8499,7 @@ tests/webtbs/tw10519.pp svneol=native#text/plain
 tests/webtbs/tw10540.pp svneol=native#text/plain
 tests/webtbs/tw1061.pp svneol=native#text/plain
 tests/webtbs/tw10623.pp svneol=native#text/plain
+tests/webtbs/tw10641.pp svneol=native#text/plain
 tests/webtbs/tw1066a.pp svneol=native#text/plain
 tests/webtbs/tw1066b.pp svneol=native#text/plain
 tests/webtbs/tw1068.pp svneol=native#text/plain
@@ -8356,21 +8567,59 @@ tests/webtbs/tw11349.pp svneol=native#text/plain
 tests/webtbs/tw11354.pp svneol=native#text/plain
 tests/webtbs/tw11372.pp svneol=native#text/plain
 tests/webtbs/tw11392.pp svneol=native#text/plain
+tests/webtbs/tw11431.pp svneol=native#text/plain
+tests/webtbs/tw11435b.pp svneol=native#text/plain
+tests/webtbs/tw11435c.pp svneol=native#text/plain
+tests/webtbs/tw11436.pp svneol=native#text/plain
 tests/webtbs/tw1152.pp svneol=native#text/plain
 tests/webtbs/tw11543.pp svneol=native#text/plain
+tests/webtbs/tw11568.pp svneol=native#text/plain
 tests/webtbs/tw1157.pp svneol=native#text/plain
 tests/webtbs/tw1157b.pp svneol=native#text/plain
+tests/webtbs/tw11619.pp svneol=native#text/plain
+tests/webtbs/tw11638.pp svneol=native#text/plain
+tests/webtbs/tw11711.pp svneol=native#text/plain
+tests/webtbs/tw11762.pp svneol=native#text/plain
+tests/webtbs/tw11763.pp svneol=native#text/plain
+tests/webtbs/tw11786.pp svneol=native#text/plain
 tests/webtbs/tw1181.pp svneol=native#text/plain
+tests/webtbs/tw11846a.pp svneol=native#text/plain
+tests/webtbs/tw11846b.pp svneol=native#text/plain
+tests/webtbs/tw11848.pp svneol=native#text/plain
+tests/webtbs/tw11849.pp svneol=native#text/plain
+tests/webtbs/tw11852.pp svneol=native#text/plain
+tests/webtbs/tw11861.pp svneol=native#text/plain
+tests/webtbs/tw11862.pp svneol=native#text/plain
+tests/webtbs/tw11896.pp svneol=native#text/plain
+tests/webtbs/tw11937.pp svneol=native#text/plain
+tests/webtbs/tw12000.pp svneol=native#text/plain
 tests/webtbs/tw1203.pp svneol=native#text/plain
 tests/webtbs/tw1204.pp svneol=native#text/plain
+tests/webtbs/tw12048.pp svneol=native#text/plain
+tests/webtbs/tw12050a.pp svneol=native#text/plain
+tests/webtbs/tw12050b.pp svneol=native#text/plain
+tests/webtbs/tw12051.pp svneol=native#text/plain
 tests/webtbs/tw1207.pp svneol=native#text/plain
+tests/webtbs/tw12076.pp svneol=native#text/plain
+tests/webtbs/tw12186.pp svneol=native#text/plain
+tests/webtbs/tw12202.pp svneol=native#text/plain
+tests/webtbs/tw12214.pp svneol=native#text/plain
 tests/webtbs/tw1222.pp svneol=native#text/plain
+tests/webtbs/tw12224.pp svneol=native#text/plain
 tests/webtbs/tw1223.pp svneol=native#text/plain
+tests/webtbs/tw12233.pp svneol=native#text/plain
+tests/webtbs/tw12237.pp svneol=native#text/plain
+tests/webtbs/tw12242.pp svneol=native#text/plain
+tests/webtbs/tw12249.pp svneol=native#text/plain
 tests/webtbs/tw1228.pp svneol=native#text/plain
 tests/webtbs/tw1229.pp svneol=native#text/plain
+tests/webtbs/tw12404.pp svneol=native#text/plain
 tests/webtbs/tw1250.pp svneol=native#text/plain
+tests/webtbs/tw12508a.pp svneol=native#text/plain
 tests/webtbs/tw1251b.pp svneol=native#text/plain
 tests/webtbs/tw1255.pp svneol=native#text/plain
+tests/webtbs/tw12575.pp svneol=native#text/plain
+tests/webtbs/tw12597.pp svneol=native#text/plain
 tests/webtbs/tw1269.pp svneol=native#text/plain
 tests/webtbs/tw1275.pp svneol=native#text/plain
 tests/webtbs/tw1279.pp svneol=native#text/plain
@@ -9013,6 +9262,8 @@ tests/webtbs/tw5100a.pp svneol=native#text/plain
 tests/webtbs/tw5641.pp svneol=native#text/plain
 tests/webtbs/tw5800.pp svneol=native#text/plain
 tests/webtbs/tw5896.pp svneol=native#text/plain
+tests/webtbs/tw6036.pp svneol=native#text/plain
+tests/webtbs/tw6036a.pp svneol=native#text/plain
 tests/webtbs/tw6129.pp svneol=native#text/plain
 tests/webtbs/tw6184.pp svneol=native#text/plain
 tests/webtbs/tw6203.pp svneol=native#text/plain
@@ -9118,6 +9369,7 @@ tests/webtbs/tw8145.pp svneol=native#text/plain
 tests/webtbs/tw8148.pp svneol=native#text/plain
 tests/webtbs/tw8150a.pp svneol=native#text/plain
 tests/webtbs/tw8150d.pp svneol=native#text/plain
+tests/webtbs/tw8151a.pp svneol=native#text/plain
 tests/webtbs/tw8153.pp svneol=native#text/plain
 tests/webtbs/tw8153a.pp svneol=native#text/plain
 tests/webtbs/tw8155.pp svneol=native#text/plain
@@ -9263,6 +9515,7 @@ tests/webtbs/uw0701d.pp svneol=native#text/plain
 tests/webtbs/uw0701e.pp svneol=native#text/plain
 tests/webtbs/uw0809.pp svneol=native#text/plain
 tests/webtbs/uw11182.pp svneol=native#text/plain
+tests/webtbs/uw11762.pp svneol=native#text/plain
 tests/webtbs/uw1181.inc svneol=native#text/plain
 tests/webtbs/uw1279.pp svneol=native#text/plain
 tests/webtbs/uw1331.pp svneol=native#text/plain
@@ -9395,6 +9648,8 @@ utils/fpdoc/dw_txt.pp svneol=native#text/plain
 utils/fpdoc/dw_xml.pp svneol=native#text/plain
 utils/fpdoc/dwlinear.pp svneol=native#text/plain
 utils/fpdoc/dwriter.pp svneol=native#text/plain
+utils/fpdoc/fpclasschart.lpi svneol=native#text/plain
+utils/fpdoc/fpclasschart.pp svneol=native#text/plain
 utils/fpdoc/fpde/Makefile svneol=native#text/plain
 utils/fpdoc/fpde/Makefile.fpc svneol=native#text/plain
 utils/fpdoc/fpde/bitmaps/bold.xpm -text
@@ -9426,6 +9681,7 @@ utils/fpdoc/fpde/frmtable.pp svneol=native#text/plain
 utils/fpdoc/fpde/pgeditor.pp svneol=native#text/plain
 utils/fpdoc/fpde/xpms.pp svneol=native#text/plain
 utils/fpdoc/fpdoc.css -text
+utils/fpdoc/fpdoc.lpi svneol=native#text/plain
 utils/fpdoc/fpdoc.pp svneol=native#text/plain
 utils/fpdoc/intl/Makefile svneol=native#text/plain
 utils/fpdoc/intl/dglobals.de.po svneol=native#text/plain
@@ -9435,6 +9691,7 @@ utils/fpdoc/intl/fpdoc.de.po svneol=native#text/plain
 utils/fpdoc/intl/fpdocmk.de.po svneol=native#text/plain
 utils/fpdoc/intl/fpdocstr.de.po svneol=native#text/plain
 utils/fpdoc/intl/makeskel.de.po svneol=native#text/plain
+utils/fpdoc/makeskel.lpi svneol=native#text/plain
 utils/fpdoc/makeskel.pp svneol=native#text/plain
 utils/fpdoc/sh_pas.pp svneol=native#text/plain
 utils/fpdoc/unitdiff.pp svneol=native#text/plain

+ 0 - 14
.gitignore

@@ -222,20 +222,6 @@ packages/fcl-base/examples/intl/*.s
 packages/fcl-base/examples/intl/fpcmade.*
 packages/fcl-base/examples/intl/units
 packages/fcl-base/examples/units
-packages/fcl-base/src/amiga/*.bak
-packages/fcl-base/src/amiga/*.exe
-packages/fcl-base/src/amiga/*.o
-packages/fcl-base/src/amiga/*.ppu
-packages/fcl-base/src/amiga/*.s
-packages/fcl-base/src/amiga/fpcmade.*
-packages/fcl-base/src/amiga/units
-packages/fcl-base/src/beos/*.bak
-packages/fcl-base/src/beos/*.exe
-packages/fcl-base/src/beos/*.o
-packages/fcl-base/src/beos/*.ppu
-packages/fcl-base/src/beos/*.s
-packages/fcl-base/src/beos/fpcmade.*
-packages/fcl-base/src/beos/units
 packages/fcl-base/src/go32v2/*.bak
 packages/fcl-base/src/go32v2/*.exe
 packages/fcl-base/src/go32v2/*.o

+ 6 - 2
Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/10/22]
 #
 default: help
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -115,6 +115,10 @@ FPC:=$(shell $(FPCPROG) -PB)
 endif
 ifneq ($(findstring Error,$(FPC)),)
 override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+else
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
+endif
 endif
 else
 override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
@@ -321,7 +325,7 @@ ALLTARGET=all
 else
 ifndef ALLTARGET
 SHAREDTARGETS=
-SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd netware netwlibc
+SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd netware netwlibc darwin
 ifneq ($(findstring $(OS_TARGET),$(SHAREDTARGETS)),)
 ALLTARGET=shared
 else

+ 1 - 1
Makefile.fpc

@@ -96,7 +96,7 @@ ALLTARGET=all
 else
 ifndef ALLTARGET
 SHAREDTARGETS=
-SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd netware netwlibc
+SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd netware netwlibc darwin
 ifneq ($(findstring $(OS_TARGET),$(SHAREDTARGETS)),)
 ALLTARGET=shared
 else

+ 8 - 4
compiler/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/10/22]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -115,6 +115,10 @@ FPC:=$(shell $(FPCPROG) -PB)
 endif
 ifneq ($(findstring Error,$(FPC)),)
 override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+else
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
+endif
 endif
 else
 override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
@@ -259,7 +263,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=compiler
-override PACKAGE_VERSION=2.0.0
+override PACKAGE_VERSION=2.2.2
 unexport FPC_VERSION FPC_COMPILERINFO
 CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb
 ALLTARGETS=$(CYCLETARGETS)
@@ -3291,9 +3295,9 @@ $(addsuffix _clean,$(ALLTARGETS)):
 	-$(DELTREE) $(addprefix $(subst _clean,,$@),/units)
 	-$(DEL) $(addprefix $(subst _clean,,$@)/,*$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT))
 	-$(DEL) $(addprefix $(subst _clean,,$@)/,ppc386$(EXEEXT) ppcaxp$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcppc$(EXEEXT) $(EXENAME))
-cycleclean: cleanall $(addsuffix _clean,$(PPC_TARGET))
+cycleclean: cleanall $(addsuffix _clean,$(CPC_TARGET))
 	-$(DEL) $(EXENAME)
-clean: tempclean execlean cleanall $(addsuffix _clean,$(PPC_TARGET)) $(addsuffix _clean,$(TARGET_DIRS))
+clean: tempclean execlean cleanall $(addsuffix _clean,$(CPC_TARGET)) $(addsuffix _clean,$(TARGET_DIRS))
 distclean: tempclean execlean cleanall $(addsuffix _clean,$(ALLTARGETS)) $(addsuffix _distclean,$(TARGET_DIRS))
 $(MSG2INC): $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(COMPILERUTILSDIR)/msg2inc.pp
 	$(COMPILER) -FE. $(COMPILERUTILSDIR)/msg2inc.pp

+ 3 - 3
compiler/Makefile.fpc

@@ -4,7 +4,7 @@
 
 [package]
 name=compiler
-version=2.0.0
+version=2.2.2
 
 [target]
 programs=pp
@@ -336,10 +336,10 @@ $(addsuffix _clean,$(ALLTARGETS)):
         -$(DEL) $(addprefix $(subst _clean,,$@)/,*$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT))
         -$(DEL) $(addprefix $(subst _clean,,$@)/,ppc386$(EXEEXT) ppcaxp$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcppc$(EXEEXT) $(EXENAME))
 
-cycleclean: cleanall $(addsuffix _clean,$(PPC_TARGET))
+cycleclean: cleanall $(addsuffix _clean,$(CPC_TARGET))
         -$(DEL) $(EXENAME)
 
-clean: tempclean execlean cleanall $(addsuffix _clean,$(PPC_TARGET)) $(addsuffix _clean,$(TARGET_DIRS))
+clean: tempclean execlean cleanall $(addsuffix _clean,$(CPC_TARGET)) $(addsuffix _clean,$(TARGET_DIRS))
 
 distclean: tempclean execlean cleanall $(addsuffix _clean,$(ALLTARGETS)) $(addsuffix _distclean,$(TARGET_DIRS))
 

+ 1 - 1
compiler/aasmbase.pas

@@ -37,7 +37,7 @@ interface
        ;
 
     type
-       TAsmsymbind=(AB_NONE,AB_EXTERNAL,AB_COMMON,AB_LOCAL,AB_GLOBAL);
+       TAsmsymbind=(AB_NONE,AB_EXTERNAL,AB_COMMON,AB_LOCAL,AB_GLOBAL,AB_WEAK_EXTERNAL);
 
        TAsmsymtype=(
          AT_NONE,AT_FUNCTION,AT_DATA,AT_SECTION,AT_LABEL,

+ 32 - 2
compiler/aasmdata.pas

@@ -66,6 +66,19 @@ interface
         al_end
       );
 
+      { Type of constant 'pools'. Currently contains only string types,
+        but may be extended with reals, sets, etc. }
+      
+      TConstPoolType = (
+         sp_invalid,
+         sp_conststr,
+         sp_shortstr,
+         sp_longstr,
+         sp_ansistr,
+         sp_widestr,
+         sp_unicodestr
+      );
+      
     const
       AsmListTypeStr : array[TAsmListType] of string[24] =(
         'al_begin',
@@ -126,10 +139,13 @@ interface
         { Assembler lists }
         AsmLists      : array[TAsmListType] of TAsmList;
         CurrAsmList   : TAsmList;
+        { hash tables for reusing constant storage }
+        ConstPools    : array[TConstPoolType] of THashSet;
         constructor create(const n:string);
         destructor  destroy;override;
         { asmsymbol }
         function  DefineAsmSymbol(const s : string;_bind:TAsmSymBind;_typ:Tasmsymtype) : TAsmSymbol;
+        function  WeakRefAsmSymbol(const s : string) : TAsmSymbol;
         function  RefAsmSymbol(const s : string) : TAsmSymbol;
         function  GetAsmSymbol(const s : string) : TAsmSymbol;
         { create new assembler label }
@@ -283,7 +299,7 @@ implementation
         for hal:=low(TAsmListType) to high(TAsmListType) do
           AsmLists[hal]:=TAsmList.create;
         { PIC data }
-        if (target_info.system in [system_powerpc_darwin,system_powerpc64_darwin,system_i386_darwin]) then
+        if (target_info.system in [system_powerpc_darwin,system_powerpc64_darwin,system_i386_darwin,system_arm_darwin]) then
           AsmLists[al_picdata].concat(tai_directive.create(asd_non_lazy_symbol_pointer,''));
         { CFI }
         FAsmCFI:=CAsmCFI.Create;
@@ -293,6 +309,7 @@ implementation
     destructor TAsmData.destroy;
       var
         hal : TAsmListType;
+        hp  : TConstPoolType;
       begin
         { Symbols }
 {$ifdef MEMDEBUG}
@@ -321,6 +338,8 @@ implementation
 {$ifdef MEMDEBUG}
          memasmlists.stop;
 {$endif}
+         for hp := low(TConstPoolType) to high(TConstPoolType) do
+           ConstPools[hp].Free;
       end;
 
 
@@ -355,7 +374,18 @@ implementation
       begin
         result:=TAsmSymbol(FAsmSymbolDict.Find(s));
         if not assigned(result) then
-          result:=TAsmSymbol.create(AsmSymbolDict,s,AB_EXTERNAL,AT_NONE);
+          result:=TAsmSymbol.create(AsmSymbolDict,s,AB_EXTERNAL,AT_NONE)
+        { one normal reference removes the "weak" character of a symbol }
+        else if (result.bind=AB_WEAK_EXTERNAL) then
+          result.bind:=AB_EXTERNAL;
+      end;
+
+
+    function TAsmData.WeakRefAsmSymbol(const s : string) : TAsmSymbol;
+      begin
+        result:=TAsmSymbol(FAsmSymbolDict.Find(s));
+        if not assigned(result) then
+          result:=TAsmSymbol.create(AsmSymbolDict,s,AB_WEAK_EXTERNAL,AT_NONE);
       end;
 
 

+ 2 - 2
compiler/aasmtai.pas

@@ -274,7 +274,7 @@ interface
       TAsmDirective=(
         asd_non_lazy_symbol_pointer,asd_indirect_symbol,asd_lazy_symbol_pointer,
         asd_extern,asd_nasm_import, asd_toc_entry, asd_mod_init_func, asd_mod_term_func,
-        asd_reference,asd_no_dead_strip
+        asd_reference,asd_no_dead_strip,asd_weak_reference
       );
 
     const
@@ -284,7 +284,7 @@ interface
       directivestr : array[TAsmDirective] of string[23]=(
         'non_lazy_symbol_pointer','indirect_symbol','lazy_symbol_pointer',
         'extern','nasm_import', 'tc', 'mod_init_func', 'mod_term_func', 'reference',
-        'no_dead_strip'
+        'no_dead_strip','weak_reference'
       );
 
     type

+ 35 - 3
compiler/aggas.pas

@@ -44,6 +44,9 @@ interface
       {# This is a derived class which is used to write
          GAS styled assembler.
       }
+
+      { TGNUAssembler }
+
       TGNUAssembler=class(texternalassembler)
       protected
         function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;virtual;
@@ -53,6 +56,7 @@ interface
 {$ifdef support_llvm}
         procedure WriteLlvmInstruction(hp: taillvm);
 {$endif support_llvm}
+        procedure WriteWeakSymbolDef(s: tasmsymbol); virtual;
        public
         function MakeCmdLine: TCmdStr; override;
         procedure WriteTree(p:TAsmList);override;
@@ -82,8 +86,12 @@ interface
       end;
 
 
+      { TAppleGNUAssembler }
+
       TAppleGNUAssembler=class(TGNUAssembler)
+       protected
         function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
+        procedure WriteWeakSymbolDef(s: tasmsymbol); override;
        private
         debugframecount: aint;
        end;
@@ -259,7 +267,7 @@ implementation
 { not relocated properly on e.g. linux/ppc64. g++ generates there for a   }
 { vtable for a class called Window:                                       }
 { .section .data.rel.ro._ZTV6Window,"awG",@progbits,_ZTV6Window,comdat    }
-{$warning TODO .data.ro not yet working}
+{ TODO: .data.ro not yet working}
 {$if defined(arm) or defined(powerpc)}
           '.rodata',
 {$else arm}
@@ -371,7 +379,8 @@ implementation
          system_powerpc_darwin,
          system_i386_darwin,
          system_powerpc64_darwin,
-         system_x86_64_darwin:
+         system_x86_64_darwin,
+         system_arm_darwin:
            begin
              if (atype = sec_stub) then
                AsmWrite('.section ');
@@ -399,7 +408,12 @@ implementation
                     AsmWriteln('__TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16');
                 system_i386_darwin:
                   AsmWriteln('__IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5');
-                { darwin/x86-64 uses RIP-based GOT addressing }
+                system_arm_darwin:
+                  if (cs_create_pic in current_settings.moduleswitches) then
+                    AsmWriteln('.section __TEXT,__picsymbolstub4,symbol_stubs,none,16')
+                  else
+                    AsmWriteln('.section __TEXT,__symbol_stub4,symbol_stubs,none,12')
+                { darwin/x86-64 uses RIP-based GOT addressing, no symbol stubs }
                 else
                   internalerror(2006031101);
               end;
@@ -1113,10 +1127,17 @@ implementation
       end;
 
 
+    procedure TGNUAssembler.WriteWeakSymbolDef(s: tasmsymbol);
+      begin
+        AsmWriteLn(#9'.weak '+s.name);
+      end;
+
+
     procedure TGNUAssembler.WriteAsmList;
     var
       n : string;
       hal : tasmlisttype;
+      i: longint;
     begin
 {$ifdef EXTDEBUG}
       if assigned(current_module.mainsource) then
@@ -1139,6 +1160,11 @@ implementation
           AsmWriteLn(target_asm.comment+'End asmlist '+AsmlistTypeStr[hal]);
         end;
 
+      { add weak symbol markers }
+      for i:=0 to current_asmdata.asmsymboldict.count-1 do
+        if (tasmsymbol(current_asmdata.asmsymboldict[i]).bind=AB_WEAK_EXTERNAL) then
+          writeweaksymboldef(tasmsymbol(current_asmdata.asmsymboldict[i]));
+
       if create_smartlink_sections and
          (target_info.system in systems_darwin) then
         AsmWriteLn(#9'.subsections_via_symbols');
@@ -1215,6 +1241,12 @@ implementation
       end;
 
 
+    procedure TAppleGNUAssembler.WriteWeakSymbolDef(s: tasmsymbol);
+      begin
+        AsmWriteLn(#9'.weak_reference '+s.name);
+      end;
+
+
 {****************************************************************************}
 {                       a.out/GNU Assembler writer                           }
 {****************************************************************************}

+ 8 - 10
compiler/aopt.pas

@@ -35,7 +35,7 @@ Unit aopt;
       TAsmOptimizer = class(TAoptObj)
 
         { _AsmL is the PAasmOutpout list that has to be optimized }
-        Constructor create(_AsmL: TAsmList); virtual;
+        Constructor create(_AsmL: TAsmList); virtual; reintroduce;
 
         { call the necessary optimizer procedures }
         Procedure Optimize;
@@ -71,7 +71,7 @@ Unit aopt;
       { Walks through the paasmlist to find the lowest and highest label number.  }
       { Returns the last Pai object of the current block                          }
       Var LabelFound: Boolean;
-          p, prev: tai;
+          p: tai;
       Begin
         LabelInfo^.LowLabel := High(AWord);
         LabelInfo^.HighLabel := 0;
@@ -79,7 +79,6 @@ Unit aopt;
         LabelInfo^.LabelTable:=nil;
         LabelFound := False;
         P := BlockStart;
-        prev := p;
         With LabelInfo^ Do
           Begin
             While Assigned(P) And
@@ -91,12 +90,11 @@ Unit aopt;
                    (tai_Label(p).labsym.is_used) Then
                   Begin
                     LabelFound := True;
-                    If (tai_Label(p).labsym.labelnr < LowLabel) Then
+                    If (tai_Label(p).labsym.labelnr < aint(LowLabel)) Then
                       LowLabel := tai_Label(p).labsym.labelnr;
-                    If (tai_Label(p).labsym.labelnr > HighLabel) Then
+                    If (tai_Label(p).labsym.labelnr > aint(HighLabel)) Then
                       HighLabel := tai_Label(p).labsym.labelnr
                   End;
-                prev := p;
                 GetNextInstruction(p, p)
               End;
             blockend:=p;
@@ -109,11 +107,11 @@ Unit aopt;
     Procedure TAsmOptimizer.BuildLabelTableAndFixRegAlloc;
     { Builds a table with the locations of the labels in the TAsmList.       }
     { Also fixes some RegDeallocs like "# %eax released; push (%eax)"           }
-    Var p, hp1, hp2: tai;
-        UsedRegs: TRegSet;
+    Var p{, hp1, hp2}: tai;
+        {UsedRegs: TRegSet;}
         LabelIdx : longint;
     Begin
-      UsedRegs := [];
+      {UsedRegs := [];}
       With LabelInfo^ Do
         If (LabelDif <> 0) Then
           Begin
@@ -129,7 +127,7 @@ Unit aopt;
                          (tai_Label(p).labsym.labeltype=alt_jump) then
                         begin
                           LabelIdx:=tai_label(p).labsym.labelnr-LowLabel;
-                          if LabelIdx>LabelDif then
+                          if LabelIdx>aint(LabelDif) then
                             internalerror(200604202);
                           LabelTable^[LabelIdx].PaiObj := p;
                         end;

+ 4 - 2
compiler/aoptda.pas

@@ -62,13 +62,15 @@ Unit aoptda;
     { Analyzes the Data Flow of an assembler list. Analyses the reg contents     }
     { for the instructions between blockstart and blockend. Returns the last pai }
     { which has been processed                                                   }
+    {
     Var
         CurProp: TPaiProp;
         UsedRegs: TUsedRegs;
         p, hp, NewBlockStart : tai;
         TmpReg: TRegister;
+    }
     Begin
-    {!!!!!!!!!!
+    (*!!!!!!!!!!
       p := BlockStart;
       UsedRegs.Create;
       UsedRegs.Update(p);
@@ -157,7 +159,7 @@ Unit aoptda;
     {      Inc(InstrCnt);}
           GetNextInstruction(p, p);
         End;
-    }
+    *)
     End;
 
 End.

+ 29 - 17
compiler/aoptobj.pas

@@ -351,6 +351,7 @@ Unit AoptObj;
       Function TUsedRegs.IsUsed(Reg: TRegister): Boolean;
       Begin
         //!!!!!!!!!!! IsUsed := Reg in UsedRegs
+        Result:=False; { unimplemented }
       End;
 
       Function TUsedRegs.GetUsedRegs: TRegSet;
@@ -377,13 +378,16 @@ Unit AoptObj;
         End;
 
       Function TPaiProp.RegInSequence(Reg, which: TRegister): Boolean;
+      {
       Var p: Tai;
           RegsChecked: TRegSet;
           content: TContent;
           Counter: Byte;
           TmpResult: Boolean;
-      Begin
-      {!!!!!!!!!!1
+      }
+      begin
+        Result:=False; { unimplemented }
+      (*!!!!!!!!!!1
         RegsChecked := [];
         content := regs[which];
         p := content.StartMod;
@@ -421,7 +425,7 @@ Unit AoptObj;
             GetNextInstruction(p,p)
           End;
         RegInSequence := TmpResult
-      }
+      *)
       End;
 
 
@@ -429,8 +433,10 @@ Unit AoptObj;
                   TInstrSinceLastMod);
       { Destroys the contents of the register Reg in the PPaiProp p1, as well as }
       { the contents of registers are loaded with a memory location based on Reg }
+      {
       Var TmpWState, TmpRState: Byte;
           Counter: TRegister;
+      }
       Begin
       {!!!!!!!
         Reg := RegMaxSize(Reg);
@@ -454,14 +460,15 @@ Unit AoptObj;
 
       Function ArrayRefsEq(const r1, r2: TReference): Boolean;
       Begin
-      {!!!!!!!!!!
+        Result:=False; { unimplemented }
+      (*!!!!!!!!!!
         ArrayRefsEq := (R1.Offset+R1.OffsetFixup = R2.Offset+R2.OffsetFixup) And
       {$ifdef refsHaveSegmentReg}
                        (R1.Segment = R2.Segment) And
       {$endif}
                        (R1.Base = R2.Base) And
                        (R1.Symbol=R2.Symbol);
-      }
+      *)
       End;
 
       Procedure TPaiProp.DestroyRefs(Const Ref: TReference; WhichReg: TRegister;
@@ -469,10 +476,12 @@ Unit AoptObj;
       { destroys all registers which possibly contain a reference to Ref, WhichReg }
       { is the register whose contents are being written to memory (if this proc   }
       { is called because of a "mov?? %reg, (mem)" instruction)                    }
+      {
       Var RefsEq: TRefCompare;
           Counter: TRegister;
+      }
       Begin
-      {!!!!!!!!!!!
+      (*!!!!!!!!!!!
         WhichReg := RegMaxSize(WhichReg);
         If (Ref.base = procinfo.FramePointer) or
             Assigned(Ref.Symbol) Then
@@ -543,13 +552,13 @@ Unit AoptObj;
                        )
                    )
                 Then DestroyReg(Counter, InstrSinceLastMod)
-      }
+      *)
       End;
 
       Procedure TPaiProp.DestroyAllRegs(var InstrSinceLastMod: TInstrSinceLastMod);
-      Var Counter: TRegister;
+      {Var Counter: TRegister;}
       Begin {initializes/desrtoys all registers}
-      {!!!!!!!!!
+      (*!!!!!!!!!
         For Counter := LoGPReg To HiGPReg Do
           Begin
             ReadReg(Counter);
@@ -557,7 +566,7 @@ Unit AoptObj;
           End;
         CondRegs.Init;
       { FPURegs.Init; }
-      }
+      *)
       End;
 
       Procedure TPaiProp.DestroyOp(const o:Toper; var InstrSinceLastMod:
@@ -587,14 +596,14 @@ Unit AoptObj;
 
       Procedure TPaiProp.ReadRef(Ref: PReference);
       Begin
-      {!!!!!!!
+      (*!!!!!!
         If Ref^.Base <> R_NO Then
           ReadReg(Ref^.Base);
       {$ifdef refsHaveIndexReg}
         If Ref^.Index <> R_NO Then
           ReadReg(Ref^.Index);
       {$endif}
-      }
+      *)
       End;
 
       Procedure TPaiProp.ReadOp(const o:toper);
@@ -610,7 +619,7 @@ Unit AoptObj;
       Procedure TPaiProp.ModifyReg(reg: TRegister; Var InstrSinceLastMod:
                                      TInstrSinceLastMod);
       Begin
-      {!!!!!!!
+      (*!!!!!!!
         With Regs[reg] Do
           If (Typ = Con_Ref)
             Then
@@ -625,7 +634,7 @@ Unit AoptObj;
               End
             Else
               DestroyReg(Reg, InstrSinceLastMod);
-      }
+      *)
       End;
 
       Procedure TPaiProp.ModifyOp(const oper: TOper; var InstrSinceLastMod:
@@ -652,16 +661,19 @@ Unit AoptObj;
 
       Function TPaiProp.GetWState(Reg: TRegister): TStateInt; {$ifdef inl} inline;{$endif inl}
       Begin
+        Result:=0; { unimplemented }
         //!!!! GetWState := Regs[Reg].WState
       End;
 
       Function TPaiProp.GetRState(Reg: TRegister): TStateInt; {$ifdef inl} inline;{$endif inl}
       Begin
+        Result:=0; { unimplemented }
         //!!!! GetRState := Regs[Reg].RState
       End;
 
       Function TPaiProp.GetRegContentType(Reg: TRegister): Byte; {$ifdef inl} inline;{$endif inl}
       Begin
+        Result:=0; { unimplemented }
         //!!!! GetRegContentType := Regs[Reg].typ
       End;
 
@@ -878,8 +890,8 @@ Unit AoptObj;
 {$endif}
     function tAOptObj.getlabelwithsym(sym: tasmlabel): tai;
       begin
-        if (sym.labelnr >= labelinfo^.lowlabel) and
-           (sym.labelnr <= labelinfo^.highlabel) then   { range check, a jump can go past an assembler block! }
+        if (sym.labelnr >= aint(labelinfo^.lowlabel)) and
+           (sym.labelnr <= aint(labelinfo^.highlabel)) then   { range check, a jump can go past an assembler block! }
           getlabelwithsym := labelinfo^.labeltable^[sym.labelnr-labelinfo^.lowlabel].paiobj
         else
           getlabelwithsym := nil;
@@ -1034,7 +1046,7 @@ Unit AoptObj;
                       if GetNextInstruction(p, hp1) then
                         begin
                           if FindLabel(tasmlabel(taicpu(p).oper[0]^.ref^.symbol), hp1) and
-        {$warning FIXME removing the first instruction fails}
+        { TODO: FIXME removing the first instruction fails}
                               (p<>blockstart) then
                             begin
                               hp2:=tai(hp1.next);

+ 13 - 12
compiler/arm/aasmcpu.pas

@@ -1034,6 +1034,7 @@ implementation
 
     function taicpu.CheckIfValid:boolean;
       begin
+        Result:=False; { unimplemented }
       end;
 
 
@@ -1122,6 +1123,7 @@ implementation
 
     function  taicpu.InsEnd:longint;
       begin
+        Result:=0; { unimplemented }
       end;
 
 
@@ -1279,8 +1281,8 @@ implementation
        * required to have unspecified size in the instruction too...)
       }
       var
-        i,j,asize,oprs : longint;
-        siz : array[0..3] of longint;
+        i{,j,asize,oprs} : longint;
+        {siz : array[0..3] of longint;}
       begin
         Matches:=100;
         writeln(getstring,'---');
@@ -1369,8 +1371,8 @@ implementation
         { as default an untyped size can get all the sizes, this is different
           from nasm, but else we need to do a lot checking which opcodes want
           size or not with the automatic size generation }
-        asize:=longint($ffffffff);
         (*
+        asize:=longint($ffffffff);
         if (p^.flags and IF_SB)<>0 then
           asize:=OT_BITS8
         else if (p^.flags and IF_SW)<>0 then
@@ -1440,6 +1442,7 @@ implementation
 
     function  taicpu.NeedAddrPrefix(opidx:byte):boolean;
       begin
+        Result:=False; { unimplemented }
       end;
 
 
@@ -1505,7 +1508,7 @@ implementation
             top_const:
               begin
                 i_field:=1;
-                bytes:=bytes or (oper[op]^.val and $fff);
+                bytes:=bytes or dword(oper[op]^.val and $fff);
               end;
             top_reg:
               begin
@@ -1560,7 +1563,7 @@ implementation
 
 
 {$ifdef dummy}
-      (*
+(*
 static void gencode (long segment, long offset, int bits,
                      insn *ins, char *codes, long insn_end)
 {
@@ -1581,7 +1584,7 @@ static void gencode (long segment, long offset, int bits,
     0x05, 0x07, 0x06,
   };
 
-(*
+
 #ifdef DEBUG
 static char *CC[] =
   {                                    /* condition code names */
@@ -1591,7 +1594,7 @@ static char *CC[] =
     "PL", "VC", "VS", "",
     "S"
 };
-*)
+
 
     has_S_code = (ins->condition & C_SSETFLAG);
     has_B_code = (ins->condition & C_BSETFLAG);
@@ -1600,7 +1603,7 @@ static char *CC[] =
     has_F_code = (ins->condition & C_FSETFLAG);
     ins->condition = (ins->condition & 0x0F);
 
-(*
+
     if (rt_debug)
       {
     printf ("gencode: instruction: %s%s", insn_names[ins->opcode],
@@ -1628,7 +1631,7 @@ static char *CC[] =
     bytes[2] = 0xE;
     bytes[3] = 0xF;
       }
-*)
+
     // First condition code in upper nibble
     if (ins->condition < C_NONE)
       {
@@ -2493,10 +2496,8 @@ static char *CC[] =
     out (offset, segment, bytes, OUT_RAWDATA+4, NO_SEG, NO_SEG);
 }
 
-
 *)
-{$endif dummy
-}
+{$endif dummy}
 
 begin
   cai_align:=tai_align;

+ 38 - 1
compiler/arm/agarmgas.pas

@@ -29,6 +29,7 @@ unit agarmgas;
   interface
 
     uses
+       globtype,
        aasmtai,aasmdata,
        aggas,
        cpubase;
@@ -36,12 +37,17 @@ unit agarmgas;
     type
       TARMGNUAssembler=class(TGNUassembler)
         constructor create(smart: boolean); override;
+        function MakeCmdLine: TCmdStr; override;
       end;
 
      TArmInstrWriter=class(TCPUInstrWriter)
         procedure WriteInstruction(hp : tai);override;
      end;
 
+    TArmAppleGNUAssembler=class(TAppleGNUassembler)
+      constructor create(smart: boolean); override;
+    end;
+
 
     const
       gas_shiftmode2str : array[tshiftmode] of string[3] = (
@@ -53,7 +59,7 @@ unit agarmgas;
        cutils,globals,verbose,
        systems,
        assemble,
-       aasmcpu,
+       cpuinfo,aasmcpu,
        itcpugas,
        cgbase,cgutils;
 
@@ -68,6 +74,24 @@ unit agarmgas;
       end;
 
 
+    function TArmGNUAssembler.MakeCmdLine: TCmdStr;
+      begin
+        result:=inherited MakeCmdLine;
+        if (current_settings.fputype = fpu_soft) then
+          result:='-mfpu=softvfp '+result;
+      end;
+
+{****************************************************************************}
+{                      GNU/Apple PPC Assembler writer                        }
+{****************************************************************************}
+
+    constructor TArmAppleGNUAssembler.create(smart: boolean);
+      begin
+        inherited create(smart);
+        InstrWriter := TArmInstrWriter.create(self);
+      end;
+
+
 {****************************************************************************}
 {                  Helper routines for Instruction Writer                    }
 {****************************************************************************}
@@ -251,7 +275,20 @@ unit agarmgas;
             comment : '# ';
           );
 
+       as_arm_gas_darwin_info : tasminfo =
+          (
+            id     : as_darwin;
+            idtxt  : 'AS-Darwin';
+            asmbin : 'as';
+            asmcmd : '-o $OBJ $ASM -arch arm';
+            supported_target : system_any;
+            flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
+            labelprefix : 'L';
+            comment : '# ';
+          );
+
 
 begin
   RegisterAssembler(as_arm_gas_info,TARMGNUAssembler);
+  RegisterAssembler(as_arm_gas_darwin_info,TArmAppleGNUAssembler);
 end.

+ 20 - 0
compiler/arm/aoptcpu.pas

@@ -40,6 +40,7 @@ Type
 Implementation
 
   uses
+    verbose,
     aasmbase,aasmcpu;
 
   function CanBeCond(p : tai) : boolean;
@@ -51,6 +52,7 @@ Implementation
   function TCpuAsmOptimizer.PeepHoleOptPass1Cpu(var p: tai): boolean;
     var
       next1: tai;
+      hp1: tai;
     begin
       result := false;
       case p.typ of
@@ -82,6 +84,24 @@ Implementation
                      (taicpu(p).oper[2]^.shifterop^.shiftmode=taicpu(next1).oper[2]^.shifterop^.shiftmode) then
                     begin
                       inc(taicpu(p).oper[2]^.shifterop^.shiftimm,taicpu(next1).oper[2]^.shifterop^.shiftimm);
+                      { avoid overflows }
+                      if taicpu(p).oper[2]^.shifterop^.shiftimm>31 then
+                        case taicpu(p).oper[2]^.shifterop^.shiftmode of
+                          SM_ROR:
+                            taicpu(p).oper[2]^.shifterop^.shiftimm:=taicpu(p).oper[2]^.shifterop^.shiftimm and 31;
+                          SM_ASR:
+                            taicpu(p).oper[2]^.shifterop^.shiftimm:=31;
+                          SM_LSR,
+                          SM_LSL:
+                            begin
+                              hp1:=taicpu.op_reg_const(A_MOV,taicpu(p).oper[0]^.reg,0);
+                              InsertLLItem(p.previous, p.next, hp1);
+                              p.free;
+                              p:=hp1;
+                            end;
+                          else
+                            internalerror(2008072803);
+                        end;
                       asml.remove(next1);
                       next1.free;
                       result := true;

+ 64 - 1
compiler/arm/armatt.inc

@@ -111,5 +111,68 @@
 'smultt',
 'smulwb',
 'smulwt',
-'strd'
+'strd',
+'fabsd',
+'fabss',
+'faddd',
+'fadds',
+'fcmpd',
+'fcmped',
+'fcmpes',
+'fcmpezd',
+'fcmpezs',
+'fcmps',
+'fcmpzd',
+'fcmpzs',
+'fcpyd',
+'fcpys',
+'fcvtds',
+'fcvtsd',
+'fdivd',
+'fdivs',
+'fldd',
+'fldmd',
+'fldms',
+'fldmx',
+'flds',
+'fmacd',
+'fmacs',
+'fmdhr',
+'fmdlr',
+'fmrdh',
+'fmrdl',
+'fmrs',
+'fmrx',
+'fmscd',
+'fmscs',
+'fmsr',
+'fmstat',
+'fmuld',
+'fmuls',
+'fmxr',
+'fnegd',
+'fnegs',
+'fnmacd',
+'fnmacs',
+'fnmscd',
+'fnmscs',
+'fnmuld',
+'fnmuls',
+'fsitod',
+'fsitos',
+'fsqrtd',
+'fsqrts',
+'fstd',
+'fstmd',
+'fstms',
+'fstmx',
+'fsts',
+'fsubd',
+'fsubs',
+'ftosid',
+'ftosis',
+'ftouid',
+'ftouis',
+'fuitod',
+'fuitos'
 );

+ 63 - 0
compiler/arm/armatts.inc

@@ -111,5 +111,68 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
 attsufNONE
 );

+ 129 - 0
compiler/arm/armins.dat

@@ -442,3 +442,132 @@ reg32,reg32,reg32,reg32  \x16\x00\x80\x90		 ARM7
 [SMULWTcc]
 
 [STRDcc]
+
+;
+; vfp instructions
+;
+[FABSDcc]
+
+[FABSScc]
+
+[FADDDcc]
+
+[FADDScc]
+
+[FCMPDcc]
+
+[FCMPEDcc]
+
+[FCMPEScc]
+
+[FCMPEZDcc]
+
+[FCMPEZScc]
+
+[FCMPScc]
+
+[FCMPZDcc]
+
+[FCMPZScc]
+
+[FCPYDcc]
+
+[FCPYScc]
+
+[FCVTDScc]
+
+[FCVTSDcc]
+
+[FDIVDcc]
+
+[FDIVScc]
+
+[FLDDcc]
+
+[FLDMDcc]
+
+[FLDMScc]
+
+[FLDMXcc]
+
+[FLDScc]
+
+[FMACDcc]
+
+[FMACScc]
+
+[FMDHRcc]
+
+[FMDLRcc]
+
+[FMRDHcc]
+
+[FMRDLcc]
+
+[FMRScc]
+
+[FMRXcc]
+
+[FMSCDcc]
+
+[FMSCScc]
+
+[FMSRcc]
+
+[FMSTATcc]
+
+[FMULDcc]
+
+[FMULScc]
+
+[FMXRcc]
+
+[FNEGDcc]
+
+[FNEGScc]
+
+[FNMACDcc]
+
+[FNMACScc]
+
+[FNMSCDcc]
+
+[FNMSCScc]
+
+[FNMULDcc]
+
+[FNMULScc]
+
+[FSITODcc]
+
+[FSITOScc]
+
+[FSQRTDcc]
+
+[FSQRTScc]
+
+[FSTDcc]
+
+[FSTMDcc]
+
+[FSTMScc]
+
+[FSTMXcc]
+
+[FSTScc]
+
+[FSUBDcc]
+
+[FSUBScc]
+
+[FTOSIDcc]
+
+[FTOSIScc]
+
+[FTOUIDcc]
+
+[FTOUIScc]
+
+[FUITODcc]
+
+[FUITOScc]

+ 64 - 1
compiler/arm/armop.inc

@@ -111,5 +111,68 @@ A_SMULTB,
 A_SMULTT,
 A_SMULWB,
 A_SMULWT,
-A_STRD
+A_STRD,
+A_FABSD,
+A_FABSS,
+A_FADDD,
+A_FADDS,
+A_FCMPD,
+A_FCMPED,
+A_FCMPES,
+A_FCMPEZD,
+A_FCMPEZS,
+A_FCMPS,
+A_FCMPZD,
+A_FCMPZS,
+A_FCPYD,
+A_FCPYS,
+A_FCVTDS,
+A_FCVTSD,
+A_FDIVD,
+A_FDIVS,
+A_FLDD,
+A_FLDMD,
+A_FLDMS,
+A_FLDMX,
+A_FLDS,
+A_FMACD,
+A_FMACS,
+A_FMDHR,
+A_FMDLR,
+A_FMRDH,
+A_FMRDL,
+A_FMRS,
+A_FMRX,
+A_FMSCD,
+A_FMSCS,
+A_FMSR,
+A_FMSTAT,
+A_FMULD,
+A_FMULS,
+A_FMXR,
+A_FNEGD,
+A_FNEGS,
+A_FNMACD,
+A_FNMACS,
+A_FNMSCD,
+A_FNMSCS,
+A_FNMULD,
+A_FNMULS,
+A_FSITOD,
+A_FSITOS,
+A_FSQRTD,
+A_FSQRTS,
+A_FSTD,
+A_FSTMD,
+A_FSTMS,
+A_FSTMX,
+A_FSTS,
+A_FSUBD,
+A_FSUBS,
+A_FTOSID,
+A_FTOSIS,
+A_FTOUID,
+A_FTOUIS,
+A_FUITOD,
+A_FUITOS
 );

+ 127 - 13
compiler/arm/cgcpu.pas

@@ -46,7 +46,7 @@ unit cgcpu;
         procedure a_param_ref(list : TAsmList;size : tcgsize;const r : treference;const paraloc : TCGPara);override;
         procedure a_paramaddr_ref(list : TAsmList;const r : treference;const paraloc : TCGPara);override;
 
-        procedure a_call_name(list : TAsmList;const s : string);override;
+        procedure a_call_name(list : TAsmList;const s : string; weak: boolean);override;
         procedure a_call_reg(list : TAsmList;reg: tregister);override;
         procedure a_call_ref(list : TAsmList;ref: treference);override;
 
@@ -106,11 +106,13 @@ unit cgcpu;
         function handle_load_store(list:TAsmList;op: tasmop;oppostfix : toppostfix;reg:tregister;ref: treference):treference;
 
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
-        procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);
+        procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint); override;
+        procedure g_stackpointer_alloc(list : TAsmList;size : longint);override;
       private
         { clear out potential overflow bits from 8 or 16 bit operations  }
         { the upper 24/16 bits of a register after an operation          }
         procedure maybeadjustresult(list: TAsmList; op: TOpCg; size: tcgsize; dst: tregister);
+        function get_darwin_call_stub(const s: string; weak: boolean): tasmsymbol;
       end;
 
       tcg64farm = class(tcg64f32)
@@ -166,9 +168,15 @@ unit cgcpu;
       begin
         inherited init_register_allocators;
         { currently, we save R14 always, so we can use it }
-        rg[R_INTREGISTER]:=trgintcpu.create(R_INTREGISTER,R_SUBWHOLE,
-            [RS_R0,RS_R1,RS_R2,RS_R3,RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,
-             RS_R9,RS_R10,RS_R12,RS_R14],first_int_imreg,[]);
+        if (target_info.system<>system_arm_darwin) then
+          rg[R_INTREGISTER]:=trgintcpu.create(R_INTREGISTER,R_SUBWHOLE,
+              [RS_R0,RS_R1,RS_R2,RS_R3,RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,
+               RS_R9,RS_R10,RS_R12,RS_R14],first_int_imreg,[])
+        else
+          { r9 is not available on Darwin according to the llvm code generator }
+          rg[R_INTREGISTER]:=trgintcpu.create(R_INTREGISTER,R_SUBWHOLE,
+              [RS_R0,RS_R1,RS_R2,RS_R3,RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,
+               RS_R10,RS_R12,RS_R14],first_int_imreg,[]);
         rg[R_FPUREGISTER]:=trgcpu.create(R_FPUREGISTER,R_SUBNONE,
             [RS_F0,RS_F1,RS_F2,RS_F3,RS_F4,RS_F5,RS_F6,RS_F7],first_fpu_imreg,[]);
         rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBNONE,
@@ -278,9 +286,15 @@ unit cgcpu;
       end;
 
 
-    procedure tcgarm.a_call_name(list : TAsmList;const s : string);
+    procedure tcgarm.a_call_name(list : TAsmList;const s : string; weak: boolean);
       begin
-        list.concat(taicpu.op_sym(A_BL,current_asmdata.RefAsmSymbol(s)));
+        if target_info.system<>system_arm_darwin then
+          if not weak then
+            list.concat(taicpu.op_sym(A_BL,current_asmdata.RefAsmSymbol(s)))
+          else
+            list.concat(taicpu.op_sym(A_BL,current_asmdata.WeakRefAsmSymbol(s)))
+        else
+          list.concat(taicpu.op_sym(A_BL,get_darwin_call_stub(s,weak)));
 {
         the compiler does not properly set this flag anymore in pass 1, and
         for now we only need it after pass 2 (I hope) (JM)
@@ -346,7 +360,7 @@ unit cgcpu;
     const
       op_reg_reg_opcg2asmop: array[TOpCG] of tasmop =
         (A_NONE,A_MOV,A_ADD,A_AND,A_NONE,A_NONE,A_MUL,A_MUL,A_NONE,A_NONE,A_ORR,
-         A_NONE,A_NONE,A_NONE,A_SUB,A_EOR);
+         A_NONE,A_NONE,A_NONE,A_SUB,A_EOR,A_NONE,A_NONE);
 
 
     procedure tcgarm.a_op_const_reg_reg(list: TAsmList; op: TOpCg;
@@ -375,7 +389,7 @@ unit cgcpu;
         l1 : longint;
       begin
         ovloc.loc:=LOC_VOID;
-        if is_shifter_const(-a,shift) then
+        if {$ifopt R+}(a<>-2147483648) and{$endif} is_shifter_const(-a,shift) then
           case op of
             OP_ADD:
               begin
@@ -408,6 +422,34 @@ unit cgcpu;
                 else
                  list.concat(taicpu.op_reg_reg(A_MOV,dst,src));
               end;
+            OP_ROL:
+              begin
+                if a>32 then
+                  internalerror(200308294);
+                if a<>0 then
+                  begin
+                    shifterop_reset(so);
+                    so.shiftmode:=SM_ROR;
+                    so.shiftimm:=32-a;
+                    list.concat(taicpu.op_reg_reg_shifterop(A_MOV,dst,src,so));
+                  end
+                else
+                 list.concat(taicpu.op_reg_reg(A_MOV,dst,src));
+              end;
+            OP_ROR:
+              begin
+                if a>32 then
+                  internalerror(200308294);
+                if a<>0 then
+                  begin
+                    shifterop_reset(so);
+                    so.shiftmode:=SM_ROR;
+                    so.shiftimm:=a;
+                    list.concat(taicpu.op_reg_reg_shifterop(A_MOV,dst,src,so));
+                  end
+                else
+                 list.concat(taicpu.op_reg_reg(A_MOV,dst,src));
+              end;
             OP_SHR:
               begin
                 if a>32 then
@@ -517,6 +559,28 @@ unit cgcpu;
               so.shiftmode:=SM_ASR;
               list.concat(taicpu.op_reg_reg_shifterop(A_MOV,dst,src2,so));
             end;
+          OP_ROL:
+            begin
+              if not(size in [OS_32,OS_S32]) then
+                internalerror(2008072801);
+              { simulate ROL by ror'ing 32-value }
+              tmpreg:=getintregister(list,OS_32);
+              list.concat(taicpu.op_reg_const(A_MOV,tmpreg,32));
+              list.concat(taicpu.op_reg_reg_reg(A_SUB,src1,tmpreg,src1));
+              shifterop_reset(so);
+              so.rs:=src1;
+              so.shiftmode:=SM_ROR;
+              list.concat(taicpu.op_reg_reg_shifterop(A_MOV,dst,src2,so));
+            end;
+          OP_ROR:
+            begin
+              if not(size in [OS_32,OS_S32]) then
+                internalerror(2008072802);
+              shifterop_reset(so);
+              so.rs:=src1;
+              so.shiftmode:=SM_ROR;
+              list.concat(taicpu.op_reg_reg_shifterop(A_MOV,dst,src2,so));
+            end;
           OP_IMUL,
           OP_MUL:
             begin
@@ -1287,7 +1351,7 @@ unit cgcpu;
             if current_procinfo.framepointer<>NR_STACK_POINTER_REG then
               list.concat(taicpu.op_reg_reg_const(A_SUB,NR_FRAME_POINTER_REG,NR_R12,4));
 
-            { allocate necessary stack size
+           (* allocate necessary stack size
               not necessary according to Yury Sidorov
 
             { don't use a_op_const_reg_reg here because we don't allow register allocations
@@ -1349,7 +1413,7 @@ unit cgcpu;
                  end
              end
             else
-            }
+            *)
             if LocalSize<>0 then
               if not(is_shifter_const(localsize,shift)) then
                 begin
@@ -1608,7 +1672,7 @@ unit cgcpu;
         paramanager.freeparaloc(list,paraloc1);
         alloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
         alloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
-        a_call_name(list,'FPC_MOVE');
+        a_call_name(list,'FPC_MOVE',false);
         dealloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
         dealloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
         paraloc3.done;
@@ -1882,7 +1946,7 @@ unit cgcpu;
             internalerror(200409281);
         end;
 
-        a_call_name(list,'FPC_OVERFLOW');
+        a_call_name(list,'FPC_OVERFLOW',false);
         a_label(list,hl);
       end;
 
@@ -1962,6 +2026,11 @@ unit cgcpu;
             end;
       end;
 
+    procedure tcgarm.g_stackpointer_alloc(list: TAsmList; size: longint);
+      begin
+        internalerror(200807237);
+      end;
+
 
     procedure tcgarm.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
 
@@ -2044,6 +2113,51 @@ unit cgcpu;
       end;
 
 
+    function tcgarm.get_darwin_call_stub(const s: string; weak: boolean): tasmsymbol;
+      var
+        stubname: string;
+        l1: tasmsymbol;
+        href: treference;
+      begin
+        stubname := 'L'+s+'$stub';
+        result := current_asmdata.getasmsymbol(stubname);
+        if assigned(result) then
+          exit;
+
+        if current_asmdata.asmlists[al_imports]=nil then
+          current_asmdata.asmlists[al_imports]:=TAsmList.create;
+
+        current_asmdata.asmlists[al_imports].concat(Tai_section.create(sec_stub,'',0));
+        current_asmdata.asmlists[al_imports].concat(Tai_align.Create(4));
+        result := current_asmdata.RefAsmSymbol(stubname);
+        current_asmdata.asmlists[al_imports].concat(Tai_symbol.Create(result,0));
+        { register as a weak symbol if necessary }
+        if weak then
+          current_asmdata.weakrefasmsymbol(s);
+        current_asmdata.asmlists[al_imports].concat(tai_directive.create(asd_indirect_symbol,s));
+        
+        if not(cs_create_pic in current_settings.moduleswitches) then
+          begin
+            l1 := current_asmdata.RefAsmSymbol('L'+s+'$slp');
+            reference_reset_symbol(href,l1,0);
+            href.refaddr:=addr_full;
+            current_asmdata.asmlists[al_imports].concat(taicpu.op_reg_ref(A_LDR,NR_R12,href));
+            reference_reset_base(href,NR_R12,0);
+            current_asmdata.asmlists[al_imports].concat(taicpu.op_reg_ref(A_LDR,NR_R15,href));
+            current_asmdata.asmlists[al_imports].concat(Tai_symbol.Create(l1,0));
+            l1 := current_asmdata.RefAsmSymbol('L'+s+'$lazy_ptr');
+            current_asmdata.asmlists[al_imports].concat(tai_const.create_sym(l1));
+          end
+        else
+          internalerror(2008100401);
+        
+        current_asmdata.asmlists[al_imports].concat(tai_directive.create(asd_lazy_symbol_pointer,''));
+        current_asmdata.asmlists[al_imports].concat(Tai_symbol.Create(l1,0));
+        current_asmdata.asmlists[al_imports].concat(tai_directive.create(asd_indirect_symbol,s));
+        current_asmdata.asmlists[al_imports].concat(tai_const.createname('dyld_stub_binding_helper',0));
+      end;
+
+
     procedure tcg64farm.a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);
       begin
         case op of

+ 1 - 1
compiler/arm/cpubase.pas

@@ -89,7 +89,7 @@ unit cpubase;
       first_mm_supreg    = RS_S0;
       first_mm_imreg     = $20;
 
-{$warning TODO Calculate bsstart}
+{ TODO: Calculate bsstart}
       regnumber_count_bsstart = 64;
 
       regnumber_table : array[tregisterindex] of tregister = (

+ 6 - 2
compiler/arm/cpupara.pas

@@ -332,7 +332,9 @@ unit cpupara;
                         { align registers for eabi }
                         if (target_info.abi=abi_eabi) and
                           (paracgsize in [OS_F64,OS_64,OS_S64]) and
-                          (nextintreg in [RS_R1,RS_R3]) then
+                          (nextintreg in [RS_R1,RS_R3]) and
+                          { first location? }
+                          (paralen=8) then
                           inc(nextintreg);
                         { this is not abi compliant
                           why? (FK) }
@@ -386,7 +388,9 @@ unit cpupara;
                         { align stack for eabi }
                         if (target_info.abi=abi_eabi) and
                           (paracgsize in [OS_F64,OS_64,OS_S64]) and
-                          (stack_offset mod 8<>0) then
+                          (stack_offset mod 8<>0) and
+                          { first location? }
+                          (paralen=8) then
                           inc(stack_offset,8-(stack_offset mod 8));
 
                         paraloc^.size:=OS_ADDR;

+ 1 - 1
compiler/arm/cpupi.pas

@@ -90,7 +90,7 @@ unit cpupi;
         else
           floatsavesize:=0;
         floatsavesize:=align(floatsavesize,max(current_settings.alignment.localalignmin,4));
-        result:=Align(tg.direction*tg.lasttemp,max(current_settings.alignment.localalignmin,4))+maxpushedparasize+floatsavesize;
+        result:=Align(tg.direction*tg.lasttemp,max(current_settings.alignment.localalignmin,4))+maxpushedparasize+aint(floatsavesize);
         floatregstart:=tg.direction*result+maxpushedparasize;
         if tg.direction=1 then
           dec(floatregstart,floatsavesize);

+ 3 - 0
compiler/arm/cputarg.pas

@@ -56,6 +56,9 @@ implementation
     {$ifndef NOTARGETSYMBIAN}
       ,t_symbian
     {$endif}
+    {$ifndef NOTARGETBSD}
+      ,t_bsd
+    {$endif}
 
 {**************************************
              Assemblers

+ 0 - 1
compiler/arm/narmcon.pas

@@ -57,7 +57,6 @@ interface
         floattype2ait:array[tfloattype] of taitype=
           (ait_real_32bit,ait_real_64bit,ait_real_80bit,ait_comp_64bit,ait_comp_64bit,ait_real_128bit);
       var
-         hp1 : tai;
          lastlabel : tasmlabel;
          realait : taitype;
          hiloswapped : boolean;

+ 1 - 1
compiler/arm/narmmat.pas

@@ -68,7 +68,7 @@ implementation
           (nodetype=divn) and
           (ispowerof2(tordconstnode(right).value,power) or
            (tordconstnode(right).value=1) or
-           (tordconstnode(right).value=-1)
+           (tordconstnode(right).value=int64(-1))
           ) and
           not(is_64bitint(resultdef)) then
           result:=nil

+ 4 - 8
compiler/arm/raarmgas.pas

@@ -262,9 +262,7 @@ Unit raarmgas;
 
       procedure read_index(require_rbracket : boolean);
         var 
-          i : longint; 
-          w : word; 
-          recname : string; 
+          recname : string;
           o_int,s_int : aint;
         begin
           case actasmtoken of
@@ -651,7 +649,7 @@ Unit raarmgas;
         tempreg : tregister;
         ireg : tsuperregister;
         hl : tasmlabel;
-        ofs : longint;
+        {ofs : longint;}
         registerset : tcpuregisterset;
       Begin
         expr:='';
@@ -928,9 +926,7 @@ Unit raarmgas;
           PF_B,PF_D,PF_E,PF_P,PF_T,PF_H,PF_S);
 
       var
-        len,
-        j,
-        sufidx : longint;
+        j  : longint;
         hs : string;
         maxlen : longint;
         icond : tasmcond;
@@ -963,7 +959,7 @@ Unit raarmgas;
         actopcode:=A_NONE;
         for j:=maxlen downto 1 do
           begin
-            actopcode:=tasmop(PtrInt(iasmops.Find(copy(hs,1,j))));
+            actopcode:=tasmop(PtrUInt(iasmops.Find(copy(hs,1,j))));
             if actopcode<>A_NONE then
               begin
                 actasmtoken:=AS_OPCODE;

+ 0 - 5
compiler/assemble.pas

@@ -510,11 +510,6 @@ Implementation
           result:='-m68000 '+result;
 {$endif}
 
-{$ifdef arm}
-        if current_settings.fputype = fpu_soft then
-         result:='-mfpu=softvfp '+result;
-{$endif arm}
-
         if (cs_link_on_target in current_settings.globalswitches) then
          begin
            Replace(result,'$ASM',maybequoted(ScriptFixFileName(AsmFileName)));

+ 1 - 1
compiler/avr/cpubase.pas

@@ -102,7 +102,7 @@ unit cpubase;
       first_mm_supreg    = RS_INVALID;
       first_mm_imreg     = RS_INVALID;
 
-{$warning TODO Calculate bsstart}
+{ TODO: Calculate bsstart}
       regnumber_count_bsstart = 64;
 
       regnumber_table : array[tregisterindex] of tregister = (

+ 1 - 0
compiler/avr/cpunode.pas

@@ -35,6 +35,7 @@ unit cpunode;
          after the generic one (FK)
        }
        ,navradd
+       ,navrmat
        ;
 
 

+ 26 - 83
compiler/avr/navradd.pas

@@ -31,12 +31,13 @@ interface
     type
        tavraddnode = class(tcgaddnode)
        private
-          function  GetResFlags(unsigned:Boolean):TResFlags;
+         function  GetResFlags(unsigned:Boolean):TResFlags;
        protected
-          function pass_1 : tnode;override;
-          procedure second_cmpordinal;override;
-          procedure second_cmpsmallset;override;
-          procedure second_cmp64bit;override;
+         function pass_1 : tnode;override;
+         procedure second_cmpordinal;override;
+         procedure second_cmpsmallset;override;
+         procedure second_cmp64bit;override;
+         procedure second_cmp;
        end;
 
   implementation
@@ -160,65 +161,35 @@ interface
       end;
 
 
-    procedure tavraddnode.second_cmp64bit;
+    procedure tavraddnode.second_cmp;
       var
         unsigned : boolean;
-        oldnodetype : tnodetype;
+        tmpreg1,tmpreg2 : tregister;
+        i : longint;
       begin
-        {
         pass_left_right;
-        force_reg_left_right(false,false);
+        force_reg_left_right(true,false);
 
         unsigned:=not(is_signed(left.resultdef)) or
                   not(is_signed(right.resultdef));
 
-        { operation requiring proper N, Z and C flags ? }
-        if unsigned or (nodetype in [equaln,unequaln]) then
-          begin
-            location_reset(location,LOC_FLAGS,OS_NO);
-            location.resflags:=getresflags(unsigned);
-            current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reghi,right.location.register64.reghi));
-            current_asmdata.CurrAsmList.concat(setcondition(taicpu.op_reg_reg(A_CMP,left.location.register64.reglo,right.location.register64.reglo),C_EQ));
-          end
-        else
-        { operation requiring proper N, Z and V flags ? }
+        current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CP,left.location.register,right.location.register));
+        tmpreg1:=left.location.register;
+        tmpreg2:=right.location.register;
+
+        for i:=2 to tcgsize2size[left.location.size] do
           begin
-            location_reset(location,LOC_JUMP,OS_NO);
-            current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reghi,right.location.register64.reghi));
-            { the jump the sequence is a little bit hairy }
-            case nodetype of
-               ltn,gtn:
-                 begin
-                    cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(false),current_procinfo.CurrTrueLabel);
-                    { cheat a little bit for the negative test }
-                    toggleflag(nf_swapped);
-                    cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(false),current_procinfo.CurrFalseLabel);
-                    toggleflag(nf_swapped);
-                 end;
-               lten,gten:
-                 begin
-                    oldnodetype:=nodetype;
-                    if nodetype=lten then
-                      nodetype:=ltn
-                    else
-                      nodetype:=gtn;
-                    cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrTrueLabel);
-                    { cheat for the negative test }
-                    if nodetype=ltn then
-                      nodetype:=gtn
-                    else
-                      nodetype:=ltn;
-                    cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrFalseLabel);
-                    nodetype:=oldnodetype;
-                 end;
-            end;
-            current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reglo,right.location.register64.reglo));
-            { the comparisaion of the low dword have to be
-               always unsigned!                            }
-            cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrTrueLabel);
-            cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+            current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,tmpreg2));
           end;
-        }
+
+        location_reset(location,LOC_FLAGS,OS_NO);
+        location.resflags:=getresflags(unsigned);
+      end;
+
+
+    procedure tavraddnode.second_cmp64bit;
+      begin
+        second_cmp;
       end;
 
 
@@ -238,36 +209,8 @@ interface
 
 
     procedure tavraddnode.second_cmpordinal;
-      var
-        unsigned : boolean;
-        tmpreg : tregister;
-        b : byte;
       begin
-        {
-        pass_left_right;
-        force_reg_left_right(true,true);
-
-        unsigned:=not(is_signed(left.resultdef)) or
-                  not(is_signed(right.resultdef));
-
-        if right.location.loc = LOC_CONSTANT then
-          begin
-             if is_shifter_const(right.location.value,b) then
-               current_asmdata.CurrAsmList.concat(taicpu.op_reg_const(A_CMP,left.location.register,right.location.value))
-             else
-               begin
-                 tmpreg:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
-                 cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_INT,
-                   right.location.value,tmpreg);
-                 current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register,tmpreg));
-               end;
-          end
-        else
-          current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register,right.location.register));
-
-        location_reset(location,LOC_FLAGS,OS_NO);
-        location.resflags:=getresflags(unsigned);
-        }
+        second_cmp;
       end;
 
 begin

+ 264 - 0
compiler/avr/navrmat.pas

@@ -0,0 +1,264 @@
+{
+    Copyright (c) 1998-2008 by Florian Klaempfl
+
+    Generates AVR assembler for math nodes
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit navrmat;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+      node,nmat,ncgmat;
+
+    type
+      tavrmoddivnode = class(tmoddivnode)
+        function first_moddivint: tnode;override;
+        procedure pass_generate_code;override;
+      end;
+
+      tavrnotnode = class(tcgnotnode)
+        procedure second_boolean;override;
+      end;
+
+implementation
+
+    uses
+      globtype,systems,
+      cutils,verbose,globals,constexp,
+      aasmbase,aasmcpu,aasmtai,aasmdata,
+      defutil,
+      cgbase,cgobj,cgutils,
+      pass_2,procinfo,
+      ncon,
+      cpubase,
+      ncgutil,cgcpu;
+
+{*****************************************************************************
+                             TAVRMODDIVNODE
+*****************************************************************************}
+
+    function tavrmoddivnode.first_moddivint: tnode;
+      var
+        power  : longint;
+      begin
+        if (right.nodetype=ordconstn) and
+          (nodetype=divn) and
+          (ispowerof2(tordconstnode(right).value,power) or
+           (tordconstnode(right).value=1) or
+           (tordconstnode(right).value=int64(-1))
+          ) and
+          not(is_64bitint(resultdef)) then
+          result:=nil
+        else
+          result:=inherited first_moddivint;
+      end;
+
+
+    procedure tavrmoddivnode.pass_generate_code;
+      var
+        power  : longint;
+        numerator,
+        helper1,
+        helper2,
+        resultreg  : tregister;
+        size       : Tcgsize;
+        so : tshifterop;
+{
+       procedure genOrdConstNodeDiv;
+         begin
+           if tordconstnode(right).value=0 then
+             internalerror(2005061701)
+           else if tordconstnode(right).value=1 then
+             cg.a_load_reg_reg(current_asmdata.CurrAsmList, OS_INT, OS_INT, numerator, resultreg)
+           else if (tordconstnode(right).value = int64(-1)) then
+             begin
+               // note: only in the signed case possible..., may overflow
+               current_asmdata.CurrAsmList.concat(setoppostfix(taicpu.op_reg_reg(A_MVN,
+                 resultreg,numerator),toppostfix(ord(cs_check_overflow in current_settings.localswitches)*ord(PF_S))));
+             end
+           else if ispowerof2(tordconstnode(right).value,power) then
+             begin
+               if (is_signed(right.resultdef)) then
+                 begin
+                    helper1:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                    helper2:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                    shifterop_reset(so);
+                    so.shiftmode:=SM_ASR;
+                    so.shiftimm:=31;
+                    current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_shifterop(A_MOV,helper1,numerator,so));
+                    shifterop_reset(so);
+                    so.shiftmode:=SM_LSR;
+                    so.shiftimm:=32-power;
+                    current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg_shifterop(A_ADD,helper2,numerator,helper1,so));
+                    shifterop_reset(so);
+                    so.shiftmode:=SM_ASR;
+                    so.shiftimm:=power;
+                    current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_shifterop(A_MOV,resultreg,helper2,so));
+                  end
+               else
+                 cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHR,OS_INT,power,numerator,resultreg)
+             end;
+         end;
+}
+{
+       procedure genOrdConstNodeMod;
+         var
+             modreg, maskreg, tempreg : tregister;
+         begin
+             if (tordconstnode(right).value = 0) then begin
+                 internalerror(2005061702);
+             end
+             else if (abs(tordconstnode(right).value.svalue) = 1) then
+             begin
+                // x mod +/-1 is always zero
+                cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, 0, resultreg);
+             end
+             else if (ispowerof2(tordconstnode(right).value, power)) then
+             begin
+                 if (is_signed(right.resultdef)) then begin
+
+                     tempreg := cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
+                     maskreg := cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
+                     modreg := cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
+
+                     cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, abs(tordconstnode(right).value.svalue)-1, modreg);
+                     cg.a_op_const_reg_reg(current_asmdata.CurrAsmList, OP_SAR, OS_INT, 31, numerator, maskreg);
+                     cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_AND, OS_INT, numerator, modreg, tempreg);
+
+                     current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_ANDC, maskreg, maskreg, modreg));
+                     current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_const(A_SUBFIC, modreg, tempreg, 0));
+                     current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_SUBFE, modreg, modreg, modreg));
+                     cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_AND, OS_INT, modreg, maskreg, maskreg);
+                     cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_OR, OS_INT, maskreg, tempreg, resultreg);
+                 end else begin
+                     cg.a_op_const_reg_reg(current_asmdata.CurrAsmList, OP_AND, OS_INT, tordconstnode(right).value.svalue-1, numerator, resultreg);
+                 end;
+             end else begin
+                 genOrdConstNodeDiv();
+                 cg.a_op_const_reg_reg(current_asmdata.CurrAsmList, OP_MUL, OS_INT, tordconstnode(right).value.svalue, resultreg, resultreg);
+                 cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_SUB, OS_INT, resultreg, numerator, resultreg);
+             end;
+         end;
+}
+
+      begin
+{
+        secondpass(left);
+        secondpass(right);
+        location_copy(location,left.location);
+
+        { put numerator in register }
+        size:=def_cgsize(left.resultdef);
+        location_force_reg(current_asmdata.CurrAsmList,left.location,
+          size,true);
+        location_copy(location,left.location);
+        numerator:=location.register;
+        resultreg:=location.register;
+        if location.loc=LOC_CREGISTER then
+          begin
+            location.loc := LOC_REGISTER;
+            location.register := cg.getintregister(current_asmdata.CurrAsmList,size);
+            resultreg:=location.register;
+          end
+        else if (nodetype=modn) or (right.nodetype=ordconstn) then
+          begin
+            // for a modulus op, and for const nodes we need the result register
+            // to be an extra register
+            resultreg:=cg.getintregister(current_asmdata.CurrAsmList,size);
+          end;
+
+        if right.nodetype=ordconstn then
+          begin
+            if nodetype=divn then
+              genOrdConstNodeDiv
+            else
+//              genOrdConstNodeMod;
+          end;
+
+        location.register:=resultreg;
+
+        { unsigned division/module can only overflow in case of division by zero }
+        { (but checking this overflow flag is more convoluted than performing a  }
+        {  simple comparison with 0)                                             }
+        if is_signed(right.resultdef) then
+          cg.g_overflowcheck(current_asmdata.CurrAsmList,location,resultdef);
+}
+      end;
+
+{*****************************************************************************
+                               TAVRNOTNODE
+*****************************************************************************}
+
+    procedure tavrnotnode.second_boolean;
+      var
+        hl : tasmlabel;
+        tmpreg : tregister;
+        i : longint;
+      begin
+        { if the location is LOC_JUMP, we do the secondpass after the
+          labels are allocated
+        }
+        if left.expectloc=LOC_JUMP then
+          begin
+            hl:=current_procinfo.CurrTrueLabel;
+            current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
+            current_procinfo.CurrFalseLabel:=hl;
+            secondpass(left);
+            maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
+            hl:=current_procinfo.CurrTrueLabel;
+            current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
+            current_procinfo.CurrFalseLabel:=hl;
+            location.loc:=LOC_JUMP;
+          end
+        else
+          begin
+            secondpass(left);
+            case left.location.loc of
+              LOC_FLAGS :
+                begin
+                  location_copy(location,left.location);
+                  inverse_flags(location.resflags);
+                end;
+              LOC_REGISTER,LOC_CREGISTER,LOC_REFERENCE,LOC_CREFERENCE,
+              LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF :
+                begin
+                  location_force_reg(current_asmdata.CurrAsmList,left.location,def_cgsize(left.resultdef),true);
+                  current_asmdata.CurrAsmList.concat(taicpu.op_reg_const(A_CPI,left.location.register,0));
+                  tmpreg:=left.location.register;
+
+                  { avr has no cpci, so we use the first register as "zero" register }
+                  for i:=2 to tcgsize2size[left.location.size] do
+                    begin
+                      current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg,left.location.register));
+                    end;
+                  location_reset(location,LOC_FLAGS,OS_NO);
+                  location.resflags:=F_EQ;
+               end;
+              else
+                internalerror(2003042401);
+            end;
+          end;
+      end;
+
+begin
+  cmoddivnode:=tavrmoddivnode;
+  cnotnode:=tavrnotnode;
+end.

+ 4 - 4
compiler/avr/raavrgas.pas

@@ -104,8 +104,8 @@ Unit raavrgas;
 
     procedure tavrattreader.ReadSym(oper : tavroperand);
       var
-         tempstr, mangledname : string;
-         typesize,l,k : longint;
+        tempstr, mangledname : string;
+        typesize,l,k : aint;
       begin
         tempstr:=actasmpattern;
         Consume(AS_ID);
@@ -209,7 +209,7 @@ Unit raavrgas;
     Procedure tavrattreader.BuildOperand(oper : tavroperand);
       var
         expr : string;
-        typesize,l : longint;
+        typesize,l : aint;
 
 
         procedure AddLabelOperand(hl:tasmlabel);
@@ -234,7 +234,7 @@ Unit raavrgas;
             hasdot  : boolean;
             l,
             toffset,
-            tsize   : longint;
+            tsize   : aint;
           begin
             if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
              exit;

+ 37 - 0
compiler/avr/rgcpu.pas

@@ -35,6 +35,7 @@ unit rgcpu;
 
      type
        trgcpu = class(trgobj)
+         procedure add_constraints(reg:tregister);override;
          procedure do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
          procedure do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
        end;
@@ -51,6 +52,42 @@ unit rgcpu;
       procinfo;
 
 
+    procedure trgcpu.add_constraints(reg:tregister);
+      var
+        supreg,i : Tsuperregister;
+      begin
+        case getsubreg(reg) of
+          { Let 64bit floats conflict with all odd float regs }
+          R_SUBFD:
+            begin
+            {
+              supreg:=getsupreg(reg);
+              i:=RS_F1;
+              while (i<=RS_F31) do
+                begin
+                  add_edge(supreg,i);
+                  inc(i,2);
+                end;
+            }
+            end;
+          { Let 64bit ints conflict with all odd int regs }
+          R_SUBQ:
+            begin
+              supreg:=getsupreg(reg);
+              {
+              i:=RS_G1;
+              while (i<=RS_I7) do
+                begin
+                  add_edge(supreg,i);
+                  inc(i,2);
+                end;
+              }
+            end;
+        end;
+      end;
+
+
+
     procedure trgcpu.do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
       begin
         inherited do_spill_read(list,pos,spilltemp,tempreg);

+ 9 - 7
compiler/charset.pas → compiler/ccharset.pas

@@ -12,11 +12,12 @@
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
- **********************************************************************
-}
-unit charset;
+ **********************************************************************}
 
-{$i fpcdefs.inc}
+{ this unit is included temporarily for 2.2 bootstrapping and can be
+  removed after the next release after 2.2.2 }
+{$mode objfpc}
+unit ccharset;
 
   interface
 
@@ -70,7 +71,7 @@ unit charset;
          t : text;
          s,hs : string;
          scanpos,charpos,unicodevalue : longint;
-         code : integer;
+         code : word;
          flag : tunicodecharmappingflag;
          p : punicodemap;
          lastchar : longint;
@@ -176,11 +177,11 @@ unit charset;
          hp : punicodemap;
 
       const
+         mapcache : string = '';
          mapcachep : punicodemap = nil;
 
       begin
-         if assigned(mapcachep) and
-            (mapcachep^.cpname=s) then
+         if (mapcache=s) and assigned(mapcachep) and (mapcachep^.cpname=s) then
            begin
               getmap:=mapcachep;
               exit;
@@ -191,6 +192,7 @@ unit charset;
               if hp^.cpname=s then
                 begin
                    getmap:=hp;
+                   mapcache:=s;
                    mapcachep:=hp;
                    exit;
                 end;

+ 279 - 45
compiler/cclasses.pas

@@ -216,6 +216,7 @@ type
     procedure Clear;
     function NameOfIndex(Index: Integer): ShortString; {$ifdef CCLASSESINLINE}inline;{$endif}
     function HashOfIndex(Index: Integer): LongWord; {$ifdef CCLASSESINLINE}inline;{$endif}
+    function GetNextCollision(Index: Integer): Integer;
     procedure Delete(Index: Integer);
     class procedure Error(const Msg: string; Data: PtrInt);
     function Expand: TFPHashList;
@@ -283,6 +284,7 @@ type
     function Add(const AName:shortstring;AObject: TObject): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
     function NameOfIndex(Index: Integer): ShortString; {$ifdef CCLASSESINLINE}inline;{$endif}
     function HashOfIndex(Index: Integer): LongWord; {$ifdef CCLASSESINLINE}inline;{$endif}
+    function GetNextCollision(Index: Integer): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
     procedure Delete(Index: Integer);
     function Expand: TFPHashObjectList; {$ifdef CCLASSESINLINE}inline;{$endif}
     function Extract(Item: TObject): TObject; {$ifdef CCLASSESINLINE}inline;{$endif}
@@ -423,7 +425,7 @@ type
        tdynamicblock = record
          pos,
          size,
-         used : integer;
+         used : longword;
          Next : pdynamicblock;
          data : tdynamicblockdata;
        end;
@@ -434,32 +436,76 @@ type
      type
        tdynamicarray = class
        private
-         FPosn       : integer;
+         FPosn       : longword;
          FPosnblock  : pdynamicblock;
          FCurrBlocksize,
-         FMaxBlocksize  : integer;
+         FMaxBlocksize  : longword;
          FFirstblock,
          FLastblock  : pdynamicblock;
          procedure grow;
        public
-         constructor Create(Ablocksize:integer);
+         constructor Create(Ablocksize:longword);
          destructor  Destroy;override;
          procedure reset;
-         function  size:integer;
-         procedure align(i:integer);
-         procedure seek(i:integer);
-         function  read(var d;len:integer):integer;
-         procedure write(const d;len:integer);
+         function  size:longword;
+         procedure align(i:longword);
+         procedure seek(i:longword);
+         function  read(var d;len:longword):longword;
+         procedure write(const d;len:longword);
          procedure writestr(const s:string); {$ifdef CCLASSESINLINE}inline;{$endif}
-         procedure readstream(f:TCStream;maxlen:longint);
+         procedure readstream(f:TCStream;maxlen:longword);
          procedure writestream(f:TCStream);
-         property  CurrBlockSize : integer read FCurrBlocksize;
+         property  CurrBlockSize : longword read FCurrBlocksize;
          property  FirstBlock : PDynamicBlock read FFirstBlock;
-         property  Pos : integer read FPosn;
+         property  Pos : longword read FPosn;
        end;
 
 
+{******************************************************************
+   THashSet (keys not limited to ShortString, no indexed access)
+*******************************************************************}
+
+       PPHashSetItem = ^PHashSetItem;
+       PHashSetItem = ^THashSetItem;
+       THashSetItem = record
+         Next: PHashSetItem;
+         Key: Pointer;
+         KeyLength: Integer;
+         HashValue: LongWord;
+         Data: TObject;
+       end;
+
+       THashSet = class(TObject)
+       private
+         FCount: LongWord;
+         FBucketCount: LongWord;
+         FBucket: PPHashSetItem;
+         FOwnsObjects: Boolean;
+         FOwnsKeys: Boolean;
+         function Lookup(Key: Pointer; KeyLen: Integer; var Found: Boolean;
+           CanCreate: Boolean): PHashSetItem;
+         procedure Resize(NewCapacity: LongWord);
+       public
+         constructor Create(InitSize: Integer; OwnKeys, OwnObjects: Boolean);
+         destructor Destroy; override;
+         procedure Clear;
+         { finds an entry by key }
+         function Find(Key: Pointer; KeyLen: Integer): PHashSetItem;
+         { finds an entry, creates one if not exists }
+         function FindOrAdd(Key: Pointer; KeyLen: Integer;
+           var Found: Boolean): PHashSetItem;
+         { finds an entry, creates one if not exists }
+         function FindOrAdd(Key: Pointer; KeyLen: Integer): PHashSetItem;
+         { returns Data by given Key }
+         function Get(Key: Pointer; KeyLen: Integer): TObject;
+         { removes an entry, returns False if entry wasn't there }
+         function Remove(Entry: PHashSetItem): Boolean;
+         property Count: LongWord read FCount;
+      end;
+
+
     function FPHash(const s:shortstring):LongWord;
+    function FPHash(P: PChar; Len: Integer): LongWord;
 
 
 implementation
@@ -1010,40 +1056,41 @@ end;
                             TFPHashList
 *****************************************************************************}
 
-    function FPHash1(const s:shortstring):LongWord;
+    function FPHash(const s:shortstring):LongWord;
       Var
-        g : LongWord;
         p,pmax : pchar;
       begin
+{$ifopt Q+}
+{$define overflowon}
+{$Q-}
+{$endif}
         result:=0;
         p:=@s[1];
         pmax:=@s[length(s)+1];
         while (p<pmax) do
           begin
-            result:=result shl 4 + LongWord(p^);
-            g:=result and LongWord($F0000000);
-            if g<>0 then
-              result:=result xor (g shr 24) xor g;
+            result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             inc(p);
           end;
-        If result=0 then
-          result:=$ffffffff;
+{$ifdef overflowon}
+{$Q+}
+{$undef overflowon}
+{$endif}
       end;
 
-    function FPHash(const s:shortstring):LongWord;
+    function FPHash(P: PChar; Len: Integer): LongWord;
       Var
-        p,pmax : pchar;
+        pmax : pchar;
       begin
 {$ifopt Q+}
 {$define overflowon}
 {$Q-}
 {$endif}
         result:=0;
-        p:=@s[1];
-        pmax:=@s[length(s)+1];
+        pmax:=p+len;
         while (p<pmax) do
           begin
-            result:=LongWord((result shl 5) - result) xor LongWord(P^);
+            result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             inc(p);
           end;
 {$ifdef overflowon}
@@ -1097,6 +1144,14 @@ begin
 end;
 
 
+function TFPHashList.GetNextCollision(Index: Integer): Integer;
+begin
+  Result:=-1;
+  if ((Index > -1) and (Index < FCount)) then
+    Result:=FHashList^[Index].NextIndex;
+end;
+
+
 function TFPHashList.Extract(item: Pointer): Pointer;
 var
   i : Integer;
@@ -1119,6 +1174,9 @@ begin
     exit;
   ReallocMem(FHashList, NewCapacity*SizeOf(THashItem));
   FCapacity := NewCapacity;
+  { Maybe expand hash also }
+  if FCapacity>FHashCapacity*MaxItemsPerHash then
+    SetHashCapacity(FCapacity div MaxItemsPerHash);
 end;
 
 
@@ -1237,6 +1295,7 @@ begin
       FHashList := nil;
     end;
   SetHashCapacity(1);
+  FHashTable^[0]:=-1; // sethashcapacity does not always call rehash
   if Assigned(FStrs) then
     begin
       FStrCount:=0;
@@ -1289,9 +1348,6 @@ begin
   else if FCapacity >= sizeof(ptrint) then
     inc(IncSize,sizeof(ptrint));
   SetCapacity(FCapacity + IncSize);
-  { Maybe expand hash also }
-  if FCount>FHashCapacity*MaxItemsPerHash then
-    SetHashCapacity(FCount div MaxItemsPerHash);
 end;
 
 procedure TFPHashList.StrExpand(MinIncSize:Integer);
@@ -1660,6 +1716,11 @@ begin
   Result := FHashList.HashOfIndex(Index);
 end;
 
+function TFPHashObjectList.GetNextCollision(Index: Integer): Integer;
+begin
+  Result := FHashList.GetNextCollision(Index);
+end;
+
 procedure TFPHashObjectList.Delete(Index: Integer);
 begin
   if OwnsObjects then
@@ -1764,7 +1825,6 @@ begin
 end;
 
 
-
 {****************************************************************************
                              TLinkedListItem
  ****************************************************************************}
@@ -2226,16 +2286,14 @@ end;
     function TCmdStrList.Find(const s:TCmdStr):TCmdStrListItem;
       var
         NewNode : TCmdStrListItem;
-        ups     : string;
       begin
         result:=nil;
         if s='' then
          exit;
-        ups:=upper(s);
         NewNode:=TCmdStrListItem(FFirst);
         while assigned(NewNode) do
          begin
-           if upper(NewNode.FPStr)=ups then
+           if SysUtils.CompareText(s, NewNode.FPStr)=0 then
             begin
               result:=NewNode;
               exit;
@@ -2261,7 +2319,7 @@ end;
                                 tdynamicarray
 ****************************************************************************}
 
-    constructor tdynamicarray.create(Ablocksize:integer);
+    constructor tdynamicarray.create(Ablocksize:longword);
       begin
         FPosn:=0;
         FPosnblock:=nil;
@@ -2286,7 +2344,7 @@ end;
       end;
 
 
-    function  tdynamicarray.size:integer;
+    function  tdynamicarray.size:longword;
       begin
         if assigned(FLastblock) then
          size:=FLastblock^.pos+FLastblock^.used
@@ -2351,9 +2409,9 @@ end;
       end;
 
 
-    procedure tdynamicarray.align(i:integer);
+    procedure tdynamicarray.align(i:longword);
       var
-        j : integer;
+        j : longword;
       begin
         j:=(FPosn mod i);
         if j<>0 then
@@ -2372,7 +2430,7 @@ end;
       end;
 
 
-    procedure tdynamicarray.seek(i:integer);
+    procedure tdynamicarray.seek(i:longword);
       begin
         if (i<FPosnblock^.pos) or (i>=FPosnblock^.pos+FPosnblock^.size) then
          begin
@@ -2403,10 +2461,10 @@ end;
       end;
 
 
-    procedure tdynamicarray.write(const d;len:integer);
+    procedure tdynamicarray.write(const d;len:longword);
       var
         p : pchar;
-        i,j : integer;
+        i,j : longword;
       begin
         p:=pchar(@d);
         while (len>0) do
@@ -2448,10 +2506,10 @@ end;
       end;
 
 
-    function tdynamicarray.read(var d;len:integer):integer;
+    function tdynamicarray.read(var d;len:longword):longword;
       var
         p : pchar;
-        i,j,res : integer;
+        i,j,res : longword;
       begin
         res:=0;
         p:=pchar(@d);
@@ -2484,12 +2542,10 @@ end;
       end;
 
 
-    procedure tdynamicarray.readstream(f:TCStream;maxlen:longint);
+    procedure tdynamicarray.readstream(f:TCStream;maxlen:longword);
       var
-        i,left : integer;
+        i,left : longword;
       begin
-        if maxlen=-1 then
-         maxlen:=maxlongint;
         repeat
           left:=FPosnblock^.size-FPosnblock^.used;
           if left>maxlen then
@@ -2523,4 +2579,182 @@ end;
          end;
       end;
 
+{****************************************************************************
+                                thashset
+****************************************************************************}
+
+    constructor THashSet.Create(InitSize: Integer; OwnKeys, OwnObjects: Boolean);
+      var
+        I: Integer;
+      begin
+        inherited Create;
+        FOwnsObjects := OwnObjects;
+        FOwnsKeys := OwnKeys;
+        I := 64;
+        while I < InitSize do I := I shl 1;
+        FBucketCount := I;
+        FBucket := AllocMem(I * sizeof(PHashSetItem));
+      end;
+
+
+    destructor THashSet.Destroy;
+      begin
+        Clear;
+        FreeMem(FBucket);
+        inherited Destroy;
+      end;
+
+
+    procedure THashSet.Clear;
+      var
+        I: Integer;
+        item, next: PHashSetItem;
+      begin
+        for I := 0 to FBucketCount-1 do
+        begin
+          item := FBucket[I];
+          while Assigned(item) do
+          begin
+            next := item^.Next;
+            if FOwnsObjects then
+              item^.Data.Free;
+            if FOwnsKeys then
+              FreeMem(item^.Key);
+            Dispose(item);
+            item := next;
+          end;
+        end;
+        FillChar(FBucket^, FBucketCount * sizeof(PHashSetItem), 0);
+      end;
+
+
+    function THashSet.Find(Key: Pointer; KeyLen: Integer): PHashSetItem;
+      var
+        Dummy: Boolean;
+      begin
+        Result := Lookup(Key, KeyLen, Dummy, False);
+      end;
+
+
+    function THashSet.FindOrAdd(Key: Pointer; KeyLen: Integer;
+        var Found: Boolean): PHashSetItem;
+      begin
+        Result := Lookup(Key, KeyLen, Found, True);
+      end;
+
+
+    function THashSet.FindOrAdd(Key: Pointer; KeyLen: Integer): PHashSetItem;
+      var
+        Dummy: Boolean;
+      begin
+        Result := Lookup(Key, KeyLen, Dummy, True);
+      end;
+
+
+    function THashSet.Get(Key: Pointer; KeyLen: Integer): TObject;
+      var
+        e: PHashSetItem;
+        Dummy: Boolean;
+      begin
+        e := Lookup(Key, KeyLen, Dummy, False);
+        if Assigned(e) then
+          Result := e^.Data
+        else
+          Result := nil;
+      end;
+
+
+    function THashSet.Lookup(Key: Pointer; KeyLen: Integer;
+      var Found: Boolean; CanCreate: Boolean): PHashSetItem;
+      var
+        Entry: PPHashSetItem;
+        h: LongWord;
+      begin
+        h := FPHash(Key, KeyLen);
+        Entry := @FBucket[h mod FBucketCount];
+        while Assigned(Entry^) and
+          not ((Entry^^.HashValue = h) and (Entry^^.KeyLength = KeyLen) and
+            (CompareByte(Entry^^.Key^, Key^, KeyLen) = 0)) do
+              Entry := @Entry^^.Next;
+        Found := Assigned(Entry^);
+        if Found or (not CanCreate) then
+          begin
+            Result := Entry^;
+            Exit;
+          end;
+        if FCount > FBucketCount then  { arbitrary limit, probably too high }
+          begin
+            { rehash and repeat search }
+            Resize(FBucketCount * 2);
+            Result := Lookup(Key, KeyLen, Found, CanCreate);
+          end
+        else
+          begin
+            New(Result);
+            if FOwnsKeys then
+            begin
+              GetMem(Result^.Key, KeyLen);
+              Move(Key^, Result^.Key^, KeyLen);
+            end
+            else
+              Result^.Key := Key;
+            Result^.KeyLength := KeyLen;
+            Result^.HashValue := h;
+            Result^.Data := nil;
+            Result^.Next := nil;
+            Inc(FCount);
+            Entry^ := Result;
+          end;
+        end;
+
+
+    procedure THashSet.Resize(NewCapacity: LongWord);
+      var
+        p, chain: PPHashSetItem;
+        i: Integer;
+        e, n: PHashSetItem;
+      begin
+        p := AllocMem(NewCapacity * sizeof(PHashSetItem));
+        for i := 0 to FBucketCount-1 do
+          begin
+            e := FBucket[i];
+            while Assigned(e) do
+            begin
+              chain := @p[e^.HashValue mod NewCapacity];
+              n := e^.Next;
+              e^.Next := chain^;
+              chain^ := e;
+              e := n;
+            end;
+          end;
+        FBucketCount := NewCapacity;
+        FreeMem(FBucket);
+        FBucket := p;
+      end;
+
+
+    function THashSet.Remove(Entry: PHashSetItem): Boolean;
+      var
+        chain: PPHashSetItem;
+      begin
+        chain := @FBucket[Entry^.HashValue mod FBucketCount];
+        while Assigned(chain^) do
+          begin
+            if chain^ = Entry then
+              begin
+                chain^ := Entry^.Next;
+                if FOwnsObjects then
+                  Entry^.Data.Free;
+                if FOwnsKeys then
+                  FreeMem(Entry^.Key);
+                Dispose(Entry);
+                Dec(FCount);
+                Result := True;
+                Exit;
+              end;
+            chain := @chain^^.Next;
+          end;
+        Result := False;
+      end;
+
 end.

+ 1 - 1
compiler/cfidwarf.pas

@@ -395,7 +395,7 @@ implementation
     procedure TDwarfAsmCFI.cfa_offset(list:TAsmList;reg:tregister;ofs:longint);
       begin
         cfa_advance_loc(list);
-{$warning TODO check if ref is a temp}
+{ TODO: check if ref is a temp}
         { offset must be positive }
         DwarfList.concat(tdwarfitem.create_reg_const(DW_CFA_offset_extended,doe_uleb,reg,doe_uleb,ofs div data_alignment_factor));
       end;

+ 3 - 2
compiler/cfileutl.pas

@@ -81,7 +81,7 @@ interface
       PCachedDirectoryEntry =  ^TCachedDirectoryEntry;
       TCachedDirectoryEntry = record
         RealName: TCmdStr;
-        Attr    : byte;
+        Attr    : longint;
       end;
 
       TDirectoryCache = class
@@ -298,7 +298,6 @@ implementation
     function TCachedDirectory.FileExistsCaseAware(const path, fn: TCmdStr; out FoundName: TCmdStr):boolean;
       var
         entry : PCachedDirectoryEntry;
-        Attr  : Longint;
       begin
         if (tf_files_case_aware in source_info.flags) then
           begin
@@ -984,10 +983,12 @@ implementation
         exit;
      { Support default macro's }
        DefaultReplacements(s);
+{$warnings off}
        if PathSeparator <> ';' then
         for i:=1 to length(s) do
          if s[i]=PathSeparator then
           s[i]:=';';
+{$warnings on}
      { get current dir }
        CurrentDir:=GetCurrentDir;
        repeat

+ 3 - 3
compiler/cg64f32.pas

@@ -742,7 +742,7 @@ unit cg64f32;
                  cg.a_cmp_const_reg_label(list,OS_32,OC_EQ,-1,hreg,neglabel);
                end;
              { For all other values we have a range check error }
-             cg.a_call_name(list,'FPC_RANGEERROR');
+             cg.a_call_name(list,'FPC_RANGEERROR',false);
 
              { if the high dword = 0, the low dword can be considered a }
              { simple cardinal                                          }
@@ -779,7 +779,7 @@ unit cg64f32;
                  current_asmdata.getjumplabel(neglabel);
                  cg.a_cmp_const_reg_label(list,OS_32,OC_LT,0,hreg,neglabel);
 
-                 cg.a_call_name(list,'FPC_RANGEERROR');
+                 cg.a_call_name(list,'FPC_RANGEERROR',false);
 
                  { if we get here, the 64bit value lies between }
                  { longint($80000000) and -1 (JM)               }
@@ -830,7 +830,7 @@ unit cg64f32;
                current_asmdata.getjumplabel(poslabel);
                cg.a_cmp_const_reg_label(list,opsize,OC_GTE,0,hreg,poslabel);
 
-               cg.a_call_name(list,'FPC_RANGEERROR');
+               cg.a_call_name(list,'FPC_RANGEERROR',false);
                cg.a_label(list,poslabel);
              end;
       end;

+ 4 - 2
compiler/cgbase.pas

@@ -102,7 +102,9 @@ interface
           OP_SHL,       { logical shift left       }
           OP_SHR,       { logical shift right      }
           OP_SUB,       { simple subtraction       }
-          OP_XOR        { simple exclusive or      }
+          OP_XOR,       { simple exclusive or      }
+          OP_ROL,       { rotate left              }
+          OP_ROR        { rotate right             }
         );
 
        {# Generic flag values - used for jump locations }
@@ -638,7 +640,7 @@ implementation
       const
         list: array[topcg] of boolean =
           (true,false,true,true,false,false,true,true,false,false,
-           true,false,false,false,false,true);
+           true,false,false,false,false,true,false,false);
       begin
         commutativeop := list[op];
       end;

+ 78 - 37
compiler/cgobj.pas

@@ -83,7 +83,7 @@ unit cgobj;
           function getaddressregister(list:TAsmList):Tregister;virtual;
           function getfpuregister(list:TAsmList;size:Tcgsize):Tregister;virtual;
           function getmmregister(list:TAsmList;size:Tcgsize):Tregister;virtual;
-          function getflagregister(list:TAsmList;size:Tcgsize):Tregister;virtual;abstract;
+          function getflagregister(list:TAsmList;size:Tcgsize):Tregister;virtual;
           {Does the generic cg need SIMD registers, like getmmxregister? Or should
            the cpu specific child cg object have such a method?}
 
@@ -196,7 +196,7 @@ unit cgobj;
              a temp register on most cpu's resulting in conflicts with the
              registers used for the parameters (PFV)
           }
-          procedure a_call_name(list : TAsmList;const s : string);virtual; abstract;
+          procedure a_call_name(list : TAsmList;const s : string; weak: boolean);virtual; abstract;
           procedure a_call_reg(list : TAsmList;reg : tregister);virtual; abstract;
           procedure a_call_ref(list : TAsmList;ref : treference);virtual; abstract;
           { same as a_call_name, might be overriden on certain architectures to emit
@@ -267,15 +267,15 @@ unit cgobj;
           procedure a_paramfpu_ref(list : TAsmList;size : tcgsize;const ref : treference;const cgpara : TCGPara);virtual;
 
           { vector register move instructions }
-          procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize : tcgsize;reg1, reg2: tregister;shuffle : pmmshuffle); virtual; abstract;
-          procedure a_loadmm_ref_reg(list: TAsmList; fromsize, tosize : tcgsize;const ref: treference; reg: tregister;shuffle : pmmshuffle); virtual; abstract;
-          procedure a_loadmm_reg_ref(list: TAsmList; fromsize, tosize : tcgsize;reg: tregister; const ref: treference;shuffle : pmmshuffle); virtual; abstract;
+          procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize : tcgsize;reg1, reg2: tregister;shuffle : pmmshuffle); virtual;
+          procedure a_loadmm_ref_reg(list: TAsmList; fromsize, tosize : tcgsize;const ref: treference; reg: tregister;shuffle : pmmshuffle); virtual;
+          procedure a_loadmm_reg_ref(list: TAsmList; fromsize, tosize : tcgsize;reg: tregister; const ref: treference;shuffle : pmmshuffle); virtual;
           procedure a_loadmm_loc_reg(list: TAsmList; size: tcgsize; const loc: tlocation; const reg: tregister;shuffle : pmmshuffle);
           procedure a_loadmm_reg_loc(list: TAsmList; size: tcgsize; const reg: tregister; const loc: tlocation;shuffle : pmmshuffle);
           procedure a_parammm_reg(list: TAsmList; size: tcgsize; reg: tregister;const cgpara : TCGPara;shuffle : pmmshuffle); virtual;
           procedure a_parammm_ref(list: TAsmList; size: tcgsize; const ref: treference;const cgpara : TCGPara;shuffle : pmmshuffle); virtual;
           procedure a_parammm_loc(list: TAsmList; const loc: tlocation; const cgpara : TCGPara;shuffle : pmmshuffle); virtual;
-          procedure a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size : tcgsize;src,dst: tregister;shuffle : pmmshuffle); virtual;abstract;
+          procedure a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size : tcgsize;src,dst: tregister;shuffle : pmmshuffle); virtual;
           procedure a_opmm_ref_reg(list: TAsmList; Op: TOpCG; size : tcgsize;const ref: treference; reg: tregister;shuffle : pmmshuffle); virtual;
           procedure a_opmm_loc_reg(list: TAsmList; Op: TOpCG; size : tcgsize;const loc: tlocation; reg: tregister;shuffle : pmmshuffle); virtual;
           procedure a_opmm_reg_ref(list: TAsmList; Op: TOpCG; size : tcgsize;reg: tregister;const ref: treference; shuffle : pmmshuffle); virtual;
@@ -476,7 +476,7 @@ unit cgobj;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual;abstract;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);virtual;
 
-          function g_indirect_sym_load(list:TAsmList;const symname: string): tregister;virtual;
+          function g_indirect_sym_load(list:TAsmList;const symname: string; weak: boolean): tregister;virtual;
           { generate a stub which only purpose is to pass control the given external method,
           setting up any additional environment before doing so (if required).
 
@@ -1579,7 +1579,7 @@ implementation
                   SL_SETZERO,
                   SL_SETMAX:
                     a_load_regconst_subsetreg_intern(list,fromsize,subsetsize,fromreg,tosreg,slopt);
-                  else                 
+                  else
                     a_load_subsetreg_subsetreg(list,subsetsize,subsetsize,fromsreg,tosreg);
                 end;
                 valuereg := makeregsize(list,valuereg,loadsize);
@@ -1611,7 +1611,7 @@ implementation
                   SL_SETZERO,
                   SL_SETMAX:
                     a_load_regconst_subsetreg_intern(list,fromsize,subsetsize,fromreg,tosreg,slopt);
-                  else                 
+                  else
                     a_load_subsetreg_subsetreg(list,subsetsize,subsetsize,fromsreg,tosreg);
                 end;
                 extra_value_reg := makeregsize(list,extra_value_reg,loadsize);
@@ -2465,7 +2465,7 @@ implementation
                if a = 0 then
                  op:=OP_NONE;
             end;
-        OP_SAR,OP_SHL,OP_SHR:
+        OP_SAR,OP_SHL,OP_SHR,OP_ROL,OP_ROR:
            begin
               if a = 0 then
                 op:=OP_NONE;
@@ -2534,7 +2534,7 @@ implementation
             LOC_REGISTER,LOC_CREGISTER:
               begin
                 { paramfpu_ref does the check_simpe_location check here if necessary }
-                tg.GetTemp(list,TCGSize2Size[size],tt_normal,ref);
+                tg.GetTemp(list,TCGSize2Size[size],TCGSize2Size[size],tt_normal,ref);
                 a_loadfpu_reg_ref(list,size,size,r,ref);
                 a_paramfpu_ref(list,size,ref,cgpara);
                 tg.Ungettemp(list,ref);
@@ -3072,7 +3072,7 @@ implementation
         paramanager.freeparaloc(list,cgpara2);
         paramanager.freeparaloc(list,cgpara1);
         allocallcpuregisters(list);
-        a_call_name(list,'FPC_SHORTSTR_ASSIGN');
+        a_call_name(list,'FPC_SHORTSTR_ASSIGN',false);
         deallocallcpuregisters(list);
         cgpara3.done;
         cgpara2.done;
@@ -3094,7 +3094,7 @@ implementation
         paramanager.freeparaloc(list,cgpara2);
         paramanager.freeparaloc(list,cgpara1);
         allocallcpuregisters(list);
-        a_call_name(list,'FPC_VARIANT_COPY_OVERWRITE');
+        a_call_name(list,'FPC_VARIANT_COPY_OVERWRITE',false);
         deallocallcpuregisters(list);
         cgpara2.done;
         cgpara1.done;
@@ -3112,13 +3112,15 @@ implementation
          paramanager.getintparaloc(pocall_default,1,cgpara1);
          paramanager.getintparaloc(pocall_default,2,cgpara2);
          if is_interfacecom(t) then
-          incrfunc:='FPC_INTF_INCR_REF'
+           incrfunc:='FPC_INTF_INCR_REF'
          else if is_ansistring(t) then
-          incrfunc:='FPC_ANSISTR_INCR_REF'
+           incrfunc:='FPC_ANSISTR_INCR_REF'
          else if is_widestring(t) then
-          incrfunc:='FPC_WIDESTR_INCR_REF'
+           incrfunc:='FPC_WIDESTR_INCR_REF'
+         else if is_unicodestring(t) then
+           incrfunc:='FPC_UNICODESTR_INCR_REF'
          else if is_dynamic_array(t) then
-          incrfunc:='FPC_DYNARRAY_INCR_REF'
+           incrfunc:='FPC_DYNARRAY_INCR_REF'
          else
           incrfunc:='';
          { call the special incr function or the generic addref }
@@ -3134,7 +3136,7 @@ implementation
               a_param_ref(list,OS_ADDR,ref,cgpara1);
             paramanager.freeparaloc(list,cgpara1);
             allocallcpuregisters(list);
-            a_call_name(list,incrfunc);
+            a_call_name(list,incrfunc,false);
             deallocallcpuregisters(list);
           end
          else
@@ -3147,7 +3149,7 @@ implementation
             paramanager.freeparaloc(list,cgpara1);
             paramanager.freeparaloc(list,cgpara2);
             allocallcpuregisters(list);
-            a_call_name(list,'FPC_ADDREF');
+            a_call_name(list,'FPC_ADDREF',false);
             deallocallcpuregisters(list);
           end;
          cgpara2.done;
@@ -3174,6 +3176,8 @@ implementation
           decrfunc:='FPC_ANSISTR_DECR_REF'
          else if is_widestring(t) then
           decrfunc:='FPC_WIDESTR_DECR_REF'
+         else if is_unicodestring(t) then
+          decrfunc:='FPC_UNICODESTR_DECR_REF'
          else if is_dynamic_array(t) then
           begin
             decrfunc:='FPC_DYNARRAY_DECR_REF';
@@ -3202,7 +3206,7 @@ implementation
             a_param_reg(list,OS_ADDR,tempreg1,cgpara1);
             paramanager.freeparaloc(list,cgpara1);
             allocallcpuregisters(list);
-            a_call_name(list,decrfunc);
+            a_call_name(list,decrfunc,false);
             deallocallcpuregisters(list);
           end
          else
@@ -3215,7 +3219,7 @@ implementation
             paramanager.freeparaloc(list,cgpara1);
             paramanager.freeparaloc(list,cgpara2);
             allocallcpuregisters(list);
-            a_call_name(list,'FPC_DECREF');
+            a_call_name(list,'FPC_DECREF',false);
             deallocallcpuregisters(list);
          end;
         cgpara2.done;
@@ -3234,6 +3238,7 @@ implementation
         paramanager.getintparaloc(pocall_default,2,cgpara2);
          if is_ansistring(t) or
             is_widestring(t) or
+            is_unicodestring(t) or
             is_interfacecom(t) or
             is_dynamic_array(t) then
            a_load_const_ref(list,OS_ADDR,0,ref)
@@ -3247,7 +3252,7 @@ implementation
               paramanager.freeparaloc(list,cgpara1);
               paramanager.freeparaloc(list,cgpara2);
               allocallcpuregisters(list);
-              a_call_name(list,'FPC_INITIALIZE');
+              a_call_name(list,'FPC_INITIALIZE',false);
               deallocallcpuregisters(list);
            end;
         cgpara1.done;
@@ -3266,6 +3271,7 @@ implementation
         paramanager.getintparaloc(pocall_default,2,cgpara2);
          if is_ansistring(t) or
             is_widestring(t) or
+            is_unicodestring(t) or
             is_interfacecom(t) then
             begin
               g_decrrefcount(list,t,ref);
@@ -3281,7 +3287,7 @@ implementation
               paramanager.freeparaloc(list,cgpara1);
               paramanager.freeparaloc(list,cgpara2);
               allocallcpuregisters(list);
-              a_call_name(list,'FPC_FINALIZE');
+              a_call_name(list,'FPC_FINALIZE',false);
               deallocallcpuregisters(list);
            end;
         cgpara1.done;
@@ -3426,7 +3432,7 @@ implementation
                     { if low(to) > maxlongint also range error }
                     (lto > aintmax) then
                    begin
-                     a_call_name(list,'FPC_RANGEERROR');
+                     a_call_name(list,'FPC_RANGEERROR',false);
                      exit
                    end;
                  { from is signed and to is unsigned -> when looking at to }
@@ -3441,7 +3447,7 @@ implementation
                  if (lfrom > aintmax) or
                     (hto < 0) then
                    begin
-                     a_call_name(list,'FPC_RANGEERROR');
+                     a_call_name(list,'FPC_RANGEERROR',false);
                      exit
                    end;
                  { from is unsigned and to is signed -> when looking at to }
@@ -3466,7 +3472,7 @@ implementation
         else
 {$endif cpu64bitalu}
           a_cmp_const_reg_label(list,OS_INT,OC_BE,aint(int64(hto-lto)),hreg,neglabel);
-        a_call_name(list,'FPC_RANGEERROR');
+        a_call_name(list,'FPC_RANGEERROR',false);
         a_label(list,neglabel);
       end;
 
@@ -3503,7 +3509,7 @@ implementation
            paramanager.allocparaloc(list,cgpara1);
            a_param_const(list,OS_INT,210,cgpara1);
            paramanager.freeparaloc(list,cgpara1);
-           a_call_name(list,'FPC_HANDLEERROR');
+           a_call_name(list,'FPC_HANDLEERROR',false);
            a_label(list,oklabel);
            cgpara1.done;
          end;
@@ -3529,7 +3535,7 @@ implementation
            paramanager.freeparaloc(list,cgpara1);
            paramanager.freeparaloc(list,cgpara2);
            allocallcpuregisters(list);
-           a_call_name(list,'FPC_CHECK_OBJECT_EXT');
+           a_call_name(list,'FPC_CHECK_OBJECT_EXT',false);
            deallocallcpuregisters(list);
          end
         else
@@ -3539,7 +3545,7 @@ implementation
             a_param_reg(list,OS_ADDR,reg,cgpara1);
             paramanager.freeparaloc(list,cgpara1);
             allocallcpuregisters(list);
-            a_call_name(list,'FPC_CHECK_OBJECT');
+            a_call_name(list,'FPC_CHECK_OBJECT',false);
             deallocallcpuregisters(list);
           end;
         cgpara1.done;
@@ -3585,7 +3591,7 @@ implementation
         a_param_reg(list,OS_INT,sizereg,cgpara1);
         paramanager.freeparaloc(list,cgpara1);
         allocallcpuregisters(list);
-        a_call_name(list,'FPC_GETMEM');
+        a_call_name(list,'FPC_GETMEM',false);
         deallocallcpuregisters(list);
         cgpara1.done;
         { return the new address }
@@ -3611,7 +3617,7 @@ implementation
         paramanager.freeparaloc(list,cgpara2);
         paramanager.freeparaloc(list,cgpara1);
         allocallcpuregisters(list);
-        a_call_name(list,'FPC_MOVE');
+        a_call_name(list,'FPC_MOVE',false);
         deallocallcpuregisters(list);
         cgpara3.done;
         cgpara2.done;
@@ -3631,7 +3637,7 @@ implementation
         a_param_loc(list,l,cgpara1);
         paramanager.freeparaloc(list,cgpara1);
         allocallcpuregisters(list);
-        a_call_name(list,'FPC_FREEMEM');
+        a_call_name(list,'FPC_FREEMEM',false);
         deallocallcpuregisters(list);
         cgpara1.done;
       end;
@@ -3664,7 +3670,7 @@ implementation
 
         if size>0 then
           begin
-            tg.GetTemp(list,size,tt_noreuse,current_procinfo.save_regs_ref);
+            tg.GetTemp(list,size,sizeof(aint),tt_noreuse,current_procinfo.save_regs_ref);
             include(current_procinfo.flags,pi_has_saved_regs);
 
             { Copy registers to temp }
@@ -3807,11 +3813,11 @@ implementation
 
     procedure tcg.a_call_name_static(list : TAsmList;const s : string);
       begin
-        a_call_name(list,s);
+        a_call_name(list,s,false);
       end;
 
 
-   function tcg.g_indirect_sym_load(list:TAsmList;const symname: string): tregister;
+   function tcg.g_indirect_sym_load(list:TAsmList;const symname: string; weak: boolean): tregister;
       var
         l: tasmsymbol;
         ref: treference;
@@ -3820,14 +3826,18 @@ implementation
         case target_info.system of
           system_powerpc_darwin,
           system_i386_darwin,
-          system_powerpc64_darwin:
+          system_powerpc64_darwin,
+          system_arm_darwin:
             begin
               l:=current_asmdata.getasmsymbol('L'+symname+'$non_lazy_ptr');
               if not(assigned(l)) then
                 begin
                   l:=current_asmdata.DefineAsmSymbol('L'+symname+'$non_lazy_ptr',AB_LOCAL,AT_DATA);
                   current_asmdata.asmlists[al_picdata].concat(tai_symbol.create(l,0));
-                  current_asmdata.asmlists[al_picdata].concat(tai_const.create_indirect_sym(current_asmdata.RefAsmSymbol(symname)));
+                  if not(weak) then
+                    current_asmdata.asmlists[al_picdata].concat(tai_const.create_indirect_sym(current_asmdata.RefAsmSymbol(symname)))
+                  else
+                    current_asmdata.asmlists[al_picdata].concat(tai_const.create_indirect_sym(current_asmdata.WeakRefAsmSymbol(symname)));
 {$ifdef cpu64bitaddr}
                   current_asmdata.asmlists[al_picdata].concat(tai_const.create_64bit(0));
 {$else cpu64bitaddr}
@@ -3847,6 +3857,37 @@ implementation
       begin
       end;
 
+
+    procedure tcg.a_loadmm_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister; shuffle: pmmshuffle);
+      begin
+        internalerror(200807231);
+      end;
+
+
+    procedure tcg.a_loadmm_ref_reg(list: TAsmList; fromsize, tosize: tcgsize; const ref: treference; reg: tregister; shuffle: pmmshuffle);
+      begin
+        internalerror(200807232);
+      end;
+
+
+    procedure tcg.a_loadmm_reg_ref(list: TAsmList; fromsize, tosize: tcgsize; reg: tregister; const ref: treference; shuffle: pmmshuffle);
+      begin
+        internalerror(200807233);
+      end;
+
+
+    procedure tcg.a_opmm_reg_reg(list: TAsmList; Op: TOpCG; size: tcgsize; src, dst: tregister; shuffle: pmmshuffle);
+      begin
+        internalerror(200807234);
+      end;
+
+
+    function tcg.getflagregister(list: TAsmList; size: Tcgsize): Tregister;
+      begin
+        Result:=TRegister(0);
+        internalerror(200807238);
+      end;
+
 {*****************************************************************************
                                     TCG64
 *****************************************************************************}

+ 28 - 0
compiler/cmsgs.pas

@@ -52,6 +52,7 @@ type
     procedure ClearIdx;
     procedure CreateIdx;
     function  GetPChar(nr:longint):pchar;
+    function  ClearVerbosity(nr:longint):boolean;
     function  Get(nr:longint;const args:array of string):ansistring;
   end;
 
@@ -374,6 +375,33 @@ begin
   GetPChar:=msgidx[nr div 1000]^[nr mod 1000];
 end;
 
+function TMessage.ClearVerbosity(nr:longint):boolean;
+var
+  hp: pchar;
+  i, txtbegin: longint;
+begin
+   result:=false;
+  if ((nr div 1000) < low(msgidx)) or
+     ((nr div 1000) > msgparts) then
+    exit;
+  hp := GetPChar(nr);
+  if (hp=nil) then
+    exit;
+  txtbegin:=-1;
+  for i:=0 to 4 do
+    begin
+      if hp[i]=#0 then
+        exit;
+      if hp[i]='_' then
+        begin
+          txtbegin:=i;
+          break;
+        end;
+    end;
+  for i:=0 to txtbegin-1 do
+    hp[i]:='_';
+  result:=true;
+end;
 
 function TMessage.Get(nr:longint;const args:array of string):ansistring;
 var

+ 6 - 3
compiler/comphook.pas

@@ -84,12 +84,13 @@ type
     countNotes,
     countHints    : longint;  { number of found errors/warnings/notes/hints }
     codesize,
-    datasize      : aint;
+    datasize      : aword;
   { program info }
     isexe,
     ispackage,
     islibrary     : boolean;
   { Settings for the output }
+    showmsgnrs    : boolean;
     verbosity     : longint;
     maxerrorcount : longint;
     errorwarning,
@@ -337,7 +338,8 @@ begin
     end;
 
   { Display line }
-  if ((status.verbosity and (Level and V_LevelMask))=(Level and V_LevelMask)) then
+  if (Level<>V_None) and
+     ((status.verbosity and (Level and V_LevelMask))=(Level and V_LevelMask)) then
    begin
      if status.use_stderr then
       begin
@@ -375,7 +377,8 @@ end;
 function def_CheckVerbosity(v:longint):boolean;
 begin
   result:=status.use_bugreport or
-          ((status.verbosity and (v and V_LevelMask))=(v and V_LevelMask));
+          ((v<>V_None) and
+           ((status.verbosity and (v and V_LevelMask))=(v and V_LevelMask)));
 end;
 
 procedure def_initsymbolinfo;

+ 2 - 2
compiler/compiler.pas

@@ -110,7 +110,7 @@ uses
 {$ifdef symbian}
   ,i_symbian
 {$endif symbian}
-  ;
+  ,globtype;
 
 function Compile(const cmd:string):longint;
 
@@ -249,7 +249,7 @@ begin
           if totaltime<0 then
             totaltime:=totaltime+3600.0*24.0;
           timestr:=tostr(trunc(totaltime))+'.'+tostr(round(frac(totaltime)*10));
-          if status.codesize<>-1 then
+          if status.codesize<>aword(-1) then
             linkstr:=', '+tostr(status.codesize)+' ' +strpas(MessagePChar(general_text_bytes_code))+', '+tostr(status.datasize)+' '+strpas(MessagePChar(general_text_bytes_data))
           else
             linkstr:='';

+ 5 - 0
compiler/compinnr.inc

@@ -72,6 +72,11 @@ const
    in_writestr_x        = 62;
    in_readstr_x         = 63;
    in_abs_long          = 64;
+   in_ror_x             = 65;
+   in_ror_x_x           = 66;
+   in_rol_x             = 67;
+   in_rol_x_x           = 68;
+
 
 { Internal constant functions }
    in_const_sqr        = 100;

+ 1 - 1
compiler/cp1251.pas

@@ -6,7 +6,7 @@ unit cp1251;
   implementation
 
   uses
-     charset;
+     {$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 1 - 1
compiler/cp437.pas

@@ -6,7 +6,7 @@ unit cp437;
   implementation
 
   uses
-     charset;
+     {$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 1 - 1
compiler/cp850.pas

@@ -6,7 +6,7 @@ unit cp850;
   implementation
 
   uses
-     charset;
+     {$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 1 - 1
compiler/cp866.pas

@@ -6,7 +6,7 @@ unit cp866;
   implementation
 
   uses
-     charset;
+     {$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 1 - 1
compiler/cp8859_1.pas

@@ -6,7 +6,7 @@ unit cp8859_1;
   implementation
 
   uses
-     charset;
+     {$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 1 - 1
compiler/cp8859_5.pas

@@ -6,7 +6,7 @@ unit cp8859_5;
   implementation
 
   uses
-     charset;
+     {$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 65 - 65
compiler/crefs.pas

@@ -1,65 +1,65 @@
-{
-    Copyright (c) 2007 by Pierre Muller
-
-    Common reference types
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- ****************************************************************************
-}
-
-unit crefs;
-
-{$i fpcdefs.inc}
-
-interface
-
-uses
-  globtype,
-  cclasses;
-
-  type
-
-   TrefItem = class (TLinkedListItem)
-     refinfo  : tfileposinfo;
-     constructor create(const ARefInfo : tfileposinfo);
-     Function GetCopy:TLinkedListItem;virtual;
-   end;
-
-   TRefLinkedList = class(TLinkedList)
-     procedure WriteToPPU;
-   end;
-
-implementation
-
-constructor TRefItem.Create(const ARefInfo : tfileposinfo);
-begin
-  Inherited Create;
-  RefInfo:=ARefInfo;
-end;
-
-Function TRefItem.GetCopy : TLinkedListItem;
-var
-  NR : TRefItem;
-begin
-  NR.Create(RefInfo);
-  GetCopy:=NR;
-end;
-
-procedure TRefLinkedList.WriteToPPU;
-begin
-end;
-
-begin
-end.
+{
+    Copyright (c) 2007 by Pierre Muller
+
+    Common reference types
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ****************************************************************************
+}
+
+unit crefs;
+
+{$i fpcdefs.inc}
+
+interface
+
+uses
+  globtype,
+  cclasses;
+
+  type
+
+   TrefItem = class (TLinkedListItem)
+     refinfo  : tfileposinfo;
+     constructor create(const ARefInfo : tfileposinfo);
+     Function GetCopy:TLinkedListItem;virtual;reintroduce;
+   end;
+
+   TRefLinkedList = class(TLinkedList)
+     procedure WriteToPPU;
+   end;
+
+implementation
+
+constructor TRefItem.Create(const ARefInfo : tfileposinfo);
+begin
+  Inherited Create;
+  RefInfo:=ARefInfo;
+end;
+
+Function TRefItem.GetCopy : TLinkedListItem;
+var
+  NR : TRefItem;
+begin
+  NR.Create(RefInfo);
+  GetCopy:=NR;
+end;
+
+procedure TRefLinkedList.WriteToPPU;
+begin
+end;
+
+begin
+end.

+ 7 - 9
compiler/cutils.pas

@@ -29,13 +29,11 @@ unit cutils;
 
 interface
 
+  type
+    Tcharset=set of char;
 
-    type
-       pshortstring = ^string;
-       Tcharset=set of char;
-
-    var
-      internalerrorproc : procedure(i:longint);
+  var
+    internalerrorproc : procedure(i:longint);
 
 
     {# Returns the minimal value between @var(a) and @var(b) }
@@ -1270,8 +1268,8 @@ implementation
 
     // Case x=NAN or y=NAN
 
-    if ( (ix>=$7ff00000) and (((ix-$7ff00000) or lx) <> 0) )
-        or ( (iy>=$7ff00000) and (((iy-$7ff00000) OR ly) <> 0) )
+    if ( (ix>=$7ff00000) and ((longword(ix-$7ff00000) or lx) <> 0) )
+        or ( (iy>=$7ff00000) and ((longword(iy-$7ff00000) OR ly) <> 0) )
     then exit(x+y);
 
     // Case x=y
@@ -1280,7 +1278,7 @@ implementation
 
     // Case x=0
 
-    if (ix or lx)=0
+    if (longword(ix) or lx)=0
     then begin
           twoword(x).hi:=hy and $80000000;  // return +-minimalSubnormal
           twoword(x).lo:=1;

+ 6 - 3
compiler/dbgdwarf.pas

@@ -101,6 +101,7 @@ interface
         DW_TAG_PGI_kanji_type := $A000,
         DW_TAG_PGI_interface_block := $A020);
 
+{$notes off}
       { Attribute names and codes.   }
       tdwarf_attribute = (DW_AT_sibling := $01,DW_AT_location := $02,
         DW_AT_name := $03,DW_AT_ordering := $09,
@@ -177,6 +178,7 @@ interface
         DW_AT_PGI_lbase := $3a00,
         DW_AT_PGI_soffset := $3a01,DW_AT_PGI_lstride := $3a02
       );
+{$notes on}
 
       { Form names and codes.   }
       Tdwarf_form = (DW_FORM_addr := $01,DW_FORM_block2 := $03,
@@ -427,7 +429,7 @@ implementation
       Tdwarf_calling_convention = (DW_CC_normal := $1,DW_CC_program := $2,
         DW_CC_nocall := $3,DW_CC_GNU_renesas_sh := $40
         );
-
+{$notes off}
       { Location atom names and codes.   }
       Tdwarf_location_atom = (DW_OP_addr := $03,DW_OP_deref := $06,DW_OP_const1u := $08,
         DW_OP_const1s := $09,DW_OP_const2u := $0a,
@@ -506,6 +508,7 @@ implementation
         DW_OP_HP_fltconst8 := $e3,DW_OP_HP_mod_range := $e4,
         DW_OP_HP_unmod_range := $e5,DW_OP_HP_tls := $e6
         );
+{$notes on}
 
     const
       { Implementation-defined range start.   }
@@ -1758,7 +1761,7 @@ implementation
                   begin
                     if (vo_is_thread_var in sym.varoptions) then
                       begin
-{$warning !!! FIXME: dwarf for thread vars !!!}
+{ TODO: !!! FIXME: dwarf for thread vars !!!}
                         blocksize:=0;
                       end
                     else
@@ -1971,7 +1974,7 @@ implementation
               current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_64bit(int64(sym.value.valueordptr)));
 {$else cpu64bitaddr}
               current_asmdata.asmlists[al_dwarf_abbrev].concat(tai_const.create_uleb128bit(ord(DW_FORM_data4)));
-              current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_32bit(sym.value.valueordptr));
+              current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_32bit(longint(sym.value.valueordptr)));
 {$endif cpu64bitaddr}
             end;
           constreal:

+ 11 - 11
compiler/dbgstabs.pas

@@ -583,7 +583,7 @@ implementation
           begin
             case def.ordtype of
               uvoid :
-                ss:=strpnew(def_stab_number(def));
+                ss:=def_stab_number(def);
               pasbool,
               bool8bit,
               bool16bit,
@@ -602,25 +602,25 @@ implementation
           begin
             case def.ordtype of
               uvoid :
-                ss:=strpnew(def_stab_number(def));
+                ss:=def_stab_number(def);
               uchar :
-                ss:=strpnew('-20;');
+                ss:='-20;';
               uwidechar :
-                ss:=strpnew('-30;');
+                ss:='-30;';
               pasbool,
               bool8bit :
-                ss:=strpnew('-21;');
+                ss:='-21;';
               bool16bit :
-                ss:=strpnew('-22;');
+                ss:='-22;';
               bool32bit :
-                ss:=strpnew('-23;');
+                ss:='-23;';
               bool64bit :
                 { no clue if this is correct (FK) }
-                ss:=strpnew('-23;');
+                ss:='-23;';
               u64bit :
-                ss:=strpnew('-32;');
+                ss:='-32;';
               s64bit :
-                ss:=strpnew('-31;');
+                ss:='-31;';
               {u32bit : result:=def_stab_number(s32inttype)+';0;-1;'); }
               else
                 ss:=def_stabstr_evaluate(def,'r${numberstring};$1;$2;',[tostr(longint(def.low.svalue)),tostr(longint(def.high.svalue))]);
@@ -963,7 +963,7 @@ implementation
           begin
             if tabstractnormalvarsym(def.funcretsym).localloc.loc=LOC_REFERENCE then
               begin
-{$warning Need to add gdb support for ret in param register calling}
+{ TODO: Need to add gdb support for ret in param register calling}
                 if paramanager.ret_in_param(def.returndef,def.proccalloption) then
                   hs:='X*'
                 else

+ 20 - 15
compiler/defcmp.pas

@@ -413,7 +413,7 @@ implementation
                             else if (cs_ansistrings in current_settings.localswitches) and
                                (tstringdef(def_to).stringtype=st_ansistring) then
                               eq:=te_equal
-                            else if tstringdef(def_to).stringtype=st_widestring then
+                            else if tstringdef(def_to).stringtype in [st_widestring,st_unicodestring] then
                               eq:=te_convert_l3
                             else
                               eq:=te_convert_l1;
@@ -425,7 +425,7 @@ implementation
                             begin
                               if is_ansistring(def_to) then
                                 eq:=te_convert_l1
-                              else if is_widestring(def_to) then
+                              else if is_widestring(def_to) or is_unicodestring(def_to) then
                                 eq:=te_convert_l3
                               else
                                 eq:=te_convert_l2;
@@ -446,7 +446,7 @@ implementation
                                   else
                                     eq:=te_convert_l2;
                                 end
-                              else if is_widestring(def_to) then
+                              else if is_widestring(def_to) or is_unicodestring(def_to) then
                                 eq:=te_convert_l3
                               else
                                 eq:=te_convert_l2;
@@ -458,7 +458,7 @@ implementation
                       if is_widechararray(def_from) or is_open_widechararray(def_from) then
                        begin
                          doconv:=tc_chararray_2_string;
-                         if is_widestring(def_to) then
+                         if is_widestring(def_to) or is_unicodestring(def_to) then
                            eq:=te_convert_l1
                          else
                            { size of widechar array is double due the sizeof a widechar }
@@ -490,13 +490,22 @@ implementation
                           else if is_pwidechar(def_from) then
                            begin
                              doconv:=tc_pwchar_2_string;
-                             if is_widestring(def_to) then
+                             if is_widestring(def_to) or is_unicodestring(def_to)  then
                                eq:=te_convert_l1
                              else
                                eq:=te_convert_l3;
                            end;
                        end;
                    end;
+                 objectdef :
+                   begin
+                     { corba interface -> id string }
+                     if is_interfacecorba(def_from) then
+                      begin
+                        doconv:=tc_intf_2_string;
+                        eq:=te_convert_l1;
+                      end;
+                   end;
                end;
              end;
 
@@ -881,18 +890,14 @@ implementation
                    begin
                      { string constant (which can be part of array constructor)
                        to zero terminated string constant }
-                     if (((fromtreetype = arrayconstructorn) and
-                          { can't use is_chararray, because returns false for }
-                          { array constructors                                }
-                          is_char(tarraydef(def_from).elementdef)) or
-                         (fromtreetype = stringconstn)) and
+                     if (fromtreetype = stringconstn) and
                         (is_pchar(def_to) or is_pwidechar(def_to)) then
                       begin
                         doconv:=tc_cstring_2_pchar;
                         eq:=te_convert_l2;
                       end
                      else
-                      if cdo_explicit in cdoptions then
+                      if (cdo_explicit in cdoptions) or (fromtreetype = arrayconstructorn) then
                        begin
                          { pchar(ansistring) }
                          if is_pchar(def_to) and
@@ -904,7 +909,7 @@ implementation
                          else
                           { pwidechar(widestring) }
                           if is_pwidechar(def_to) and
-                             is_widestring(def_from) then
+                            is_wide_or_unicode_string(def_from) then
                            begin
                              doconv:=tc_ansistring_2_pchar;
                              eq:=te_convert_l1;
@@ -1259,7 +1264,7 @@ implementation
                      end
                    { ugly, but delphi allows it }
                    else if (eq=te_incompatible) and
-                     (def_from.typ=orddef) and
+                     (def_from.typ in [orddef,enumdef]) and
                      (m_delphi in current_settings.modeswitches) and
                      (cdo_explicit in cdoptions) then
                      begin
@@ -1362,8 +1367,8 @@ implementation
            recorddef :
              begin
                { interface -> guid }
-               if is_interface(def_from) and
-                  (def_to=rec_tguid) then
+               if (def_to=rec_tguid) and
+                  (is_interfacecom(def_from) or is_dispinterface(def_from)) then
                 begin
                   doconv:=tc_intf_2_guid;
                   eq:=te_convert_l1;

+ 26 - 3
compiler/defutil.pas

@@ -165,6 +165,12 @@ interface
     {# returns true if p is a wide string type }
     function is_widestring(p : tdef) : boolean;
 
+    {# true if p is an unicode string def }
+    function is_unicodestring(p : tdef) : boolean;
+
+    {# returns true if p is a wide or unicode string type }
+    function is_wide_or_unicode_string(p : tdef) : boolean;
+
     {# Returns true if p is a short string type }
     function is_shortstring(p : tdef) : boolean;
 
@@ -581,6 +587,22 @@ implementation
       end;
 
 
+    { true if p is an wide string def }
+    function is_wide_or_unicode_string(p : tdef) : boolean;
+      begin
+         is_wide_or_unicode_string:=(p.typ=stringdef) and
+                        (tstringdef(p).stringtype in [st_widestring,st_unicodestring]);
+      end;
+
+
+    { true if p is an unicode string def }
+    function is_unicodestring(p : tdef) : boolean;
+      begin
+         is_unicodestring:=(p.typ=stringdef) and
+                        (tstringdef(p).stringtype=st_unicodestring);
+      end;
+
+
     { true if p is an short string def }
     function is_shortstring(p : tdef) : boolean;
       begin
@@ -920,12 +942,13 @@ implementation
             begin
               if tprocvardef(def).is_methodpointer and
                  (not tprocvardef(def).is_addressonly) then
-                if (sizeof(pint) = 4) then
+                {$if sizeof(pint) = 4}
                   result:=OS_64
-                else if (sizeof(pint) = 8) then
+                {$else} {$if sizeof(pint) = 8}
                   result:=OS_128
-                else
+                {$else}
                   internalerror(200707141)
+                {$endif} {$endif}
               else
                 result:=OS_ADDR;
             end;

+ 2 - 2
compiler/expunix.pas

@@ -152,7 +152,7 @@ begin
            current_asmdata.asmlists[al_procedures].concat(Tai_symbol.Createname_global(hp2.name^,AT_FUNCTION,0));
            if (cs_create_pic in current_settings.moduleswitches) and
              { other targets need to be checked how it works }
-             (target_info.system in [system_i386_freebsd,system_x86_64_linux,system_i386_linux]) then
+             (target_info.system in [system_i386_freebsd,system_x86_64_freebsd,system_x86_64_linux,system_i386_linux]) then
              begin
 {$ifdef x86}
                sym:=current_asmdata.RefAsmSymbol(pd.mangledname);
@@ -182,4 +182,4 @@ begin
 end;
 
 
-end.
+end.

+ 6 - 0
compiler/fmodule.pas

@@ -109,6 +109,7 @@ interface
         requires_ecx_pic_helper,
         { generate pic helper which loads eip in ebx (for non leave procedures) }
         requires_ebx_pic_helper : boolean;
+        interface_only: boolean; { interface-only macpas unit; flag does not need saving/restoring to ppu }
         mainfilepos   : tfileposinfo;
         recompile_reason : trecompile_reason;  { the reason why the unit should be recompiled }
         crc,
@@ -124,6 +125,7 @@ interface
         derefmapsize  : longint;  { number of units in the map }
         derefdataintflen : longint;
         derefdata     : tdynamicarray;
+        checkforwarddefs,
         deflist,
         symlist       : TFPObjectList;
         globalsymtable,           { pointer to the global symtable of this unit }
@@ -486,6 +488,7 @@ implementation
         derefdataintflen:=0;
         deflist:=TFPObjectList.Create(false);
         symlist:=TFPObjectList.Create(false);
+        checkforwarddefs:=TFPObjectList.Create(false);
         globalsymtable:=nil;
         localsymtable:=nil;
         globalmacrosymtable:=nil;
@@ -592,6 +595,7 @@ implementation
         derefdata.free;
         deflist.free;
         symlist.free;
+        checkforwarddefs.free;
         if assigned(globalsymtable) then
           globalsymtable.free;
         if assigned(localsymtable) then
@@ -666,6 +670,8 @@ implementation
         deflist:=TFPObjectList.Create(false);
         symlist.free;
         symlist:=TFPObjectList.Create(false);
+        checkforwarddefs.free;
+        checkforwarddefs:=TFPObjectList.Create(false);
         derefdata.free;
         derefdata:=TDynamicArray.Create(1024);
         if assigned(unitmap) then

+ 16 - 2
compiler/fpcdefs.inc

@@ -48,10 +48,11 @@
 
 {$ifdef i386}
   {$define cpu32bit}
+  {$define cpu32bitaddr}
+  {$define cpu32bitalu}
   {$define x86}
   {$define cpuflags}
   {$define cpuextended}
-  {$define USECMOV}
   {$define SUPPORT_MMX}
   {$define cpumm}
   {$define fewintregisters}
@@ -65,7 +66,6 @@
   {$define cpuextended}
   {$define cpufloat128}
   {$define cputargethasfixedstack}
-  {$define USECMOV}
   {$define cpumm}
 {$endif x86_64}
 
@@ -76,12 +76,16 @@
 
 {$ifdef sparc}
   {$define cpu32bit}
+  {$define cpu32bitaddr}
+  {$define cpu32bitalu}
   {$define cpuflags}
   {$define cputargethasfixedstack}
 {$endif sparc}
 
 {$ifdef powerpc}
   {$define cpu32bit}
+  {$define cpu32bitaddr}
+  {$define cpu32bitalu}
   {$define cpuflags}
   {$define cputargethasfixedstack}
   {$define cpumm}
@@ -97,20 +101,30 @@
 
 {$ifdef arm}
   {$define cpu32bit}
+  {$define cpu32bitaddr}
+  {$define cpu32bitalu}
   {$define cpuflags}
   {$define cpufpemu}
   {$define cpuneedsdiv32helper}
   {$define cputargethasfixedstack}
+  { inherit FPC_ARMEL? }
+  {$if defined(CPUARMEL) and not(defined(FPC_OARM))}
+    {$define FPC_ARMEL}
+  {$endif}
 {$endif arm}
 
 {$ifdef m68k}
   {$define cpu32bit}
+  {$define cpu32bitaddr}
+  {$define cpu32bitalu}
   {$define cpuflags}
   {$define cpufpemu}
 {$endif m68k}
 
 {$ifdef avr}
   {$define cpu16bit}
+  {$define cpu16bitaddr}
+  {$define cpu16bitalu}
   {$define cpuflags}
   {$define cpunofpu}
   {$define cpunodefaultint}

+ 3 - 3
compiler/fppu.pas

@@ -569,7 +569,7 @@ uses
         len,hlen : longint;
         buf : array[0..1023] of byte;
       begin
-        if derefdataintflen>derefdata.size then
+        if longword(derefdataintflen)>derefdata.size then
           internalerror(200310223);
         derefdata.seek(0);
         { Write interface data }
@@ -778,7 +778,7 @@ uses
                   sources_avail:=false;
                   temp:=' not found';
                 end;
-              hp:=tinputfile.create(hs);
+              hp:=tdosinputfile.create(hs);
               { the indexing is wrong here PM }
               sourcefiles.register_file(hp);
             end;
@@ -982,7 +982,7 @@ uses
              ibloadunit :
                readloadunit;
              ibasmsymbols :
-{$warning TODO Remove ibasmsymbols}
+{ TODO: Remove ibasmsymbols}
                ;
              ibendimplementation :
                break;

+ 13 - 7
compiler/globals.pas

@@ -161,6 +161,15 @@ interface
         property items[I:longint]:TLinkRec read getlinkrec; default;
       end;
 
+      tpendingstate = record
+        nextverbositystr : string;
+        nextlocalswitches : tlocalswitches;
+        nextverbosityfullswitch: longint;
+        verbosityfullswitched,
+        localswitcheschanged : boolean;
+      end;
+
+
     var
        { specified inputfile }
        inputfilepath     : string;
@@ -244,22 +253,20 @@ interface
        block_type : tblock_type;         { type of currently parsed block }
 
        compile_level : word;
-       resolving_forward : boolean;      { used to add forward reference as second ref }
        exceptblockcounter    : integer;  { each except block gets a unique number check gotos      }
-       aktexceptblock        : integer;  { the exceptblock number of the current block (0 if none) }
+       current_exceptblock        : integer;  { the exceptblock number of the current block (0 if none) }
        LinkLibraryAliases : TLinkStrMap;
        LinkLibraryOrder   : TLinkStrMap;
 
        init_settings,
        current_settings   : tsettings;
 
-       nextlocalswitches : tlocalswitches;
-       localswitcheschanged : boolean;
-
+       pendingstate       : tpendingstate;
      { Memory sizes }
        heapsize,
        stacksize,
-       jmp_buf_size : longint;
+       jmp_buf_size,
+       jmp_buf_align : longint;
 
 {$Ifdef EXTDEBUG}
      { parameter switches }
@@ -1255,7 +1262,6 @@ implementation
         do_make:=true;
         compile_level:=0;
         DLLsource:=false;
-        resolving_forward:=false;
         paratarget:=system_none;
         paratargetasm:=as_none;
         paratargetdbg:=dbg_none;

+ 24 - 8
compiler/globtype.pas

@@ -38,10 +38,15 @@ interface
 {$ifdef cpu64bitaddr}
        PUint = qword;
        PInt = int64;
-{$else cpu64bitaddr}
+{$endif cpu64bitaddr}
+{$ifdef cpu32bitaddr}
        PUint = cardinal;
        PInt = longint;
-{$endif cpu64bitaddr}
+{$endif cpu32bitaddr}
+{$ifdef cpu16bitaddr}
+       PUint = word;
+       PInt = Smallint;
+{$endif cpu16bitaddr}
 
        { Natural integer register type and size for the target machine }
 {$ifdef cpu64bitalu}
@@ -50,13 +55,21 @@ interface
 
      Const
        AIntBits = 64;
-{$else cpu64bitalu}
+{$endif cpu64bitalu}
+{$ifdef cpu32bitalu}
        AWord = longword;
        AInt = longint;
 
      Const
        AIntBits = 32;
-{$endif cpu64bitalu}
+{$endif cpu32bitalu}
+{$ifdef cpu16bitalu}
+       AWord = Word;
+       AInt = Smallint;
+
+     Const
+       AIntBits = 16;
+{$endif cpu16bitalu}
 
      Type
        PAWord = ^AWord;
@@ -170,7 +183,7 @@ interface
          cs_opt_level1,cs_opt_level2,cs_opt_level3,
          cs_opt_regvar,cs_opt_uncertain,cs_opt_size,cs_opt_stackframe,
          cs_opt_peephole,cs_opt_asmcse,cs_opt_loopunroll,cs_opt_tailrecursion,cs_opt_nodecse,
-         cs_opt_nodedfa
+         cs_opt_nodedfa,cs_opt_loopstrength
        );
        toptimizerswitches = set of toptimizerswitch;
 
@@ -178,7 +191,7 @@ interface
        OptimizerSwitchStr : array[toptimizerswitch] of string[10] = ('',
          'LEVEL1','LEVEL2','LEVEL3',
          'REGVAR','UNCERTAIN','SIZE','STACKFRAME',
-         'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC','CSE','DFA'
+         'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC','CSE','DFA','STRENGTH'
        );
 
        DebugSwitchStr : array[tdebugswitch] of string[9] = ('',
@@ -249,7 +262,7 @@ interface
 
        { currently parsed block type }
        tblock_type = (bt_none,
-         bt_general,bt_type,bt_const,bt_except,bt_body,bt_specialize
+         bt_general,bt_type,bt_const,bt_const_type,bt_var,bt_var_type,bt_except,bt_body
        );
 
        { Temp types }
@@ -373,7 +386,9 @@ interface
          { stack frame optimization not possible (only on x86 probably) }
          pi_needs_stackframe,
          { set if the procedure has at least one register saved on the stack }
-         pi_has_saved_regs
+         pi_has_saved_regs,
+         { dfa was generated for this proc }
+         pi_dfaavailable
        );
        tprocinfoflags=set of tprocinfoflag;
 
@@ -403,6 +418,7 @@ interface
 
        pfileposinfo = ^tfileposinfo;
        tfileposinfo = record
+         { if types of column or fileindex are changed, modify tcompilerppufile.putposinfo }
          line      : longint;
          column    : word;
          fileindex : word;

+ 62 - 51
compiler/htypechk.pas

@@ -850,49 +850,56 @@ implementation
              loadn :
                begin
                  if (tloadnode(p).symtableentry.typ in [localvarsym,paravarsym,staticvarsym]) then
-                  begin
-                    hsym:=tabstractvarsym(tloadnode(p).symtableentry);
-                    if (vsf_must_be_valid in varstateflags) and
-                       (hsym.varstate in [vs_declared,vs_read_not_warned,vs_referred_not_inited]) then
-                      begin
-                        { Give warning/note for uninitialized locals }
-                        if assigned(hsym.owner) and
-                          not(cs_opt_nodedfa in current_settings.optimizerswitches) and
-                           not(vo_is_external in hsym.varoptions) and
-                           (hsym.owner.symtabletype in [parasymtable,localsymtable,staticsymtable]) and
-                           ((hsym.owner=current_procinfo.procdef.localst) or
-                            (hsym.owner=current_procinfo.procdef.parast)) then
-                          begin
-                            if (vo_is_funcret in hsym.varoptions) then
-                              begin
-                                if (vsf_use_hints in varstateflags) then
-                                  CGMessagePos(p.fileinfo,sym_h_function_result_uninitialized)
-                                else
-                                  CGMessagePos(p.fileinfo,sym_w_function_result_uninitialized)
-                              end
-                            else
-                              begin
-                                if tloadnode(p).symtable.symtabletype=localsymtable then
-                                  begin
-                                    if (vsf_use_hints in varstateflags) then
-                                      CGMessagePos1(p.fileinfo,sym_h_uninitialized_local_variable,hsym.realname)
-                                    else
-                                      CGMessagePos1(p.fileinfo,sym_w_uninitialized_local_variable,hsym.realname);
-                                  end
-                                else
-                                  begin
-                                    if (vsf_use_hints in varstateflags) then
-                                      CGMessagePos1(p.fileinfo,sym_h_uninitialized_variable,hsym.realname)
-                                    else
-                                      CGMessagePos1(p.fileinfo,sym_w_uninitialized_variable,hsym.realname);
-                                  end;
-                              end;
-                          end
-                        else if (newstate = vs_read) then
-                          newstate := vs_read_not_warned;
-                      end;
-                    hsym.varstate := vstrans[hsym.varstate,newstate];
-                  end;
+                   begin
+                     hsym:=tabstractvarsym(tloadnode(p).symtableentry);
+                     if (vsf_must_be_valid in varstateflags) and
+                        (hsym.varstate in [vs_declared,vs_read_not_warned,vs_referred_not_inited]) then
+                       begin
+                         { Give warning/note for uninitialized locals }
+                         if assigned(hsym.owner) and
+                           not(cs_opt_nodedfa in current_settings.optimizerswitches) and
+                            not(vo_is_external in hsym.varoptions) and
+                            (hsym.owner.symtabletype in [parasymtable,localsymtable,staticsymtable]) and
+                            ((hsym.owner=current_procinfo.procdef.localst) or
+                             (hsym.owner=current_procinfo.procdef.parast)) then
+                           begin
+                             if (vo_is_funcret in hsym.varoptions) then
+                               begin
+                                 if (vsf_use_hints in varstateflags) then
+                                   CGMessagePos(p.fileinfo,sym_h_function_result_uninitialized)
+                                 else
+                                   CGMessagePos(p.fileinfo,sym_w_function_result_uninitialized)
+                               end
+                             else
+                               begin
+                                 if tloadnode(p).symtable.symtabletype=localsymtable then
+                                   begin
+                                     if (vsf_use_hints in varstateflags) then
+                                       CGMessagePos1(p.fileinfo,sym_h_uninitialized_local_variable,hsym.realname)
+                                     else
+                                       CGMessagePos1(p.fileinfo,sym_w_uninitialized_local_variable,hsym.realname);
+                                   end
+                                 else
+                                   begin
+                                     if (vsf_use_hints in varstateflags) then
+                                       CGMessagePos1(p.fileinfo,sym_h_uninitialized_variable,hsym.realname)
+                                     else
+                                       CGMessagePos1(p.fileinfo,sym_w_uninitialized_variable,hsym.realname);
+                                   end;
+                               end;
+                           end
+                         else if (newstate = vs_read) then
+                           newstate := vs_read_not_warned;
+                       end;
+                     hsym.varstate := vstrans[hsym.varstate,newstate];
+                   end;
+                 case newstate of
+                   vs_written:
+                     include(tloadnode(p).flags,nf_write);
+                   vs_readwritten:
+                     if not(nf_write in tloadnode(p).flags) then
+                       include(tloadnode(p).flags,nf_modify);
+                 end;
                  break;
                end;
              callparan :
@@ -1534,7 +1541,7 @@ implementation
                   ) or
                   (
                    is_widechar(p.resultdef) and
-                   is_widestring(def_to)
+                   (is_widestring(def_to) or is_unicodestring(def_to))
                   ) then
                 eq:=te_equal
             end;
@@ -1998,8 +2005,8 @@ implementation
                internalerror(200212092);
 
               { Convert tp procvars when not expecting a procvar }
-              if (def_to.typ<>procvardef) and
-                 (currpt.left.resultdef.typ=procvardef) and
+             if (currpt.left.resultdef.typ=procvardef) and
+                not(def_to.typ in [procvardef,formaldef]) and
                  { Only convert to call when there is no overload or the return type
                    is equal to the expected type. }
                  (
@@ -2226,12 +2233,12 @@ implementation
            tve_shortint,tve_smallint,tve_longint,tve_chari64,
            tve_boolformal,tve_boolformal,tve_boolformal,tve_boolformal,tve_boolformal,
            tve_chari64,tve_chari64,tve_dblcurrency);
-{$warning fixme for 128 bit floats }
+{ TODO: fixme for 128 bit floats }
         variantfloatdef_cl: array[tfloattype] of tvariantequaltype =
           (tve_single,tve_dblcurrency,tve_extended,
            tve_dblcurrency,tve_dblcurrency,tve_extended);
         variantstringdef_cl: array[tstringtype] of tvariantequaltype =
-          (tve_sstring,tve_astring,tve_astring,tve_wstring,tve_unicodestring);
+          (tve_sstring,tve_astring,tve_astring,tve_wstring,tve_ustring);
       begin
         case def.typ of
           orddef:
@@ -2430,9 +2437,9 @@ implementation
         else if (currvcl=tve_boolformal) or
                 (bestvcl=tve_boolformal) then
           if (currvcl=tve_boolformal) then
-            result:=ord(bestvcl in [tve_chari64,tve_sstring,tve_astring,tve_wstring])
+            result:=ord(bestvcl in [tve_chari64,tve_sstring,tve_astring,tve_wstring,tve_ustring])
           else
-            result:=-ord(currvcl in [tve_chari64,tve_sstring,tve_astring,tve_wstring])
+            result:=-ord(currvcl in [tve_chari64,tve_sstring,tve_astring,tve_wstring,tve_ustring])
         { byte is better than everything else (we assume both aren't byte, }
         { since there's only one parameter and that one can't be the same) }
         else if (currvcl=tve_byte) or
@@ -2490,7 +2497,11 @@ implementation
         { widestring is better than everything left }
         else if (currvcl=tve_wstring) or
                 (bestvcl=tve_wstring) then
-          result:=1-2*ord(bestvcl=tve_wstring);
+          result:=1-2*ord(bestvcl=tve_wstring)
+        { unicodestring is better than everything left }
+        else if (currvcl=tve_ustring) or
+                (bestvcl=tve_ustring) then
+          result:=1-2*ord(bestvcl=tve_ustring);
 
         { all possibilities should have been checked now }
         if (result=-5) then

+ 3 - 4
compiler/i386/cgcpu.pas

@@ -493,8 +493,7 @@ unit cgcpu;
         { allocate PIC register }
         if (cs_create_pic in current_settings.moduleswitches) and
            (tf_pic_uses_got in target_info.flags) and
-           (pi_needs_got in current_procinfo.flags) and
-           not(po_kylixlocal in current_procinfo.procdef.procoptions) then
+           (pi_needs_got in current_procinfo.flags) then
           begin
             if (target_info.system<>system_i386_darwin) then
               begin
@@ -654,7 +653,7 @@ unit cgcpu;
             else
               begin
                 { case 1 }
-                cg.a_call_name(list,procdef.mangledname);
+                cg.a_call_name(list,procdef.mangledname,false);
               end;
             { restore param1 value self to interface }
             g_adjust_self_value(list,procdef,-ioffset);
@@ -694,7 +693,7 @@ unit cgcpu;
                 list.concat(taicpu.op_sym(A_JMP,S_NO,lab))
               end
             else
-              list.concat(taicpu.op_sym(A_JMP,S_NO,get_darwin_call_stub(procdef.mangledname)))
+              list.concat(taicpu.op_sym(A_JMP,S_NO,get_darwin_call_stub(procdef.mangledname,false)))
           end;
 
         List.concat(Tai_symbol_end.Createname(labelname));

+ 8 - 1
compiler/i386/cpupara.pas

@@ -135,6 +135,11 @@ unit cpupara;
                         exit;
                       end;
                   end;
+                procvardef:
+                  begin
+                    result:=false;
+                    exit;
+                  end;
               end;
             end;
         end;
@@ -474,7 +479,7 @@ unit cpupara;
                     if (side=callerside) or
                        (po_nostackframe in p.procoptions) then
                       paraloc^.reference.index:=NR_STACK_POINTER_REG
-                    else 
+                    else
                       paraloc^.reference.index:=NR_FRAME_POINTER_REG;
                     varalign:=used_align(size_2_align(l),paraalign,paraalign);
                     paraloc^.reference.offset:=parasize;
@@ -664,10 +669,12 @@ unit cpupara;
           pocall_internproc :
             begin
               { Use default calling }
+{$warnings off}
               if (pocall_default=pocall_register) then
                 create_register_paraloc_info(p,side,p.paras,parareg,parasize)
               else
                 create_stdcall_paraloc_info(p,side,p.paras,parasize);
+{$warnings on}
             end;
           else
             create_stdcall_paraloc_info(p,side,p.paras,parasize);

+ 8 - 10
compiler/i386/csopt386.pas

@@ -69,9 +69,9 @@ end;
 function modifiesConflictingMemLocation(p1: tai; supreg: tsuperregister; c: tregContent;
    var regsStillValid: tregset; onlymem: boolean; var invalsmemwrite: boolean): boolean;
 var
-  p, hp: taicpu;
+  p: taicpu;
   tmpRef: treference;
-  r,regCounter: tsuperregister;
+  regCounter: tsuperregister;
   opCount: longint;
   dummy: boolean;
 begin
@@ -231,8 +231,7 @@ function CheckSequence(p: tai; var prev: tai; supreg: tsuperregister; var Found:
 var
   regsNotRead, regsStillValid : tregset;
   checkingPrevSequences,
-  passedFlagsModifyingInstr,
-  invalsmemwrite               : boolean;
+  passedFlagsModifyingInstr   : boolean;
 
   function getPrevSequence(p: tai; supreg: tsuperregister; currentPrev: tai; var newPrev: tai): tsuperregister;
 
@@ -419,7 +418,7 @@ var
   HighFound, OrgRegFound: longint;
   regcounter, regCounter2, tmpreg, base, index: tsuperregister;
   OrgRegResult: Boolean;
-  TmpResult, flagResultsNeeded, stopchecking: Boolean;
+  TmpResult, flagResultsNeeded: Boolean;
 begin {CheckSequence}
   TmpResult := False;
   FillChar(OrgRegInfo, Sizeof(OrgRegInfo), 0);
@@ -459,7 +458,6 @@ begin {CheckSequence}
       hp3 := p;
       if checkingprevsequences then
         prevreginfo := reginfo;
-      stopchecking := false;
       while (Found <> OldNrofMods) and
                                   { old  new }
              InstructionsEquivalent(hp2, hp3, reginfo) and
@@ -1024,7 +1022,7 @@ var
 begin
   case p.opcode of
     A_IMUL: noHardCodedRegs := p.ops <> 1;
-    A_SHL,A_SHR,A_SHLD,A_SHRD: noHardCodedRegs :=
+    A_SHL,A_SHR,A_ROR,A_ROL,A_SAR,A_SHLD,A_SHRD: noHardCodedRegs :=
       (p.oper[0]^.typ <> top_reg) or
       ((orgReg <> RS_ECX) and (newReg <> RS_ECX));
     else
@@ -1423,7 +1421,7 @@ function ReplaceReg(asml: TAsmList; orgsupreg, newsupreg: tsuperregister; p,
 { where newsupreg was replaced by orgsupreg                                    }
 var
   endP, hp: tai;
-  removeLast, sequenceEnd, newRegModified, orgRegRead,
+  removeLast, newRegModified, orgRegRead,
     stateChanged, readStateChanged: Boolean;
 {$ifdef replaceregdebug}
   l: longint;
@@ -1683,7 +1681,7 @@ procedure loadcseregs(asml: TAsmList; const reginfo: toptreginfo; curseqend, pre
 var
   regsloaded: tregset;
   regloads, reguses: array[RS_EAX..RS_EDI] of tai;
-  regcounter, substreg: tsuperregister;
+  regcounter: tsuperregister;
   hp, hp2: tai;
   insertpos, insertoptinfo, prevseq_next: tai;
   i: longint;
@@ -1835,7 +1833,7 @@ procedure doCSE(asml: TAsmList; First, Last: tai; findPrevSeqs, doSubOpts: boole
  two different sequences}
 var cnt, cnt2, {cnt3,} orgNrofMods: longint;
     p, hp1, hp2, prevSeq: tai;
-    hp3, hp4: tai;
+    hp4: tai;
     hp5 : tai;
     reginfo: toptreginfo;
     memreg: tregister;

+ 2 - 2
compiler/i386/daopt386.pas

@@ -451,7 +451,7 @@ procedure AddRegDeallocFor(asml: TAsmList; reg: tregister; p: tai);
 var
   hp1: tai;
   funcResRegs: tregset;
-  funcResReg: boolean;
+{  funcResReg: boolean;}
 begin
 { if not(supreg in rg.usableregsint) then
     exit;}
@@ -461,7 +461,7 @@ begin
 {  funcResRegs := funcResRegs - rg.usableregsint;}
 {  funcResRegs := funcResRegs - [RS_EDI];}
 {  funcResRegs := funcResRegs - [RS_EAX,RS_EBX,RS_ECX,RS_EDX,RS_ESI]; }
-  funcResReg := getsupreg(reg) in funcresregs;
+{  funcResReg := getsupreg(reg) in funcresregs;}
 
   hp1 := p;
 {

+ 1 - 1
compiler/i386/i386nop.inc

@@ -1,2 +1,2 @@
 { don't edit, this file is generated from x86ins.dat }
-1379;
+1380;

+ 10 - 3
compiler/i386/i386tab.inc

@@ -2936,10 +2936,17 @@
   (
     opcode  : A_MOV;
     ops     : 2;
-    optypes : (ot_reg_ax or ot_bits32,ot_mem_offs,ot_none);
-    code    : #213#193#1#161#29;
+    optypes : (ot_reg_ax,ot_mem_offs,ot_none);
+    code    : #212#193#1#161#29;
     flags   : if_8086 or if_sm or if_nox86_64
   ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_mem_offs,ot_none);
+    code    : #213#193#1#161#29;
+    flags   : if_386 or if_sm or if_nox86_64
+  ),
   (
     opcode  : A_MOV;
     ops     : 2;
@@ -6346,7 +6353,7 @@
     opcode  : A_TEST;
     ops     : 2;
     optypes : (ot_regmem or ot_bits8,ot_reg8,ot_none);
-    code    : #193#211#1#132#72;
+    code    : #193#211#1#132#65;
     flags   : if_8086 or if_sm
   ),
   (

+ 60 - 17
compiler/i386/n386add.pas

@@ -30,9 +30,11 @@ interface
 
     type
        ti386addnode = class(tx86addnode)
+         function use_generic_mul32to64: boolean; override;
+         procedure second_addordinal; override;
          procedure second_add64bit;override;
          procedure second_cmp64bit;override;
-         procedure second_mul;override;
+         procedure second_mul(unsigned: boolean);
        end;
 
   implementation
@@ -46,6 +48,29 @@ interface
       ncon,nset,cgutils,tgobj,
       cga,ncgutil,cgobj,cg64f32,cgx86;
 
+{*****************************************************************************
+                                use_generic_mul32to64
+*****************************************************************************}
+
+    function ti386addnode.use_generic_mul32to64: boolean;
+    begin
+      result := False;
+    end;
+
+    { handles all unsigned multiplications, and 32->64 bit signed ones.
+      32bit-only signed mul is handled by generic codegen }
+    procedure ti386addnode.second_addordinal;
+    var
+      unsigned: boolean;
+    begin
+      unsigned:=not(is_signed(left.resultdef)) or
+                not(is_signed(right.resultdef));
+      if (nodetype=muln) and (unsigned or is_64bit(resultdef)) then
+        second_mul(unsigned)
+      else
+        inherited second_addordinal;
+    end;
+
 {*****************************************************************************
                                 Add64bit
 *****************************************************************************}
@@ -173,7 +198,7 @@ interface
                 cg.a_jmp_flags(current_asmdata.CurrAsmList,F_AE,hl4)
               else
                 cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NO,hl4);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
               cg.a_label(current_asmdata.CurrAsmList,hl4);
             end;
          end;
@@ -343,20 +368,24 @@ interface
                                 x86 MUL
 *****************************************************************************}
 
-    procedure ti386addnode.second_mul;
+    procedure ti386addnode.second_mul(unsigned: boolean);
 
     var reg:Tregister;
         ref:Treference;
         use_ref:boolean;
         hl4 : tasmlabel;
 
+    const
+      asmops: array[boolean] of tasmop = (A_IMUL, A_MUL);
+
     begin
       pass_left_right;
 
       {The location.register will be filled in later (JM)}
       location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
       { Mul supports registers and references, so if not register/reference,
-        load the location into a register}
+        load the location into a register.
+        The variant of IMUL which is capable of doing 32->64 bits has the same restrictions. }
       use_ref:=false;
       if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
         reg:=left.location.register
@@ -379,22 +408,36 @@ interface
       {Also allocate EDX, since it is also modified by a mul (JM).}
       cg.getcpuregister(current_asmdata.CurrAsmList,NR_EDX);
       if use_ref then
-        emit_ref(A_MUL,S_L,ref)
+        emit_ref(asmops[unsigned],S_L,ref)
       else
-        emit_reg(A_MUL,S_L,reg);
-      if cs_check_overflow in current_settings.localswitches  then
-       begin
-         current_asmdata.getjumplabel(hl4);
-         cg.a_jmp_flags(current_asmdata.CurrAsmList,F_AE,hl4);
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW');
-         cg.a_label(current_asmdata.CurrAsmList,hl4);
-       end;
+        emit_reg(asmops[unsigned],S_L,reg);
+      if (cs_check_overflow in current_settings.localswitches) and
+        { 32->64 bit cannot overflow }
+        (not is_64bit(resultdef)) then
+        begin
+          current_asmdata.getjumplabel(hl4);
+          cg.a_jmp_flags(current_asmdata.CurrAsmList,F_AE,hl4);
+          cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
+          cg.a_label(current_asmdata.CurrAsmList,hl4);
+        end;
       {Free EAX,EDX}
       cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EDX);
-      cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
-      {Allocate a new register and store the result in EAX in it.}
-      location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-      cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_EAX,location.register);
+      if is_64bit(resultdef) then
+      begin
+        {Allocate a couple of registers and store EDX:EAX into it}
+        location.register64.reghi := cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+        cg.a_load_reg_reg(current_asmdata.CurrAsmList, OS_INT, OS_INT, NR_EDX, location.register64.reghi);
+        cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+        location.register64.reglo := cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+        cg.a_load_reg_reg(current_asmdata.CurrAsmList, OS_INT, OS_INT, NR_EAX, location.register64.reglo);
+      end
+      else
+      begin
+        {Allocate a new register and store the result in EAX in it.}
+        location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+        cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+        cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_EAX,location.register);
+      end;
       location_freetemp(current_asmdata.CurrAsmList,left.location);
       location_freetemp(current_asmdata.CurrAsmList,right.location);
     end;

+ 29 - 11
compiler/i386/n386mem.pas

@@ -40,7 +40,7 @@ interface
        end;
 
        ti386vecnode = class(tcgvecnode)
-          procedure update_reference_reg_mul(reg:tregister;l:aint);override;
+          procedure update_reference_reg_mul(maybe_const_reg:tregister;l:aint);override;
           procedure pass_generate_code;override;
        end;
 
@@ -84,7 +84,15 @@ implementation
                              TI386VECNODE
 *****************************************************************************}
 
-     procedure ti386vecnode.update_reference_reg_mul(reg:tregister;l:aint);
+     { this routine must, like any other routine, not change the contents }
+     { of base/index registers of references, as these may be regvars.    }
+     { The register allocator can coalesce one LOC_REGISTER being moved   }
+     { into another (as their live ranges won't overlap), but not a       }
+     { LOC_CREGISTER moved into a LOC_(C)REGISTER most of the time (as    }
+     { the live range of the LOC_CREGISTER will most likely overlap the   }
+     { the live range of the target LOC_(C)REGISTER)                      }
+     { The passed register may be a LOC_CREGISTER as well.                }
+     procedure ti386vecnode.update_reference_reg_mul(maybe_const_reg:tregister;l:aint);
        var
          l2 : integer;
          hreg : tregister;
@@ -96,32 +104,42 @@ implementation
           end
          else if location.reference.base=NR_NO then
           begin
+            if (location.reference.scalefactor > 1) then
+              hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
             case location.reference.scalefactor of
-             2 : cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,1,location.reference.index);
-             4 : cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,2,location.reference.index);
-             8 : cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,3,location.reference.index);
+             0,1 : hreg:=location.reference.index;
+             2 : cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,1,location.reference.index,hreg);
+             4 : cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,2,location.reference.index,hreg);
+             8 : cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,3,location.reference.index,hreg);
+             else
+               internalerror(2008091401);
             end;
-            location.reference.base:=location.reference.index;
+            location.reference.base:=hreg;
           end
          else
           begin
-            hreg := cg.getaddressregister(current_asmdata.CurrAsmList);
+            hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
             cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,location.reference,hreg);
             reference_reset_base(location.reference,hreg,0);
           end;
          { insert the new index register and scalefactor or
            do the multiplication manual }
          case l of
-          1,2,4,8 : location.reference.scalefactor:=l;
+          1,2,4,8 :
+            begin
+              location.reference.scalefactor:=l;
+              hreg:=maybe_const_reg;
+            end;
          else
            begin
+              hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
               if ispowerof2(l,l2) then
-                cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,l2,reg)
+                cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,l2,maybe_const_reg,hreg)
               else
-                cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_ADDR,l,reg);
+                cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_ADDR,l,maybe_const_reg,hreg);
            end;
          end;
-         location.reference.index:=reg;
+         location.reference.index:=hreg;
        end;
 
 

+ 2 - 72
compiler/i386/n386set.pas

@@ -27,13 +27,11 @@ interface
 
     uses
       globtype,
-      node,nset,pass_1,ncgset;
+      node,nset,pass_1,nx86set;
 
     type
-      ti386casenode = class(tcgcasenode)
+      ti386casenode = class(tx86casenode)
          procedure optimizevalues(var max_linear_list:aint;var max_dist:aword);override;
-         function  has_jumptable : boolean;override;
-         procedure genjumptable(hp : pcaselabel;min_,max_ : aint);override;
          procedure genlinearlist(hp : pcaselabel);override;
       end;
 
@@ -70,74 +68,6 @@ implementation
       end;
 
 
-    function ti386casenode.has_jumptable : boolean;
-      begin
-        has_jumptable:=true;
-      end;
-
-
-    procedure ti386casenode.genjumptable(hp : pcaselabel;min_,max_ : aint);
-      var
-        table : tasmlabel;
-        last : TConstExprInt;
-        indexreg : tregister;
-        href : treference;
-        jtlist: tasmlist;
-        sectype: TAsmSectiontype;
-
-        procedure genitem(list:TAsmList;t : pcaselabel);
-          var
-            i : aint;
-          begin
-            if assigned(t^.less) then
-              genitem(list,t^.less);
-            { fill possible hole }
-            for i:=last.svalue+1 to t^._low.svalue-1 do
-              list.concat(Tai_const.Create_sym(elselabel));
-            for i:=t^._low.svalue to t^._high.svalue do
-              list.concat(Tai_const.Create_sym(blocklabel(t^.blockid)));
-            last:=t^._high;
-            if assigned(t^.greater) then
-              genitem(list,t^.greater);
-          end;
-
-      begin
-        last:=min_;
-        if not(jumptable_no_range) then
-          begin
-             { a <= x <= b <-> unsigned(x-a) <= (b-a) }
-             cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SUB,opsize,aint(min_),hregister);
-             { case expr greater than max_ => goto elselabel }
-             cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,OC_A,aint(max_)-aint(min_),hregister,elselabel);
-             min_:=0;
-          end;
-        current_asmdata.getjumplabel(table);
-        { make it a 32bit register }
-        indexreg:=cg.makeregsize(current_asmdata.CurrAsmList,hregister,OS_INT);
-        cg.a_load_reg_reg(current_asmdata.CurrAsmList,opsize,OS_INT,hregister,indexreg);
-        { create reference }
-        reference_reset_symbol(href,table,0);
-        href.offset:=(-aint(min_))*4;
-        href.index:=indexreg;
-        href.scalefactor:=4;
-        emit_ref(A_JMP,S_NO,href);
-        { generate jump table }
-        if (target_info.system = system_i386_darwin) then
-          begin
-            jtlist:=current_asmdata.asmlists[al_const];
-            sectype:=sec_rodata;
-          end
-        else
-          begin
-            jtlist:=current_procinfo.aktlocaldata;
-            sectype:=sec_data;
-          end;
-        new_section(jtlist,sectype,current_procinfo.procdef.mangledname,sizeof(aint));
-        jtlist.concat(Tai_label.Create(table));
-        genitem(jtlist,hp);
-      end;
-
-
     procedure ti386casenode.genlinearlist(hp : pcaselabel);
       var
         first : boolean;

+ 15 - 20
compiler/i386/popt386.pas

@@ -111,7 +111,7 @@ begin
           removeLastDeallocForFuncRes(asmL, p);
           doFPULoadStoreOpt := true;
         end
-      { can't be done because the store operation rounds
+      (* can't be done because the store operation rounds
       else
         { fst can't store an extended value! }
         if (taicpu(p).opsize <> S_FX) and
@@ -123,7 +123,7 @@ begin
             asml.remove(hp1);
             hp1.free;
           end
-      }
+      *)
     end;
 end;
 
@@ -627,7 +627,7 @@ begin
                 if GetNextInstruction(p, hp1) then
                   begin
                     if FindLabel(tasmlabel(taicpu(p).oper[0]^.ref^.symbol), hp1) and
-  {$warning FIXME removing the first instruction fails}
+  { TODO: FIXME removing the first instruction fails}
                         (p<>blockstart) then
                       begin
                         hp2:=tai(hp1.next);
@@ -1747,7 +1747,6 @@ end;
 
 procedure PeepHoleOptPass2(asml: TAsmList; BlockStart, BlockEnd: tai);
 
-{$ifdef  USECMOV}
   function CanBeCMOV(p : tai) : boolean;
     begin
        CanBeCMOV:=assigned(p) and (p.typ=ait_instruction) and
@@ -1763,15 +1762,12 @@ procedure PeepHoleOptPass2(asml: TAsmList; BlockStart, BlockEnd: tai);
          ) and
          (taicpu(p).oper[1]^.typ in [top_reg]);
     end;
-{$endif  USECMOV}
 
 var
   p,hp1,hp2: tai;
-{$ifdef  USECMOV}
   l : longint;
   condition : tasmcond;
   hp3: tai;
-{$endif USECMOV}
   UsedRegs, TmpUsedRegs: TRegSet;
   carryadd_opcode: Tasmop;
 
@@ -1790,10 +1786,10 @@ begin
                   { jb @@1                            cmc
                     inc/dec operand           -->     adc/sbb operand,0
 		  @@1:
-		  
+		
 		  ... and ...
-		  
-                    jnb @@1                            
+		
+                    jnb @@1
                     inc/dec operand           -->     adc/sbb operand,0
 		  @@1: }
                   if GetNextInstruction(p,hp1) and (hp1.typ=ait_instruction) and
@@ -1812,13 +1808,13 @@ begin
                               Taicpu(p).clearop(0);
                               Taicpu(p).ops:=0;
                               Taicpu(p).is_jmp:=false;
-			      Taicpu(p).opcode:=A_CMC;
-			      Taicpu(p).condition:=C_NONE;
-			      Taicpu(hp1).ops:=2;
+                              Taicpu(p).opcode:=A_CMC;
+                              Taicpu(p).condition:=C_NONE;
+                              Taicpu(hp1).ops:=2;
                               Taicpu(hp1).loadoper(1,Taicpu(hp1).oper[0]^);
                               Taicpu(hp1).loadconst(0,0);
-			      Taicpu(hp1).opcode:=carryadd_opcode;
-			      continue;
+                              Taicpu(hp1).opcode:=carryadd_opcode;
+                              continue;
                             end;
                         end;
                       if Taicpu(p).condition in [C_AE,C_NB] then
@@ -1831,15 +1827,15 @@ begin
                             begin
                               asml.remove(p);
                               p.free;
-			      Taicpu(hp1).ops:=2;
+                              Taicpu(hp1).ops:=2;
                               Taicpu(hp1).loadoper(1,Taicpu(hp1).oper[0]^);
                               Taicpu(hp1).loadconst(0,0);
-			      Taicpu(hp1).opcode:=carryadd_opcode;
-			      continue;
+                              Taicpu(hp1).opcode:=carryadd_opcode;
+                              p:=hp1;
+                              continue;
                             end;
                         end;
                     end;
-{$ifdef USECMOV}
                   if (current_settings.cputype>=cpu_Pentium2) then
                     begin
                        { check for
@@ -1962,7 +1958,6 @@ begin
                               end;
                          end;
                     end;
-{$endif USECMOV}
                 end;
               A_FSTP,A_FISTP:
                 if doFpuLoadStoreOpt(asmL,p) then

+ 2 - 2
compiler/i386/ra386int.pas

@@ -39,7 +39,7 @@ Unit ra386int;
     uses
       rabase,systems,rax86,aasmcpu;
 
-{
+(*
     procedure ti386intreader.handleopcode;
       var
         instr : Tx86Instruction;
@@ -55,7 +55,7 @@ Unit ra386int;
         instr.ConcatInstruction(curlist);
         instr.Free;
       end;
-}
+*)
 
 {*****************************************************************************
                                Initialize

+ 9 - 5
compiler/link.pas

@@ -376,7 +376,11 @@ Implementation
                     { if smart not avail then try static linking }
                     if (flags and uf_static_linked)<>0 then
                      begin
-                       Message1(exec_t_unit_not_smart_linkable_switch_to_static,modulename^);
+                       { if not create_smartlink_library, then smart linking happens using the
+                         regular object files
+                       }
+                       if create_smartlink_library then
+                         Message1(exec_t_unit_not_smart_linkable_switch_to_static,modulename^);
                        mask:=mask or link_static;
                      end
                     else
@@ -866,7 +870,7 @@ Implementation
       var
         objreader : TObjectReader;
       begin
-{$warning TODO Cleanup ignoring of   FPC generated libimp*.a files}
+{ TODO: Cleanup ignoring of   FPC generated libimp*.a files}
         { Don't load import libraries }
         if copy(ExtractFileName(para),1,6)='libimp' then
           exit;
@@ -1018,7 +1022,7 @@ Implementation
       label
         myexit;
       var
-        bsssize : aint;
+        bsssize : aword;
         bsssec  : TExeSection;
         dbgname : TCmdStr;
       begin
@@ -1027,7 +1031,7 @@ Implementation
         Message1(exec_i_linking,outputname);
         FlushOutput;
 
-{$warning TODO Load custom linker script}
+{ TODO: Load custom linker script}
         DefaultLinkScript;
 
         exeoutput:=CExeOutput.Create;
@@ -1084,7 +1088,7 @@ Implementation
             exeoutput.WriteExeFile(outputname);
           end;
 
-{$warning TODO fixed section names}
+{ TODO: fixed section names}
         status.codesize:=exeoutput.findexesection('.text').size;
         status.datasize:=exeoutput.findexesection('.data').size;
         bsssec:=exeoutput.findexesection('.bss');

+ 2 - 2
compiler/m68k/aasmcpu.pas

@@ -107,7 +107,7 @@ type
       globtype;
 
 
-{$WARNING FIX ME!! useful for debug, remove it, same table as in ag68kgas }
+{ TODO: FIX ME!! useful for debug, remove it, same table as in ag68kgas }
     const
       gas_op2str:op2strtable=
     {  warning: CPU32 opcodes are not fully compatible with the MC68020. }
@@ -526,7 +526,7 @@ type
           A_NEG, A_EXT, A_EXTB, A_NOT:
             result:=operand_readwrite;
           else begin
-{$WARNING FIX ME!!! remove ugly debug code ... }
+{ TODO: FIX ME!!! remove ugly debug code ... }
             writeln('M68K: unknown opcode when spilling: ',gas_op2str[opcode]);
             internalerror(200404091);
           end;

+ 10 - 8
compiler/m68k/cgcpu.pas

@@ -158,7 +158,9 @@ unit cgcpu;
        A_LSL,
        A_LSR,
        A_SUB,
-       A_EOR
+       A_EOR,
+       A_NONE,
+       A_NONE
       );
 
 
@@ -243,7 +245,7 @@ unit cgcpu;
 //        writeln('a_param_reg');
 {$endif DEBUG_CHARLIE}
         { it's probably necessary to port this from x86 later, or provide an m68k solution (KB) }
-{$WARNING FIX ME! check_register_size()}
+{ TODO: FIX ME! check_register_size()}
         // check_register_size(size,r);
         if use_push(cgpara) then
           begin
@@ -298,7 +300,7 @@ unit cgcpu;
         begin
           if not assigned(paraloc) then
             exit;
-{$WARNING FIX ME!!! this also triggers location bug }
+{ TODO: FIX ME!!! this also triggers location bug }
           {if (paraloc^.loc<>LOC_REFERENCE) or
              (paraloc^.reference.index<>NR_STACK_POINTER_REG) or
              (tcgsize2size[paraloc^.size]>sizeof(aint)) then
@@ -569,7 +571,7 @@ unit cgcpu;
        href : treference;
 //       p: pointer;
       begin
-         {$WARNING FIX ME!!! take a look on this mess again...}
+         { TODO: FIX ME!!! take a look on this mess again...}
 //        if getregtype(r)=R_ADDRESSREGISTER then
 //          begin
 //            writeln('address reg?!?');
@@ -1306,13 +1308,13 @@ unit cgcpu;
 	        { size can't be negative }
 		if (localsize < 0) then
 		  internalerror(2006122601);
-	      
+	
                 { Not to complicate the code generator too much, and since some }
                 { of the systems only support this format, the localsize cannot }
                 { exceed 32K in size.                                           }
                 if (localsize > high(smallint)) then
                   CGMessage(cg_e_localsize_too_big);
-                
+
                 list.concat(taicpu.op_reg_const(A_LINK,S_W,NR_FRAME_POINTER_REG,-localsize));
 	      end
 	    else
@@ -1324,7 +1326,7 @@ unit cgcpu;
 		  two moves. So, use a link in #0 case too, for now. I'm not
 		  really sure tho', that LINK supports #0 disposition, but i
 		  see no reason why it shouldn't support it. (KB) }
-		  
+		
 	        { when localsize = 0, use two moves, instead of link }
 		r:=NR_FRAME_POINTER_REG;
 		rsp:=NR_STACK_POINTER_REG;
@@ -1369,7 +1371,7 @@ unit cgcpu;
               begin
                 { only 68020+ supports RTD, so this needs another code path
                   for 68000 and Coldfire (KB) }
-{$WARNING 68020+ only code generation, without fallback}
+{ TODO: 68020+ only code generation, without fallback}
                 list.concat(taicpu.op_const(A_RTD,S_NO,parasize));
               end
             else

+ 7 - 7
compiler/m68k/cpubase.pas

@@ -129,7 +129,7 @@ unit cpubase;
 
       maxfpuregs = 8;
 
-{$WARNING TODO FIX BSSTART}
+{ TODO: FIX BSSTART}
       regnumber_count_bsstart = 16;
 
       regnumber_table : array[tregisterindex] of tregister = (
@@ -141,7 +141,7 @@ unit cpubase;
       );
 
       regdwarf_table : array[tregisterindex] of shortint = (
-{$warning TODO reused stabs values!}
+{ TODO: reused stabs values!}
         {$i r68ksta.inc}
       );
 
@@ -253,7 +253,7 @@ unit cpubase;
       NR_STACK_POINTER_REG = NR_SP;
       RS_STACK_POINTER_REG = RS_SP;
       {# Frame pointer register }
-{$warning FIX ME!!! frame pointer is A5 on Amiga, but A6 on unixes?}
+{ TODO: FIX ME!!! frame pointer is A5 on Amiga, but A6 on unixes?}
       NR_FRAME_POINTER_REG = NR_A5;
       RS_FRAME_POINTER_REG = RS_A5;
 
@@ -261,10 +261,10 @@ unit cpubase;
          such as in PIC code. The exact meaning is ABI specific. For
          further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
       }
-{$warning FIX ME!!! pic offset reg conflicts with frame pointer?}
+{ TODO: FIX ME!!! pic offset reg conflicts with frame pointer?}
       NR_PIC_OFFSET_REG = NR_A5;
       { Return address for DWARF }
-{$warning TODO just a guess!}
+{ TODO: just a guess!}
       NR_RETURN_ADDRESS_REG = NR_A0;
       { Results are returned in this register (32-bit values) }
       NR_FUNCTION_RETURN_REG = NR_D0;
@@ -410,7 +410,7 @@ implementation
       begin
         case s of
           OS_NO: begin
-{$WARNING FIX ME!!! results in bad code generation}
+{ TODO: FIX ME!!! results in bad code generation}
             cgsize2subreg:=R_SUBWHOLE;
             end;
 
@@ -487,7 +487,7 @@ implementation
     function inverse_cond(const c: TAsmCond): TAsmCond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
       const
         inverse:array[TAsmCond] of TAsmCond=(C_None,
-{$warning TODO, this is just a copy!}
+{ TODO: TODO, this is just a copy!}
            C_CC,C_LS,C_CS,C_LT,C_EQ,C_MI,C_F,C_NE,
            C_GE,C_PL,C_GT,C_T,C_HI,C_VC,C_LE,C_VS
         );

+ 1 - 1
compiler/m68k/cpupara.pas

@@ -144,7 +144,7 @@ unit cpupara;
       end;
 
 
-{$warning copied from ppc cg, needs work}
+{ TODO: copied from ppc cg, needs work}
     function tm68kparamanager.push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;
       begin
         result:=false;

+ 1 - 1
compiler/m68k/n68kcnv.pas

@@ -163,7 +163,7 @@ implementation
       begin
          secondpass(left);
 
-{$warning needs LOC_JUMP support, because called for bool_to_bool from ncgcnv }
+{ TODO: needs LOC_JUMP support, because called for bool_to_bool from ncgcnv }
 
          { Explicit typecasts from any ordinal type to a boolean type }
          { must not change the ordinal value                          }

+ 1 - 1
compiler/m68k/n68kmat.pas

@@ -260,7 +260,7 @@ implementation
       end;
 
 
-{$WARNING FIX ME!!! shlshrnode needs review}
+{ TODO: FIX ME!!! shlshrnode needs review}
     procedure tm68kshlshrnode.pass_generate_code;
       var
         hregister,resultreg,hregister1,

+ 1 - 1
compiler/mips/cpubase.pas

@@ -105,7 +105,7 @@ unit cpubase;
       first_mm_supreg    = RS_NO;
       first_mm_imreg     = RS_NO;
 
-{$warning TODO Calculate bsstart}
+{ TODO: Calculate bsstart}
       regnumber_count_bsstart = 64;
 
       regnumber_table : array[tregisterindex] of tregister = (

+ 39 - 10
compiler/msg/errore.msg

@@ -23,7 +23,8 @@
 #   parser_   parser
 #   type_     type checking
 #   general_  general info
-#   exec_     calls to assembler, linker, binder
+#   exec_     calls to assembler, external linker, binder
+#   link_     internal linker
 #
 # <type> the type of the message it should normally used for
 #   f_   fatal error
@@ -38,6 +39,7 @@
 #   c_   conditional
 #   d_   debug message
 #   x_   executable informations
+#   o_   normal (e.g., "press enter to continue")
 #
 
 #
@@ -364,7 +366,7 @@ scan_w_multiple_main_name_overrides=02086_W_Overriding name of "main" procedure
 #
 # Parser
 #
-# 03247 is the last used one
+# 03248 is the last used one
 #
 % \section{Parser messages}
 % This section lists all parser messages. The parser takes care of the
@@ -1163,7 +1165,14 @@ parser_e_cant_export_var_different_name=03247_E_Variables cannot be exported wit
 % is exported inside the \var{exports} statement of a library.
 % In that case, you have to specify the export name at the point where the
 % variable is declared, using the \var{export} and \var{alias} directives.
-
+parser_e_weak_external_not_supported=03248_E_Weak external symbols are not supported for the current target
+% A "weak external" symbol is a symbol which may or may not exist at (either static
+% or dynamic) link time. This concept may not be available (or implemented yet)
+% on the current cpu/OS target.
+parser_e_forward_mismatch=03249_E_Forward type definition does not match
+% Classes and interfaces being defined forward must have the same type
+% when being implemented. A forward interface can not be changed into a class.
+%
 % \end{description}
 #
 # Type Checking
@@ -1363,7 +1372,7 @@ type_w_signed_unsigned_always_true=04045_W_Comparison is always true due to rang
 % There is a comparison between an unsigned value and a signed constant which is
 % less than zero. Because of type promotion, the statement will always evaluate to
 % true. Explicitly typecast the constant to the correct range to avoid this problem.
-type_w_instance_with_abstract=04046_W_Constructing a class "$1" with abstract methods
+type_w_instance_with_abstract=04046_W_Constructing a class "$1" with abstract method "$2"
 % An instance of a class is created which contains non-implemented abstract
 % methods. This will probably lead to a runtime error 211 in the code if that
 % routine is ever called. All abstract methods should be overriden.
@@ -1456,7 +1465,7 @@ type_interface_has_no_guid=04083_E_Interface type $1 has no valid GUID
 #
 # Symtable
 #
-# 05062 is the last used one
+# 05064 is the last used one
 #
 % \section{Symbol handling}
 % This section lists all the messages that concern the handling of symbols.
@@ -1624,6 +1633,9 @@ sym_w_experimental_symbol=05063_W_Symbol "$1" is experimental
 % declared as \var{experimental} is used. Experimental symbols
 % might disappear or change semantics in future versions. Usage of this symbol
 % should be avoided as much as possible.
+sym_w_forward_not_resolved=05064_W_Forward declaration "$1" not resolved, assumed external
+% This happens if you declare a function in the \var{interface} of a unit in macpas mode,
+% but do not implement it.
 % \end{description}
 #
 # Codegenerator
@@ -2161,6 +2173,20 @@ execinfo_x_stackcommit=09134_X_Stack space committed: $1 bytes
 %\end{description}
 # EndOfTeX
 
+#
+# Internal linker messages
+#
+# 09200 is the last used one
+#
+# BeginOfTeX
+% \section{Linker messages}
+% This section lists messages produced by internal linker.
+% \begin{description}
+link_f_executable_too_big=09200_F_Executable image size is too big for $1 target.
+% Fatal error when resulting executable is too big.
+%\end{description}
+# EndOfTeX
+
 #
 # Unit loading
 #
@@ -2400,13 +2426,13 @@ option_target_is_already_set=11011_W_Target is already set to: $1
 option_no_shared_lib_under_dos=11012_W_Shared libs not supported on DOS platform, reverting to static
 % If you specify \var{-CD} for the \dos platform, this message is displayed.
 % The compiler supports only static libraries under \dos.
-option_too_many_ifdef=11013_F_too many IF(N)DEFs
+option_too_many_ifdef=11013_F_In options file $1 at line $2 too many \var{\#IF(N)DEFs} encountered
 % The \var{\#IF(N)DEF} statements in the options file are not balanced with
 % the \var{\#ENDIF} statements.
-option_too_many_endif=11014_F_too many ENDIFs
+option_too_many_endif=11014_F_In options file $1 at line $2 unexpected \var{\#ENDIFs} encountered
 % The \var{\#IF(N)DEF} statements in the options file are not balanced with
 % the \var{\#ENDIF} statements.
-option_too_less_endif=11015_F_open conditional at the end of the file
+option_too_less_endif=11015_F_Open conditional at the end of the options file
 % The \var{\#IF(N)DEF} statements in the options file are not balanced with
 % the \var{\#ENDIF} statements.
 option_no_debug_support=11016_W_Debug information generation is not supported by this executable
@@ -2440,7 +2466,7 @@ option_using_env=11027_T_Reading options from environment $1
 % Options are also read from this environment string.
 option_handling_option=11028_D_Handling option "$1"
 % Debug info that an option is found and will be handled.
-option_help_press_enter=11029__*** press enter ***
+option_help_press_enter=11029_O_*** press enter ***
 % Message shown when help is shown page per page. When pressing the ENTER
 % Key, the next page of help is shown. If you press q and then ENTER, the
 % compiler exits.
@@ -2472,6 +2498,8 @@ option_confict_asm_debug=11041_W_Assembler output selected "$1" cannot generate
 option_ppc386_deprecated=11042_W_Use of ppc386.cfg is deprecated, please use fpc.cfg instead
 % Using ppc386.cfg is still supported for historical reasons, however, for a multiplatform
 % system the naming makes no sense anymore. Please continue to use fpc.cfg instead.
+option_else_without_if=11043_F_In options file $1 at line $2 \var{\#ELSE} directive without \var{\#IF(N)DEF} found
+% An \var{\#ELSE} statement was found in the options file without a matching \var{\#IF(N)DEF} statement.
 %\end{description}
 # EndOfTeX
 
@@ -2734,7 +2762,8 @@ S*2Tlinux_Linux
 **2*_a : Show everything             x : Executable info (Win32 only)
 **2*_b : Write file names messages with full path
 **2*_v : Write fpcdebug.txt with     p : Write tree.log with parse tree
-**2*_    lots of debugging info
+**2*_    lots of debugging info      q : Show message numbers
+**2*_m<x>,<y> : Don't show messages numbered <x> and <y>
 3*1W<x>_Target-specific options (targets)
 A*1W<x>_Target-specific options (targets)
 P*1W<x>_Target-specific options (targets)

+ 8 - 3
compiler/msgidx.inc

@@ -335,6 +335,8 @@ const
   parser_e_class_doesnt_implement_interface=03245;
   parser_e_class_implements_must_be_interface=03246;
   parser_e_cant_export_var_different_name=03247;
+  parser_e_weak_external_not_supported=03248;
+  parser_e_forward_mismatch=03249;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
@@ -459,6 +461,7 @@ const
   sym_w_identifier_only_read=05061;
   sym_h_abstract_method_list=05062;
   sym_w_experimental_symbol=05063;
+  sym_w_forward_not_resolved=05064;
   cg_e_parasize_too_big=06009;
   cg_e_file_must_call_by_reference=06012;
   cg_e_cant_use_far_pointer_there=06013;
@@ -651,6 +654,7 @@ const
   execinfo_x_uninitdatasize=09132;
   execinfo_x_stackreserve=09133;
   execinfo_x_stackcommit=09134;
+  link_f_executable_too_big=09200;
   unit_t_unitsearch=10000;
   unit_t_ppu_loading=10001;
   unit_u_ppu_name=10002;
@@ -748,13 +752,14 @@ const
   option_config_is_dir=11040;
   option_confict_asm_debug=11041;
   option_ppc386_deprecated=11042;
+  option_else_without_if=11043;
   option_logo=11023;
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 47095;
+  MsgTxtSize = 47627;
 
   MsgIdxMax : array[1..20] of longint=(
-    24,87,248,84,64,50,108,22,135,61,
-    43,1,1,1,1,1,1,1,1,1
+    24,87,250,84,65,50,108,22,201,61,
+    44,1,1,1,1,1,1,1,1,1
   );

+ 273 - 267
compiler/msgtxt.inc

@@ -1,7 +1,7 @@
 {$ifdef Delphi}
-const msgtxt : array[0..000196] of string[240]=(
+const msgtxt : array[0..000198] of string[240]=(
 {$else Delphi}
-const msgtxt : array[0..000196,1..240] of char=(
+const msgtxt : array[0..000198,1..240] of char=(
 {$endif Delphi}
   '01000_T_Compiler: $1'#000+
   '01001_D_Compiler OS: $1'#000+
@@ -383,360 +383,362 @@ const msgtxt : array[0..000196,1..240] of char=(
   '03247_E_Variables cannot be exported with a different name on this tar'+
   'get, add the name to the declaration using the "export" directive (var'+
   'iable name: $1, declared export name: $2)'#000+
-  '04000_E_','Type mismatch'#000+
+  '03248_E_','Weak external symbols are not supported for the current targ'+
+  'et'#000+
+  '03249_E_Forward type definition does not match'#000+
+  '04000_E_Type mismatch'#000+
   '04001_E_Incompatible types: got "$1" expected "$2"'#000+
   '04002_E_Type mismatch between "$1" and "$2"'#000+
-  '04003_E_Type identifier expected'#000+
+  '04003_E_Type ','identifier expected'#000+
   '04004_E_Variable identifier expected'#000+
   '04005_E_Integer expression expected, but got "$1"'#000+
-  '04006_E_Boo','lean expression expected, but got "$1"'#000+
+  '04006_E_Boolean expression expected, but got "$1"'#000+
   '04007_E_Ordinal expression expected'#000+
   '04008_E_pointer type expected, but got "$1"'#000+
-  '04009_E_class type expected, but got "$1"'#000+
+  '040','09_E_class type expected, but got "$1"'#000+
   '04011_E_Can'#039't evaluate constant expression'#000+
-  '04012_E_Set elements are not compati','ble'#000+
+  '04012_E_Set elements are not compatible'#000+
   '04013_E_Operation not implemented for sets'#000+
   '04014_W_Automatic type conversion from floating type to COMP which is '+
-  'an integer type'#000+
+  'an in','teger type'#000+
   '04015_H_use DIV instead to get an integer result'#000+
   '04016_E_string types doesn'#039't match, because of $V+ mode'#000+
-  '04','017_E_succ or pred on enums with assignments not possible'#000+
+  '04017_E_succ or pred on enums with assignments not possible'#000+
   '04018_E_Can'#039't read or write variables of this type'#000+
-  '04019_E_Can'#039't use readln or writeln on typed file'#000+
+  '04019_E_Can'#039't',' use readln or writeln on typed file'#000+
   '04020_E_Can'#039't use read or write on untyped file.'#000+
-  '04021_E_Type conflict between se','t elements'#000+
+  '04021_E_Type conflict between set elements'#000+
   '04022_W_lo/hi(dword/qword) returns the upper/lower word/dword'#000+
   '04023_E_Integer or real expression expected'#000+
-  '04024_E_Wrong type "$1" in array constructor'#000+
+  '04024','_E_Wrong type "$1" in array constructor'#000+
   '04025_E_Incompatible type for arg no. $1: Got "$2", expected "$3"'#000+
-  '04026_E_Meth','od (variable) and Procedure (variable) are not compatibl'+
-  'e'#000+
+  '04026_E_Method (variable) and Procedure (variable) are not compatible'#000+
   '04027_E_Illegal constant passed to internal math function'#000+
-  '04028_E_Can'#039't take the address of constant expressions'#000+
+  '04028_','E_Can'#039't take the address of constant expressions'#000+
   '04029_E_Argument can'#039't be assigned to'#000+
-  '04030_E_Can'#039't assign local proc','edure/function to procedure varia'+
-  'ble'#000+
+  '04030_E_Can'#039't assign local procedure/function to procedure variabl'+
+  'e'#000+
   '04031_E_Can'#039't assign values to an address'#000+
-  '04032_E_Can'#039't assign values to const variable'#000+
+  '04032_E_Can'#039't assign values to const variab','le'#000+
   '04033_E_Array type required'#000+
   '04034_E_interface type expected, but got "$1"'#000+
-  '04035_W_Mixing signed expressions and lon','gwords gives a 64bit result'+
-  #000+
+  '04035_W_Mixing signed expressions and longwords gives a 64bit result'#000+
   '04036_W_Mixing signed expressions and cardinals here may cause a range'+
   ' check error'#000+
-  '04037_E_Typecast has different size ($1 -> $2) in assignment'#000+
+  '04037_E_Typ','ecast has different size ($1 -> $2) in assignment'#000+
   '04038_E_enums with assignments can'#039't be used as array index'#000+
-  '04039_E_','Class or Object types "$1" and "$2" are not related'#000+
+  '04039_E_Class or Object types "$1" and "$2" are not related'#000+
   '04040_W_Class types "$1" and "$2" are not related'#000+
-  '04041_E_Class or interface type expected, but got "$1"'#000+
+  '04041_E_Class or int','erface type expected, but got "$1"'#000+
   '04042_E_Type "$1" is not completely defined'#000+
-  '04043_W_String literal has more charact','ers than short string length'#000+
+  '04043_W_String literal has more characters than short string length'#000+
   '04044_W_Comparison is always false due to range of values'#000+
-  '04045_W_Comparison is always true due to range of values'#000+
-  '04046_W_Constructing a class "$1" with abstract methods'#000+
-  '04047_H_The left operand of the IN opera','tor should be byte sized'#000+
+  '04045_W_Comparison is always true d','ue to range of values'#000+
+  '04046_W_Constructing a class "$1" with abstract method "$2"'#000+
+  '04047_H_The left operand of the IN operator should be byte sized'#000+
   '04048_W_Type size mismatch, possible loss of data / range check error'#000+
-  '04049_H_Type size mismatch, possible loss of data / range check error'#000+
+  '04049_H_Type size misma','tch, possible loss of data / range check erro'+
+  'r'#000+
   '04050_E_The address of an abstract method can'#039't be taken'#000+
-  '04051_E_Assignment','s to formal parameters and open arrays are not pos'+
-  'sible'#000+
+  '04051_E_Assignments to formal parameters and open arrays are not possi'+
+  'ble'#000+
   '04052_E_Constant Expression expected'#000+
-  '04053_E_Operation "$1" not supported for types "$2" and "$3"'#000+
+  '04053_E_Operation "$1" no','t supported for types "$2" and "$3"'#000+
   '04054_E_Illegal type conversion: "$1" to "$2"'#000+
-  '04055_H_Conversion between ordinals and ','pointers is not portable'#000+
+  '04055_H_Conversion between ordinals and pointers is not portable'#000+
   '04056_W_Conversion between ordinals and pointers is not portable'#000+
-  '04057_E_Can'#039't determine which overloaded function to call'#000+
+  '04057_E_Can'#039't determine whic','h overloaded function to call'#000+
   '04058_E_Illegal counter variable'#000+
-  '04059_W_Converting constant real value to double for C vari','able argu'+
-  'ment, add explicit typecast to prevent this.'#000+
+  '04059_W_Converting constant real value to double for C variable argume'+
+  'nt, add explicit typecast to prevent this.'#000+
   '04060_E_Class or COM interface type expected, but got "$1"'#000+
-  '04061_E_Constant packed arrays are not yet supported'#000+
+  '04061','_E_Constant packed arrays are not yet supported'#000+
   '04062_E_Incompatible type for arg no. $1: Got "$2" expected "(Bit)Pack'+
-  'ed A','rray"'#000+
+  'ed Array"'#000+
   '04063_E_Incompatible type for arg no. $1: Got "$2" expected "(not pack'+
   'ed) Array"'#000+
-  '04064_E_Elements of packed arrays cannot be of a type which need to be'+
-  ' initialised'#000+
+  '04064_E_Elements of packed arra','ys cannot be of a type which need to '+
+  'be initialised'#000+
   '04065_E_Constant packed records and objects are not yet supported'#000+
-  '0406','6_W_Arithmetic "$1" on untyped pointer is unportable to {$T+}, s'+
-  'uggest typecast'#000+
-  '04076_E_Can'#039't take address of a subroutine marked as local'#000+
+  '04066_W_Arithmetic "$1" on untyped pointer is unportable to {$T+}, sug'+
+  'gest typecast'#000+
+  '04076_E_Can'#039't take address of a subrou','tine marked as local'#000+
   '04077_E_Can'#039't export subroutine marked as local from a unit'#000+
   '04078_E_Type is not automatable: "$1"'#000+
-  '040','79_H_Converting the operands to "$1" before doing the add could p'+
-  'revent overflow errors.'#000+
-  '04080_H_Converting the operands to "$1" before doing the subtract coul'+
-  'd prevent overflow errors.'#000+
-  '04081_H_Converting the operands to "$1" before doing t','he multiply co'+
+  '04079_H_Converting the operands to "$1" before doing the add could pre'+
+  'vent overflow errors.'#000+
+  '04080_H_Converting the operan','ds to "$1" before doing the subtract co'+
   'uld prevent overflow errors.'#000+
+  '04081_H_Converting the operands to "$1" before doing the multiply coul'+
+  'd prevent overflow errors.'#000+
   '04082_W_Converting pointers to signed integers may result in wrong com'+
-  'parison results and range errors, use an unsigned type instead.'#000+
+  'paris','on results and range errors, use an unsigned type instead.'#000+
   '04083_E_Interface type $1 has no valid GUID'#000+
-  '05000_E_Identifier ','not found "$1"'#000+
+  '05000_E_Identifier not found "$1"'#000+
   '05001_F_Internal Error in SymTableStack()'#000+
   '05002_E_Duplicate identifier "$1"'#000+
-  '05003_H_Identifier already defined in $1 at line $2'#000+
+  '05003_H_Identifier already ','defined in $1 at line $2'#000+
   '05004_E_Unknown identifier "$1"'#000+
   '05005_E_Forward declaration not solved "$1"'#000+
-  '05007_E_Error in type',' definition'#000+
+  '05007_E_Error in type definition'#000+
   '05009_E_Forward type not resolved "$1"'#000+
-  '05010_E_Only static variables can be used in static methods or outside'+
-  ' methods'#000+
+  '05010_E_Only static variables can be used in static methods or outs','i'+
+  'de methods'#000+
   '05012_F_record or class type expected'#000+
   '05013_E_Instances of classes or objects with an abstract method are no'+
-  't ','allowed'#000+
+  't allowed'#000+
   '05014_W_Label not defined "$1"'#000+
   '05015_E_Label used but not defined "$1"'#000+
   '05016_E_Illegal label declaration'#000+
-  '05017_E_GOTO and LABEL are not supported (use switch -Sg)'#000+
+  '05017','_E_GOTO and LABEL are not supported (use switch -Sg)'#000+
   '05018_E_Label not found'#000+
   '05019_E_identifier isn'#039't a label'#000+
-  '05020_E_labe','l already defined'#000+
+  '05020_E_label already defined'#000+
   '05021_E_illegal type declaration of set elements'#000+
-  '05022_E_Forward class definition not resolved "$1"'#000+
+  '05022_E_Forward class definition not resolved "$1"'#000,
   '05023_H_Unit "$1" not used in $2'#000+
   '05024_H_Parameter "$1" not used'#000+
   '05025_N_Local variable "$1" not used'#000+
-  '05026_H_Value parame','ter "$1" is assigned but never used'#000+
+  '05026_H_Value parameter "$1" is assigned but never used'#000+
   '05027_N_Local variable "$1" is assigned but never used'#000+
-  '05028_H_Local $1 "$2" is not used'#000+
+  '05028_H_Local $1 "$2" is no','t used'#000+
   '05029_N_Private field "$1.$2" is never used'#000+
   '05030_N_Private field "$1.$2" is assigned but never used'#000+
-  '05031_N_Privat','e method "$1.$2" never used'#000+
+  '05031_N_Private method "$1.$2" never used'#000+
   '05032_E_Set type expected'#000+
   '05033_W_Function result does not seem to be set'#000+
-  '05034_W_Type "$1" is not aligned correctly in current record for C'#000+
+  '05034_W_Type "$1','" is not aligned correctly in current record for C'#000+
   '05035_E_Unknown record field identifier "$1"'#000+
-  '05036_W_Local variable "$1','" does not seem to be initialized'#000+
+  '05036_W_Local variable "$1" does not seem to be initialized'#000+
   '05037_W_Variable "$1" does not seem to be initialized'#000+
-  '05038_E_identifier idents no member "$1"'#000+
+  '05038_E_identifier idents no m','ember "$1"'#000+
   '05039_H_Found declaration: $1'#000+
   '05040_E_Data element too large'#000+
-  '05042_E_No matching implementation for interface m','ethod "$1" found'#000+
+  '05042_E_No matching implementation for interface method "$1" found'#000+
   '05043_W_Symbol "$1" is deprecated'#000+
   '05044_W_Symbol "$1" is not portable'#000+
-  '05055_W_Symbol "$1" is not implemented'#000+
+  '05055_W_Symbol "$1" is not impl','emented'#000+
   '05056_E_Can'#039't create unique type from this type'#000+
   '05057_H_Local variable "$1" does not seem to be initialized'#000+
-  '05058_','H_Variable "$1" does not seem to be initialized'#000+
+  '05058_H_Variable "$1" does not seem to be initialized'#000+
   '05059_W_Function result variable does not seem to initialized'#000+
-  '05060_H_Function result variable does not seem to be initialized'#000+
+  '05060_H_','Function result variable does not seem to be initialized'#000+
   '05061_W_Variable "$1" read but nowhere assigned'#000+
-  '05062_H_Found abs','tract method: $1'#000+
+  '05062_H_Found abstract method: $1'#000+
   '05063_W_Symbol "$1" is experimental'#000+
-  '06009_E_Parameter list size exceeds 65535 bytes'#000+
+  '05064_W_Forward declaration "$1" not resolved, assumed external'#000+
+  '0','6009_E_Parameter list size exceeds 65535 bytes'#000+
   '06012_E_File types must be var parameters'#000+
   '06013_E_The use of a far pointer isn'#039't allowed there'#000+
-  '06015_E_EXPORT declared functions can'#039't be c','alled'#000+
-  '06016_W_Possible illegal call of constructor or destructor'#000+
+  '06015_E_EXPORT declared functions can'#039't be called'#000+
+  '06016_W_Possible illegal call of constructor or ','destructor'#000+
   '06017_N_Inefficient code'#000+
   '06018_W_unreachable code'#000+
   '06020_E_Abstract methods can'#039't be called directly'#000+
   '06027_DL_Register $1 weight $2 $3'#000+
   '06029_DL_Stack frame is omitted'#000+
-  '06031_E_O','bject or class methods can'#039't be inline.'#000+
-  '06032_E_Procvar calls cannot be inline.'#000+
+  '06031_E_Object or class methods can'#039't be inline.'#000+
+  '06032_E_Procva','r calls cannot be inline.'#000+
   '06033_E_No code for inline procedure stored'#000+
   '06035_E_Element zero of an ansi/wide- or longstring can'#039't be acces'+
   'sed, use (set)length instead'#000+
-  '06037_E_Constructors ','or destructors can not be called inside a '#039'w'+
-  'ith'#039' clause'#000+
+  '06037_E_Constructors or destructors can not be called inside a '#039'wi'+
+  'th'#039' claus','e'#000+
   '06038_E_Cannot call message handler methods directly'#000+
   '06039_E_Jump in or outside of an exception block'#000+
   '06040_E_Control flow statements aren'#039't allowed in a finally block'#000+
-  '06041_W_Paramete','rs size exceeds limit for certain cpu'#039's'#000+
-  '06042_W_Local variable size exceed limit for certain cpu'#039's'#000+
+  '06041_W_Parameters size exceeds limit for certain cpu'#039's'#000+
+  '06042_W_Local ','variable size exceed limit for certain cpu'#039's'#000+
   '06043_E_Local variables size exceeds supported limit'#000+
   '06044_E_BREAK not allowed'#000+
   '06045_E_CONTINUE not allowed'#000+
-  '06046_F_Unknown compilerproc "$1"','. Check if you use the correct run '+
-  'time library.'#000+
-  '06047_F_Cannot find system type "$1". Check if you use the correct run'+
-  ' time library.'#000+
+  '06046_F_Unknown compilerproc "$1". Check if you use the correct run ti'+
+  'me library.'#000+
+  '06047','_F_Cannot find system type "$1". Check if you use the correct r'+
+  'un time library.'#000+
   '06048_H_Inherited call to abstract method ignored'#000+
   '06049_E_Goto label "$1" not defined or optimized away'#000+
-  '07','000_DL_Starting $1 styled assembler parsing'#000+
-  '07001_DL_Finished $1 styled assembler parsing'#000+
+  '07000_DL_Starting $1 styled assembler parsing'#000+
+  '07001_DL_F','inished $1 styled assembler parsing'#000+
   '07002_E_Non-label pattern contains @'#000+
   '07004_E_Error building record offset'#000+
   '07005_E_OFFSET used without identifier'#000+
-  '07006_E_TYPE used without identifier'#000,
+  '07006_E_TYPE used without identifier'#000+
   '07007_E_Cannot use local variable or parameters here'#000+
-  '07008_E_need to use OFFSET here'#000+
+  '0','7008_E_need to use OFFSET here'#000+
   '07009_E_need to use $ here'#000+
   '07010_E_Cannot use multiple relocatable symbols'#000+
   '07011_E_Relocatable symbol can only be added'#000+
-  '07012_E_Invalid constant expression',#000+
+  '07012_E_Invalid constant expression'#000+
   '07013_E_Relocatable symbol is not allowed'#000+
-  '07014_E_Invalid reference syntax'#000+
+  '07014_E_Inv','alid reference syntax'#000+
   '07015_E_You can not reach $1 from that code'#000+
   '07016_E_Local symbols/labels aren'#039't allowed as references'#000+
   '07017_E_Invalid base and index register usage'#000+
-  '07018_W_Possible',' error in object field handling'#000+
-  '07019_E_Wrong scale factor specified'#000+
+  '07018_W_Possible error in object field handling'#000+
+  '07019_E_Wrong scale fa','ctor specified'#000+
   '07020_E_Multiple index register usage'#000+
   '07021_E_Invalid operand type'#000+
   '07022_E_Invalid string as opcode operand: $1'#000+
   '07023_W_@CODE and @DATA not supported'#000+
-  '07024_E_Null label re','ferences are not allowed'#000+
-  '07025_E_Divide by zero in asm evaluator'#000+
+  '07024_E_Null label references are not allowed'#000+
+  '07025_E_Divide by zero in asm',' evaluator'#000+
   '07026_E_Illegal expression'#000+
   '07027_E_escape sequence ignored: $1'#000+
   '07028_E_Invalid symbol reference'#000+
   '07029_W_Fwait can cause emulation problems with emu387'#000+
-  '07030_W_$1 without opera','nd translated into $1P'#000+
-  '07031_W_ENTER instruction is not supported by Linux kernel'#000+
+  '07030_W_$1 without operand translated into $1P'#000+
+  '07031_W_ENTER instruction is no','t supported by Linux kernel'#000+
   '07032_W_Calling an overload function in assembler'#000+
   '07033_E_Unsupported symbol type for operand'#000+
   '07034_E_Constant value out of bounds'#000+
-  '07035_E_Error converting de','cimal $1'#000+
+  '07035_E_Error converting decimal $1'#000+
   '07036_E_Error converting octal $1'#000+
-  '07037_E_Error converting binary $1'#000+
+  '07037_E_Err','or converting binary $1'#000+
   '07038_E_Error converting hexadecimal $1'#000+
   '07039_H_$1 translated to $2'#000+
   '07040_W_$1 is associated to an overloaded function'#000+
   '07041_E_Cannot use SELF outside a method'#000+
-  '07','042_E_Cannot use OLDEBP outside a nested procedure'#000+
-  '07043_W_Procedures can'#039't return any value in asm code'#000+
+  '07042_E_Cannot use OLDEBP outside a nested procedure'#000+
+  '070','43_W_Procedures can'#039't return any value in asm code'#000+
   '07044_E_SEG not supported'#000+
   '07045_E_Size suffix and destination or source size do not match'#000+
-  '07046_W_Size suffix and destination or source',' size do not match'#000+
+  '07046_W_Size suffix and destination or source size do not match'#000+
   '07047_E_Assembler syntax error'#000+
-  '07048_E_Invalid combination of opcode and operands'#000+
+  '0704','8_E_Invalid combination of opcode and operands'#000+
   '07049_E_Assembler syntax error in operand'#000+
   '07050_E_Assembler syntax error in constant'#000+
   '07051_E_Invalid String expression'#000+
-  '07052_W_constant wit','h symbol $1 for address which is not on a pointe'+
-  'r'#000+
-  '07053_E_Unrecognized opcode $1'#000+
+  '07052_W_constant with symbol $1 for address which is not on a pointer'#000+
+  '0705','3_E_Unrecognized opcode $1'#000+
   '07054_E_Invalid or missing opcode'#000+
   '07055_E_Invalid combination of prefix and opcode: $1'#000+
   '07056_E_Invalid combination of override and opcode: $1'#000+
-  '07057_E_Too many ','operands on line'#000+
+  '07057_E_Too many operands on line'#000+
   '07058_W_NEAR ignored'#000+
-  '07059_W_FAR ignored'#000+
+  '07059_W_FAR igno','red'#000+
   '07060_E_Duplicate local symbol $1'#000+
   '07061_E_Undefined local symbol $1'#000+
   '07062_E_Unknown label identifier $1'#000+
   '07063_E_Invalid register name'#000+
   '07064_E_Invalid floating point register name'#000+
-  '070','66_W_Modulo not supported'#000+
-  '07067_E_Invalid floating point constant $1'#000+
+  '07066_W_Modulo not supported'#000+
+  '07067_E_Invalid floating poi','nt constant $1'#000+
   '07068_E_Invalid floating point expression'#000+
   '07069_E_Wrong symbol type'#000+
   '07070_E_Cannot index a local var or parameter with a register'#000+
-  '07071_E_Invalid segment override expressi','on'#000+
+  '07071_E_Invalid segment override expression'#000+
   '07072_W_Identifier $1 supposed external'#000+
-  '07073_E_Strings not allowed as constants'#000+
+  '07073_E_Str','ings not allowed as constants'#000+
   '07074_No type of variable specified'#000+
   '07075_E_assembler code not returned to text section'#000+
   '07076_E_Not a directive or local symbol $1'#000+
-  '07077_E_Using a defined n','ame as a local label'#000+
-  '07078_E_Dollar token is used without an identifier'#000+
+  '07077_E_Using a defined name as a local label'#000+
+  '07078_E_Dollar token is used with','out an identifier'#000+
   '07079_W_32bit constant created for address'#000+
   '07080_N_.align is target specific, use .balign or .p2align'#000+
   '07081_E_Can'#039't access fields directly for parameters'#000+
-  '07082_E_Can'#039't ','access fields of objects/classes directly'#000+
-  '07083_E_No size specified and unable to determine the size of the oper'+
-  'ands'#000+
+  '07082_E_Can'#039't access fields of objects/classes directly'#000+
+  '07083_E_No s','ize specified and unable to determine the size of the op'+
+  'erands'#000+
   '07084_E_Cannot use RESULT in this function'#000+
   '07086_W_"$1" without operand translated into "$1 %st,%st(1)"'#000+
-  '07087_W_"$1 %st(n)"',' translated into "$1 %st,%st(n)"'#000+
-  '07088_W_"$1 %st(n)" translated into "$1 %st(n),%st"'#000+
+  '07087_W_"$1 %st(n)" translated into "$1 %st,%st(n)"'#000+
+  '07088_W_"$1 %st(n)" t','ranslated into "$1 %st(n),%st"'#000+
   '07089_E_Char < not allowed here'#000+
   '07090_E_Char > not allowed here'#000+
   '07093_W_ALIGN not supported'#000+
   '07094_E_Inc and Dec cannot be together'#000+
-  '07095_E_Invalid reglist ','for movem'#000+
+  '07095_E_Invalid reglist for movem'#000+
   '07096_E_Reglist invalid for opcode'#000+
-  '07097_E_Higher cpu mode required ($1)'#000+
+  '07097_E_H','igher cpu mode required ($1)'#000+
   '07098_W_No size specified and unable to determine the size of the oper'+
   'ands, using DWORD as default'#000+
-  '07099_E_Syntax error while trying to parse a shifter opera','nd'#000+
-  '07100_E_Address of packed component is not at a byte boundary'#000+
+  '07099_E_Syntax error while trying to parse a shifter operand'#000+
+  '07100_E_Address of packed component is not at a byt','e boundary'#000+
   '07101_W_No size specified and unable to determine the size of the oper'+
   'ands, using BYTE as default'#000+
   '07102_W_Use of +offset(%ebp) for parameters invalid here'#000+
-  '07103_W_Use of +offs','et(%ebp) is not compatible with regcall conventi'+
-  'on'#000+
-  '07104_W_Use of -offset(%ebp) is not recommended for local variable acc'+
-  'ess'#000+
+  '07103_W_Use of +offset(%ebp) is not compatible with regcall convention'+
+  #000+
+  '071','04_W_Use of -offset(%ebp) is not recommended for local variable a'+
+  'ccess'#000+
   '07105_W_Use of -offset(%esp), access may cause a crash or value may be'+
   ' lost'#000+
-  '07106_E_VMTOffset must be used in combi','nation with a virtual method,'+
-  ' and "$1" is not virtual'#000+
+  '07106_E_VMTOffset must be used in combination with a virtual method, a'+
+  'nd "$1" is not virtual'#000,
   '07107_E_Generating PIC, but reference is not PIC-safe'#000+
   '08000_F_Too many assembler files'#000+
   '08001_F_Selected assembler output not supported'#000+
   '08002_F_Comp not supported'#000+
-  '08003_F_Direct not suppo','rt for binary writers'#000+
-  '08004_E_Allocating of data is only allowed in bss section'#000+
+  '08003_F_Direct not support for binary writers'#000+
+  '08004_E_Allocating of data is on','ly allowed in bss section'#000+
   '08005_F_No binary writer selected'#000+
   '08006_E_Asm: Opcode $1 not in table'#000+
   '08007_E_Asm: $1 invalid combination of opcode and operands'#000+
-  '08008_E_Asm: 16 Bit references ','not supported'#000+
+  '08008_E_Asm: 16 Bit references not supported'#000+
   '08009_E_Asm: Invalid effective address'#000+
-  '08010_E_Asm: Immediate or reference expected'#000+
+  '0','8010_E_Asm: Immediate or reference expected'#000+
   '08011_E_Asm: $1 value exceeds bounds $2'#000+
   '08012_E_Asm: Short jump is out of range $1'#000+
   '08013_E_Asm: Undefined label $1'#000+
-  '08014_E_Asm: Comp type not ','supported for this target'#000+
-  '08015_E_Asm: Extended type not supported for this target'#000+
+  '08014_E_Asm: Comp type not supported for this target'#000+
+  '08015_E_Asm: Extended type n','ot supported for this target'#000+
   '08016_E_Asm: Duplicate label $1'#000+
   '08017_E_Asm: Redefined label $1'#000+
   '08018_E_Asm: First defined here'#000+
   '08019_E_Asm: Invalid register $1'#000+
-  '08020_E_Asm: 16 or 32 Bit re','ferences not supported'#000+
-  '08021_E_Asm: 64 Bit operands not supported'#000+
+  '08020_E_Asm: 16 or 32 Bit references not supported'#000+
+  '08021_E_Asm: 64 Bit operands no','t supported'#000+
   '09000_W_Source operating system redefined'#000+
   '09001_I_Assembling (pipe) $1'#000+
   '09002_E_Can'#039't create assembler file: $1'#000+
   '09003_E_Can'#039't create object file: $1'#000+
-  '09004_E_Can'#039't create archi','ve file: $1'#000+
-  '09005_E_Assembler $1 not found, switching to external assembling'#000+
+  '09004_E_Can'#039't create archive file: $1'#000+
+  '09005_E_Assembler $1 not found, switching ','to external assembling'#000+
   '09006_T_Using assembler: $1'#000+
   '09007_E_Error while assembling exitcode $1'#000+
   '09008_E_Can'#039't call the assembler, error $1 switching to external a'+
   'ssembling'#000+
-  '09009_I_Assembli','ng $1'#000+
+  '09009_I_Assembling $1'#000+
   '09010_I_Assembling with smartlinking $1'#000+
-  '09011_W_Object $1 not found, Linking may fail !'#000+
+  '09011_W_','Object $1 not found, Linking may fail !'#000+
   '09012_W_Library $1 not found, Linking may fail !'#000+
   '09013_E_Error while linking'#000+
   '09014_E_Can'#039't call the linker, switching to external linking'#000+
-  '09015_I_','Linking $1'#000+
-  '09016_E_Util $1 not found, switching to external linking'#000+
+  '09015_I_Linking $1'#000+
+  '09016_E_Util $1 not found, switching to ext','ernal linking'#000+
   '09017_T_Using util $1'#000+
   '09018_E_Creation of Executables not supported'#000+
   '09019_E_Creation of Dynamic/Shared Libraries not supported'#000+
   '09020_I_Closing script $1'#000+
-  '09021_E_resource co','mpiler "$1" not found, switching to external mode'+
-  #000+
-  '09022_I_Compiling resource $1'#000+
+  '09021_E_resource compiler "$1" not found, switching to external mode'#000+
+  '0902','2_I_Compiling resource $1'#000+
   '09023_T_unit $1 can'#039't be statically linked, switching to smart lin'+
   'king'#000+
   '09024_T_unit $1 can'#039't be smart linked, switching to static linking'+
   #000+
-  '09025_T_unit $1 can'#039't ','be shared linked, switching to static link'+
-  'ing'#000+
-  '09026_E_unit $1 can'#039't be smart or static linked'#000+
+  '09025_T_unit $1 can'#039't be shared linked, switching to static linkin'+
+  'g'#000+
+  '09026_E_','unit $1 can'#039't be smart or static linked'#000+
   '09027_E_unit $1 can'#039't be shared or static linked'#000+
   '09028_D_Calling resource compiler "$1" with "$2" as command line'#000+
-  '09029_E_Error while compiling re','sources'#000+
-  '09030_E_Can'#039't call the resource compiler "$1", switching to extern'+
-  'al mode'#000+
+  '09029_E_Error while compiling resources'#000+
+  '09030_E_Can'#039't call the resource compiler "$1",',' switching to exte'+
+  'rnal mode'#000+
   '09031_E_Can'#039't open resource file "$1"'#000+
   '09032_E_Can'#039't write resource file "$1"'#000+
   '09128_F_Can'#039't post process executable $1'#000+
   '09129_F_Can'#039't open executable $1'#000+
-  '09130_X','_Size of Code: $1 bytes'#000+
-  '09131_X_Size of initialized data: $1 bytes'#000+
+  '09130_X_Size of Code: $1 bytes'#000+
+  '09131_X_Size of initialized da','ta: $1 bytes'#000+
   '09132_X_Size of uninitialized data: $1 bytes'#000+
   '09133_X_Stack space reserved: $1 bytes'#000+
   '09134_X_Stack space committed: $1 bytes'#000+
+  '09200_F_Executable image size is too big for $1 target.'#000+
   '10000_T_Unitsearch: $1'#000+
   '10001_T_PPU Loading $1'#000+
-  '100','02_U_PPU Name: $1'#000+
+  '1','0002_U_PPU Name: $1'#000+
   '10003_U_PPU Flags: $1'#000+
   '10004_U_PPU Crc: $1'#000+
   '10005_U_PPU Time: $1'#000+
@@ -744,107 +746,111 @@ const msgtxt : array[0..000196,1..240] of char=(
   '10007_U_PPU Invalid Header (no PPU at the begin)'#000+
   '10008_U_PPU Invalid Version $1'#000+
   '10009_U_PPU is compiled for another processor'#000+
-  '10010_','U_PPU is compiled for an other target'#000+
+  '1001','0_U_PPU is compiled for an other target'#000+
   '10011_U_PPU Source: $1'#000+
   '10012_U_Writing $1'#000+
   '10013_F_Can'#039't Write PPU-File'#000+
   '10014_F_Error reading PPU-File'#000+
   '10015_F_unexpected end of PPU-File'#000+
   '10016_F_Invalid PPU-File entry: $1'#000+
-  '10017_F_PPU Dbx count problem'#000,
+  '10017_F_PPU Dbx count proble','m'#000+
   '10018_E_Illegal unit name: $1'#000+
   '10019_F_Too much units'#000+
   '10020_F_Circular unit reference between $1 and $2'#000+
   '10021_F_Can'#039't compile unit $1, no sources available'#000+
   '10022_F_Can'#039't find unit $1 used by $2'#000+
   '10023_W_Unit $1 was not found but $2 exists'#000+
-  '100','24_F_Unit $1 searched but $2 found'#000+
+  '1','0024_F_Unit $1 searched but $2 found'#000+
   '10025_W_Compiling the system unit requires the -Us switch'#000+
   '10026_F_There were $1 errors compiling module, stopping'#000+
   '10027_U_Load from $1 ($2) unit $3'#000+
   '10028_U_Recompiling $1, checksum changed for $2'#000+
-  '10029_U_R','ecompiling $1, source found only'#000+
+  '10029_U','_Recompiling $1, source found only'#000+
   '10030_U_Recompiling unit, static lib is older than ppufile'#000+
   '10031_U_Recompiling unit, shared lib is older than ppufile'#000+
   '10032_U_Recompiling unit, obj and asm are older than ppufile'#000+
-  '10033_U_Recompiling unit, ob','j is older than asm'#000+
+  '10033_U_Recompiling unit, ','obj is older than asm'#000+
   '10034_U_Parsing interface of $1'#000+
   '10035_U_Parsing implementation of $1'#000+
   '10036_U_Second load for unit $1'#000+
   '10037_U_PPU Check file $1 time $2'#000+
   '10040_W_Can'#039't recompile unit $1, but found modifed include files'#000+
-  '10041_U_File $1 is n','ewer than PPU file $2'#000+
+  '10041_U_File $1 is',' newer than PPU file $2'#000+
   '10042_U_Trying to use a unit which was compiled with a different FPU m'+
   'ode'#000+
   '10043_U_Loading interface units from $1'#000+
   '10044_U_Loading implementation units from $1'#000+
   '10045_U_Interface CRC changed for unit $1'#000+
-  '10046_U_Implement','ation CRC changed for unit $1'#000+
+  '10046_U_Impleme','ntation CRC changed for unit $1'#000+
   '10047_U_Finished compiling unit $1'#000+
   '10048_U_Add dependency of $1 to $2'#000+
   '10049_U_No reload, is caller: $1'#000+
   '10050_U_No reload, already in second compile: $1'#000+
   '10051_U_Flag for reload: $1'#000+
   '10052_U_Forced reloading'#000+
-  '10053','_U_Previous state of $1: $2'#000+
+  '100','53_U_Previous state of $1: $2'#000+
   '10054_U_Already compiling $1, setting second compile'#000+
   '10055_U_Loading unit $1'#000+
   '10056_U_Finished loading unit $1'#000+
   '10057_U_Registering new unit $1'#000+
   '10058_U_Re-resolving unit $1'#000+
-  '10059_U_Skipping re-resolving unit $1, st','ill loading used units'#000+
+  '10059_U_Skipping re-resolving unit $1, ','still loading used units'#000+
   '10060_U_Unloading resource unit $1 (not needed)'#000+
   '11000_O_$1 [options] <inputfile> [options]'#000+
   '11001_W_Only one source file supported'#000+
   '11002_W_DEF file can be created only for OS/2'#000+
-  '11003_E_nested response files are not sup','ported'#000+
+  '11003_E_nested response files are not s','upported'#000+
   '11004_F_No source file name in command line'#000+
   '11005_N_No option inside $1 config file'#000+
   '11006_E_Illegal parameter: $1'#000+
   '11007_H_-? writes help pages'#000+
   '11008_F_Too many config files nested'#000+
   '11009_F_Unable to open file $1'#000+
-  '11010_D_Reading furthe','r options from $1'#000+
+  '11010_D_Reading furt','her options from $1'#000+
   '11011_W_Target is already set to: $1'#000+
   '11012_W_Shared libs not supported on DOS platform, reverting to static'+
   #000+
-  '11013_F_too many IF(N)DEFs'#000+
-  '11014_F_too many ENDIFs'#000+
-  '11015_F_open conditional at the end of the file'#000+
-  '11016_W_Debug i','nformation generation is not supported by this execut'+
-  'able'#000+
+  '11013_F_In options file $1 at line $2 too many \var{\#IF(N)DEFs} encou'+
+  'ntered'#000+
+  '11014_F_In options file $1 at line ','$2 unexpected \var{\#ENDIFs} enco'+
+  'untered'#000+
+  '11015_F_Open conditional at the end of the options file'#000+
+  '11016_W_Debug information generation is not supported by this executab'+
+  'le'#000+
   '11017_H_Try recompiling with -dGDB'#000+
-  '11018_W_You are using the obsolete switch $1'#000+
+  '11018_W_You are using the obsolete ','switch $1'#000+
   '11019_W_You are using the obsolete switch $1, please use $2'#000+
-  '11020_N_Switching assembler to default sou','rce writing assembler'#000+
+  '11020_N_Switching assembler to default source writing assembler'#000+
   '11021_W_Assembler output selected "$1" is not compatible with "$2"'#000+
   '11022_W_"$1" assembler use forced'#000+
-  '11026_T_Reading options from file $1'#000+
+  '11026','_T_Reading options from file $1'#000+
   '11027_T_Reading options from environment $1'#000+
   '11028_D_Handling option "$1"'#000+
-  '11029__','*** press enter ***'#000+
+  '11029_O_*** press enter ***'#000+
   '11030_H_Start of reading config file $1'#000+
   '11031_H_End of reading config file $1'#000+
-  '11032_D_interpreting option "$1"'#000+
+  '11032_D_interpreting option "','$1"'#000+
   '11036_D_interpreting firstpass option "$1"'#000+
   '11033_D_interpreting file option "$1"'#000+
-  '11034_D_Reading config file ','"$1"'#000+
+  '11034_D_Reading config file "$1"'#000+
   '11035_D_found source file name "$1"'#000+
   '11039_E_Unknown code page'#000+
   '11040_F_Config file $1 is a directory'#000+
-  '11041_W_Assembler output selected "$1" cannot generate debug info, deb'+
-  'ugging disabled'#000+
-  '11042_W_Use of ppc386.cfg is deprecated, please u','se fpc.cfg instead'#000+
-  '11023_Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPC'+
-  'CPU'#010+
+  '11041_W_Assembler outp','ut selected "$1" cannot generate debug info, d'+
+  'ebugging disabled'#000+
+  '11042_W_Use of ppc386.cfg is deprecated, please use fpc.cfg instead'#000+
+  '11043_F_In options file $1 at line $2 \var{\#ELSE} directive without \'+
+  'var{\#IF(N)DEF} found'#000+
+  '11023_Free Pasca','l Compiler version $FPCFULLVERSION [$FPCDATE] for $F'+
+  'PCCPU'#010+
   'Copyright (c) 1993-2008 by Florian Klaempfl'#000+
   '11024_Free Pascal Compiler version $FPCVERSION'#010+
   #010+
   'Compiler Date      : $FPCDATE'#010+
-  'Compiler CPU Target: $FPC','CPU'#010+
+  'Compiler CPU Target: $FPCCPU'#010+
   #010+
   'Supported targets:'#010+
-  '  $OSTARGETS'#010+
+  '  $OSTARGET','S'#010+
   #010+
   'Supported CPU instruction sets:'#010+
   '  $INSTRUCTIONSETS'#010+
@@ -858,70 +864,70 @@ const msgtxt : array[0..000196,1..240] of char=(
   'Supported Optimizations:'#010+
   '  $OPTIMIZATIONS'#010+
   #010+
-  'This program c','omes under the GNU General Public Licence'#010+
+  'This program comes under the GNU General Public L','icence'#010+
   'For more information read COPYING.FPC'#010+
   #010+
   'Report bugs,suggestions etc to:'#010+
   '                 [email protected]'#000+
   '11025_**0*_Put + after a boolean switch option to enable it, - to disa'+
   'ble it'#010+
-  '**1a_The comp','iler doesn'#039't delete the generated assembler file'#010+
+  '**1a_The compiler doesn'#039't delete the generated a','ssembler file'#010+
   '**2al_List sourcecode lines in assembler file'#010+
   '**2an_List node info in assembler file'#010+
   '*L2ap_Use pipes instead of creating temporary assembler files'#010+
-  '**2ar_List register allocation/release info ','in assembler file'#010+
-  '**2at_List temp allocation/release info in assembler file'#010+
+  '**2ar_List register allocation/release info in assembler file'#010+
+  '**2at_List temp a','llocation/release info in assembler file'#010+
   '**1A<x>_Output format:'#010+
   '**2Adefault_Use default assembler'#010+
   '3*2Aas_Assemble using GNU AS'#010+
   '3*2Anasmcoff_COFF (Go32v2) file using Nasm'#010+
-  '3*2Anasmelf_ELF32 (Linux) file usin','g Nasm'#010+
-  '3*2Anasmwin32_Win32 object file using Nasm'#010+
+  '3*2Anasmelf_ELF32 (Linux) file using Nasm'#010+
+  '3*2Anasmwin32_Win32 object f','ile using Nasm'#010+
   '3*2Anasmwdosx_Win32/WDOSX object file using Nasm'#010+
   '3*2Awasm_Obj file using Wasm (Watcom)'#010+
   '3*2Anasmobj_Obj file using Nasm'#010+
   '3*2Amasm_Obj file using Masm (Microsoft)'#010+
-  '3*2Atasm_Obj file using Tasm (','Borland)'#010+
-  '3*2Aelf_ELF (Linux) using internal writer'#010+
+  '3*2Atasm_Obj file using Tasm (Borland)'#010+
+  '3*2Aelf_ELF (Linux) using ','internal writer'#010+
   '3*2Acoff_COFF (Go32v2) using internal writer'#010+
   '3*2Apecoff_PE-COFF (Win32) using internal writer'#010+
   '4*2Aas_Assemble using GNU AS'#010+
   '6*2Aas_Unix o-file using GNU AS'#010+
   '6*2Agas_GNU Motorola assembler'#010+
-  '6*2','Amit_MIT Syntax (old GAS)'#010+
-  '6*2Amot_Standard Motorola assembler'#010+
+  '6*2Amit_MIT Syntax (old GAS)'#010+
+  '6*2Amot_S','tandard Motorola assembler'#010+
   'A*2Aas_Assemble using GNU AS'#010+
   'P*2Aas_Assemble using GNU AS'#010+
   'S*2Aas_Assemble using GNU AS'#010+
   '**1b_Generate browser info'#010+
   '**2bl_Generate local symbol info'#010+
   '**1B_Build all modules'#010+
-  '**1C<x>_','Code generation options:'#010+
-  '**2Ca<x>_Select ABI, see fpc -i for possible values'#010+
+  '**1C<x>_Code generation options:'#010+
+  '**2Ca<x>_S','elect ABI, see fpc -i for possible values'#010+
   '**2Cb_Generate big-endian code'#010+
   '**2Cc<x>_Set default calling convention to <x>'#010+
   '**2CD_Create also dynamic library (not supported)'#010+
-  '**2Ce_Compilation with emulated flo','ating point opcodes'#010+
-  '**2Cf<x>_Select fpu instruction set to use, see fpc -i for possible va'+
-  'lues'#010+
+  '**2Ce_Compilation with emulated floating point opcodes'#010+
+  '**2Cf<x>_Select',' fpu instruction set to use, see fpc -i for possible '+
+  'values'#010+
   '**2CF<x>_Minimal floating point constant precision (default, 32, 64)'#010+
   '**2Cg_Generate PIC code'#010+
-  '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#010,
+  '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#010+
   '**2Ci_IO-checking'#010+
-  '**2Cn_Omit linking stage'#010+
+  '**2Cn_Omit linkin','g stage'#010+
   '**2Co_Check overflow of integer operations'#010+
   '**2CO_Check for possible overflow of integer operations'#010+
   '**2Cp<x>_Select instruction set, see fpc -i for possible values'#010+
   '**2CP<x>=<y>_ packing settings'#010+
-  '**3','CPPACKSET=<y>_ <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, '+
+  '**3CPPACKSET=<y>_ <y> set allocation: ','0, 1 or DEFAULT or NORMAL, 2, '+
   '4 and 8'#010+
   '**2Cr_Range checking'#010+
   '**2CR_Verify object method call validity'#010+
   '**2Cs<n>_Set stack size to <n>'#010+
   '**2Ct_Stack checking'#010+
   '**2CX_Create also smartlinked library'#010+
-  '**1d<x>_Defines',' the symbol <x>'#010+
-  '**1D_Generate a DEF file'#010+
+  '**1d<x>_Defines the symbol <x>'#010+
+  '**1D_Generate a DEF',' file'#010+
   '**2Dd<x>_Set description to <x>'#010+
   '**2Dv<x>_Set DLL version to <x>'#010+
   '*O2Dw_PM application'#010+
@@ -929,119 +935,119 @@ const msgtxt : array[0..000196,1..240] of char=(
   '**1E_Same as -Cn'#010+
   '**1fPIC_Same as -Cg'#010+
   '**1F<x>_Set file names and paths:'#010+
-  '**2Fa<x>[,y]','_(for a program) load units <x> and [y] before uses is p'+
+  '**2Fa<x>[,y]_(for a program) load units <x> and',' [y] before uses is p'+
   'arsed'#010+
   '**2Fc<x>_Set input codepage to <x>'#010+
   '**2FC<x>_Set RC compiler binary name to <x>'#010+
   '**2FD<x>_Set the directory where to search for compiler utilities'#010+
-  '**2Fe<x>_Redirect error output to',' <x>'#010+
-  '**2Ff<x>_Add <x> to framework path (Darwin only)'#010+
+  '**2Fe<x>_Redirect error output to <x>'#010+
+  '**2Ff<x>_Add <x> to framework ','path (Darwin only)'#010+
   '**2FE<x>_Set exe/unit output path to <x>'#010+
   '**2Fi<x>_Add <x> to include path'#010+
   '**2Fl<x>_Add <x> to library path'#010+
   '**2FL<x>_Use <x> as dynamic linker'#010+
-  '**2Fm<x>_Load unicode conversion table from ','<x>.txt in the compiler '+
-  'dir'#010+
-  '**2Fo<x>_Add <x> to object path'#010+
+  '**2Fm<x>_Load unicode conversion table from <x>.txt in the compiler di'+
+  'r'#010+
+  '**2Fo<x','>_Add <x> to object path'#010+
   '**2Fr<x>_Load error message file <x>'#010+
   '**2FR<x>_Set resource (.res) linker to <x>'#010+
   '**2Fu<x>_Add <x> to unit path'#010+
   '**2FU<x>_Set unit output path to <x>, overrides -FE'#010+
-  '*g1g_Generate debu','g information (default format for target)'#010+
+  '*g1g_Generate debug information (default format for t','arget)'#010+
   '*g2gc_Generate checks for pointers'#010+
   '*g2gh_Use heaptrace unit (for memory leak/corruption debugging)'#010+
   '*g2gl_Use line info unit (show more info with backtraces)'#010+
   '*g2go<x>_Set debug information options'#010+
-  '*g','3godwarfsets_ Enable Dwarf set debug information (breaks gdb < 6.5'+
+  '*g3godwarfsets_ Enable Dwarf set debu','g information (breaks gdb < 6.5'+
   ')'#010+
   '*g2gp_Preserve case in stabs symbol names'#010+
   '*g2gs_Generate stabs debug information'#010+
   '*g2gt_Trash local variables (to detect uninitialized uses)'#010+
-  '*g2gv_Generates programs traceab','le with valgrind'#010+
-  '*g2gw_Generate dwarf-2 debug information (same as -gw2)'#010+
+  '*g2gv_Generates programs traceable with valgrind'#010+
+  '*g2gw_Generate dwa','rf-2 debug information (same as -gw2)'#010+
   '*g2gw2_Generate dwarf-2 debug information'#010+
   '*g2gw3_Generate dwarf-3 debug information'#010+
   '**1i_Information'#010+
   '**2iD_Return compiler date'#010+
   '**2iV_Return short compiler version'#010+
-  '**2','iW_Return full compiler version'#010+
-  '**2iSO_Return compiler OS'#010+
+  '**2iW_Return full compiler version'#010+
+  '**2','iSO_Return compiler OS'#010+
   '**2iSP_Return compiler host processor'#010+
   '**2iTO_Return target OS'#010+
   '**2iTP_Return target processor'#010+
   '**1I<x>_Add <x> to include path'#010+
   '**1k<x>_Pass <x> to the linker'#010+
   '**1l_Write logo'#010+
-  '**1M<x>_Se','t language mode to <x>'#010+
-  '**2Mfpc_Free Pascal dialect (default)'#010+
+  '**1M<x>_Set language mode to <x>'#010+
+  '**2Mfpc_Free',' Pascal dialect (default)'#010+
   '**2Mobjfpc_FPC mode with Object Pascal support'#010+
   '**2Mdelphi_Delphi 7 compatibility mode'#010+
   '**2Mtp_TP/BP 7.0 compatibility mode'#010+
   '**2Mmacpas_Macintosh Pascal dialects compatibility mode'#010+
-  '*','*1n_Do not read the default config files'#010+
+  '**1n_Do not read the default config ','files'#010+
   '**1N<x>_Node tree optimizations'#010+
   '**2Nu_Unroll loops'#010+
   '**1o<x>_Change the name of the executable produced to <x>'#010+
   '**1O<x>_Optimizations:'#010+
   '**2O-_Disable optimizations'#010+
-  '**2O1_Level 1 optimizations (quick and ','debugger friendly)'#010+
-  '**2O2_Level 2 optimizations (-O1 + quick optimizations)'#010+
+  '**2O1_Level 1 optimizations (quick and debugger friendly)'#010+
+  '**2O2_Level 2 op','timizations (-O1 + quick optimizations)'#010+
   '**2O3_Level 3 optimizations (-O2 + slow optimizations)'#010+
   '**2Oa<x>=<y>_Set alignment'#010+
   '**2Oo[NO]<x>_Enable or disable optimizations, see fpc -i for possible '+
   'values'#010+
-  '**2Op<','x>_Set target cpu for optimizing, see fpc -i for possible valu'+
+  '**2Op<x>_Set target cpu for optimizing, s','ee fpc -i for possible valu'+
   'es'#010+
   '**2Os_Optimize for size rather than speed'#010+
   '**1pg_Generate profile code for gprof (defines FPC_PROFILE)'#010+
   '**1R<x>_Assembler reading style:'#010+
-  '**2Rdefault_Use default assembler for ta','rget'#010+
-  '3*2Ratt_Read AT&T style assembler'#010+
+  '**2Rdefault_Use default assembler for target'#010+
+  '3*2Ratt_Read AT&T style assemb','ler'#010+
   '3*2Rintel_Read Intel style assembler'#010+
   '6*2RMOT_Read motorola style assembler'#010+
   '**1S<x>_Syntax options:'#010+
   '**2S2_Same as -Mobjfpc'#010+
   '**2Sc_Support operators like C (*=,+=,/= and -=)'#010+
   '**2Sa_Turn on assertions'#010+
-  '**2Sd','_Same as -Mdelphi'#010+
-  '**2Se<x>_Error options. <x> is a combination of the following:'#010+
+  '**2Sd_Same as -Mdelphi'#010+
+  '**2Se<x>_Error op','tions. <x> is a combination of the following:'#010+
   '**3*_<n> : Compiler halts after the <n> errors (default is 1)'#010+
   '**3*_w : Compiler also halts after warnings'#010+
   '**3*_n : Compiler also halts after notes'#010+
-  '**3*_h : Com','piler also halts after hints'#010+
-  '**2Sg_Enable LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+
+  '**3*_h : Compiler also halts after hints'#010+
+  '**2Sg_','Enable LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+
   '**2Sh_Use ansistrings by default instead of shortstrings'#010+
   '**2Si_Turn on inlining of procedures/functions declared as "inline"'#010+
   '**2Sk_Load fpcylix unit'#010+
-  '**2','SI<x>_Set interface style to <x>'#010+
-  '**3SIcom_COM compatible interface (default)'#010+
+  '**2SI<x>_Set interface style to <x>'#010+
+  '**','3SIcom_COM compatible interface (default)'#010+
   '**3SIcorba_CORBA compatible interface'#010+
   '**2Sm_Support macros like C (global)'#010+
   '**2So_Same as -Mtp'#010+
   '**2Ss_Constructor name must be init (destructor must be done)'#010+
-  '**2St_A','llow static keyword in objects'#010+
-  '**2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)'#010+
+  '**2St_Allow static keyword in objects'#010+
+  '**2S','x_Enable exception keywords (default in Delphi/ObjFPC modes)'#010+
   '**1s_Do not call assembler and linker'#010+
   '**2sh_Generate script to link on host'#010+
   '**2st_Generate script to link on target'#010+
-  '**2sr_Skip register allocati','on phase (use with -alr)'#010+
-  '**1T<x>_Target operating system:'#010+
+  '**2sr_Skip register allocation phase (use with -alr)'#010+
+  '**1T<x>_Ta','rget operating system:'#010+
   '3*2Temx_OS/2 via EMX (including EMX/RSX extender)'#010+
   '3*2Tfreebsd_FreeBSD'#010+
   '3*2Tgo32v2_Version 2 of DJ Delorie DOS extender'#010+
   '3*2Tlinux_Linux'#010+
   '3*2Tnetbsd_NetBSD'#010+
-  '3*2Tnetware_Novell Netware Mod','ule (clib)'#010+
-  '3*2Tnetwlibc_Novell Netware Module (libc)'#010+
+  '3*2Tnetware_Novell Netware Module (clib)'#010+
+  '3*2Tnetwlibc_Novell Netw','are Module (libc)'#010+
   '3*2Topenbsd_OpenBSD'#010+
   '3*2Tos2_OS/2 / eComStation'#010+
   '3*2Tsunos_SunOS/Solaris'#010+
   '3*2Tsymbian_Symbian OS'#010+
   '3*2Twatcom_Watcom compatible DOS extender'#010+
   '3*2Twdosx_WDOSX DOS extender'#010+
-  '3*2Twin32_Windows 32 B','it'#010+
+  '3*2Twin32_Windows 32 Bit'#010+
   '3*2Twince_Windows CE'#010+
-  '4*2Tlinux_Linux'#010+
+  '4*2Tlinux_L','inux'#010+
   '6*2Tamiga_Commodore Amiga'#010+
   '6*2Tatari_Atari ST/STe/TT'#010+
   '6*2Tlinux_Linux/m68k'#010+
@@ -1050,81 +1056,81 @@ const msgtxt : array[0..000196,1..240] of char=(
   'A*2Tlinux_Linux'#010+
   'A*2Twince_Windows CE'#010+
   'P*2Tamiga_AmigaOS on PowerPC'#010+
-  'P*','2Tdarwin_Darwin and Mac OS X on PowerPC'#010+
+  'P*2Tdarwin_Darwin and Mac OS X on Pow','erPC'#010+
   'P*2Tlinux_Linux on PowerPC'#010+
   'P*2Tmacos_Mac OS (classic) on PowerPC'#010+
   'P*2Tmorphos_MorphOS'#010+
   'S*2Tlinux_Linux'#010+
   '**1u<x>_Undefines the symbol <x>'#010+
   '**1U_Unit options:'#010+
-  '**2Un_Do not check where the unit name matches ','the file name'#010+
-  '**2Ur_Generate release unit files (never automatically recompiled)'#010+
+  '**2Un_Do not check where the unit name matches the file name'#010+
+  '**2Ur_Generate releas','e unit files (never automatically recompiled)'#010+
   '**2Us_Compile a system unit'#010+
   '**1v<x>_Be verbose. <x> is a combination of the following letters:'#010+
-  '**2*_e : Show errors (default)       0 : Show nothing (except er','rors'+
-  ')'#010+
-  '**2*_w : Show warnings               u : Show unit info'#010+
+  '**2*_e : Show errors (default)       0 : Show nothing (except errors)'#010+
+  '**2*_w : Show warnings       ','        u : Show unit info'#010+
   '**2*_n : Show notes                  t : Show tried/used files'#010+
   '**2*_h : Show hints                  c : Show conditionals'#010+
-  '**2*_i : Show general info           d : Show debug info',#010+
-  '**2*_l : Show linenumbers            r : Rhide/GCC compatibility mode'#010+
+  '**2*_i : Show general info           d : Show debug info'#010+
+  '**2*_l : Show linenumbers         ','   r : Rhide/GCC compatibility mod'+
+  'e'#010+
   '**2*_a : Show everything             x : Executable info (Win32 only)'#010+
   '**2*_b : Write file names messages with full path'#010+
-  '**2*_v : Write fpcdebug.txt with     p : Write tr','ee.log with parse t'+
-  'ree'#010+
-  '**2*_    lots of debugging info'#010+
+  '**2*_v : Write fpcdebug.txt with     p : Write tree.log with parse tre'+
+  'e'#010+
+  '**2*_    lot','s of debugging info      q : Show message numbers'#010+
+  '**2*_m<x>,<y> : Don'#039't show messages numbered <x> and <y>'#010+
   '3*1W<x>_Target-specific options (targets)'#010+
   'A*1W<x>_Target-specific options (targets)'#010+
   'P*1W<x>_Target-specific options (targets)'#010+
-  '3*2Wb_Create a bundle instead of a library (Darwin)'#010+
-  'P*2Wb_C','reate a bundle instead of a library (Darwin)'#010+
+  '3*2Wb_C','reate a bundle instead of a library (Darwin)'#010+
+  'P*2Wb_Create a bundle instead of a library (Darwin)'#010+
   'p*2Wb_Create a bundle instead of a library (Darwin)'#010+
   '3*2WB_Create a relocatable image (Windows)'#010+
-  'A*2WB_Create a relocatable image (Windows, Symbian)'#010+
-  '3*2WC_Specify console type application (EMX, OS/','2, Windows)'#010+
+  'A*2WB_Create a relocatable image (Windows, Symbi','an)'#010+
+  '3*2WC_Specify console type application (EMX, OS/2, Windows)'#010+
   'A*2WC_Specify console type application (Windows)'#010+
   'P*2WC_Specify console type application (Classic Mac OS)'#010+
   '3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+
-  'A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)',#010+
+  'A*2WD_Use',' DEFFILE to export functions of DLL or EXE (Windows)'#010+
   '3*2We_Use external resources (Darwin)'#010+
   'P*2We_Use external resources (Darwin)'#010+
   'p*2We_Use external resources (Darwin)'#010+
   '3*2WF_Specify full-screen type application (EMX, OS/2)'#010+
-  '3*2WG_Specify graphic type application (EMX, OS/2, Windows)'#010+
-  'A*2WG_Spec','ify graphic type application (Windows)'#010+
+  '3*2WG_Specify grap','hic type application (EMX, OS/2, Windows)'#010+
+  'A*2WG_Specify graphic type application (Windows)'#010+
   'P*2WG_Specify graphic type application (Classic Mac OS)'#010+
   '3*2Wi_Use internal resources (Darwin)'#010+
   'P*2Wi_Use internal resources (Darwin)'#010+
-  'p*2Wi_Use internal resources (Darwin)'#010+
-  '3*2WN_Do not generate relocatio','n code, needed for debugging (Windows'+
-  ')'#010+
+  'p*2Wi_Use interna','l resources (Darwin)'#010+
+  '3*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+
   'A*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+
   '3*2WR_Generate relocation code (Windows)'#010+
-  'A*2WR_Generate relocation code (Windows)'#010+
-  'P*2WT_Specify MPW tool type application (Classic ','Mac OS)'#010+
+  'A*2WR_Generate relocation code (Window','s)'#010+
+  'P*2WT_Specify MPW tool type application (Classic Mac OS)'#010+
   '**1X_Executable options:'#010+
   '**2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Lin'+
   'ux)'#010+
   '**2Xd_Do not use standard library search path (needed for cross compil'+
   'e)'#010+
-  '**2Xe_Use external linker'#010+
-  '**2Xg_Create debuginfo in a separa','te file and add a debuglink sectio'+
-  'n to executable'#010+
+  '**2Xe_Us','e external linker'#010+
+  '**2Xg_Create debuginfo in a separate file and add a debuglink section '+
+  'to executable'#010+
   '**2XD_Try to link units dynamically      (defines FPC_LINK_DYNAMIC)'#010+
   '**2Xi_Use internal linker'#010+
   '**2Xm_Generate link map'#010+
-  '**2XM<x>_Set the name of the '#039'main'#039' program routine (default i'+
-  's '#039'main'#039')'#010,
+  '**2XM<x>_Set the nam','e of the '#039'main'#039' program routine (default'+
+  ' is '#039'main'#039')'#010+
   '**2XP<x>_Prepend the binutils names with the prefix <x>'#010+
   '**2Xr<x>_Set library search path to <x> (needed for cross compile) (Be'+
   'OS, Linux)'#010+
-  '**2XR<x>_Prepend <x> to all linker search paths (BeOS, Darwin, FreeBSD'+
-  ', Linux, Mac OS, Solaris)'#010+
-  '**2Xs_S','trip all symbols from executable'#010+
+  '**2XR<x>_Prepend <x> to all linker search paths (Be','OS, Darwin, FreeB'+
+  'SD, Linux, Mac OS, Solaris)'#010+
+  '**2Xs_Strip all symbols from executable'#010+
   '**2XS_Try to link units statically (default, defines FPC_LINK_STATIC)'#010+
   '**2Xt_Link with static libraries (-static is passed to linker)'#010+
-  '**2XX_Try to smartlink units             (defines FPC_LINK_SMART)'#010+
+  '**2XX_Try to smartlink',' units             (defines FPC_LINK_SMART)'#010+
   '**1*_'#010+
-  '**','1?_Show this help'#010+
+  '**1?_Show this help'#010+
   '**1h_Shows this help without waiting'#000
 );

+ 47 - 24
compiler/nadd.pas

@@ -546,11 +546,11 @@ implementation
         { stringconstn only                                       }
 
         { widechars are converted above to widestrings too }
-        { this isn't veryy efficient, but I don't think    }
+        { this isn't ver y efficient, but I don't think    }
         { that it does matter that much (FK)               }
         if (lt=stringconstn) and (rt=stringconstn) and
-          (tstringconstnode(left).cst_type=cst_widestring) and
-          (tstringconstnode(right).cst_type=cst_widestring) then
+          (tstringconstnode(left).cst_type in [cst_widestring,cst_unicodestring]) and
+          (tstringconstnode(right).cst_type in [cst_widestring,cst_unicodestring]) then
           begin
              initwidestring(ws1);
              initwidestring(ws2);
@@ -774,11 +774,10 @@ implementation
            end;
 
 
-         { Kylix allows enum+ordconstn in an enum declaration (blocktype
-           is bt_type), we need to do the conversion here before the
-           constant folding }
+         { Kylix allows enum+ordconstn in an enum type declaration, we need to do
+           the conversion here before the constant folding }
          if (m_delphi in current_settings.modeswitches) and
-            (blocktype=bt_type) then
+            (blocktype in [bt_type,bt_const_type,bt_var_type]) then
           begin
             if (left.resultdef.typ=enumdef) and
                (right.resultdef.typ=orddef) then
@@ -829,6 +828,16 @@ implementation
             end;
          end;
 
+        { If both operands are constant and there is a unicodestring
+          or unicodestring then convert everything to unicodestring }
+        if is_constnode(right) and is_constnode(left) and
+           (is_unicodestring(right.resultdef) or
+            is_unicodestring(left.resultdef)) then
+          begin
+            inserttypeconv(right,cunicodestringtype);
+            inserttypeconv(left,cunicodestringtype);
+          end;
+
         { If both operands are constant and there is a widechar
           or widestring then convert everything to widestring. This
           allows constant folding like char+widechar }
@@ -1195,17 +1204,17 @@ implementation
                         u8bit:
                           nd:=u8inttype;
                         s16bit:
-                          nd:=s8inttype;
+                          nd:=s16inttype;
                         u16bit:
-                          nd:=u8inttype;
+                          nd:=u16inttype;
                         s32bit:
-                          nd:=s8inttype;
+                          nd:=s32inttype;
                         u32bit:
-                          nd:=u8inttype;
+                          nd:=u32inttype;
                         s64bit:
-                          nd:=s8inttype;
+                          nd:=s64inttype;
                         u64bit:
-                          nd:=u8inttype;
+                          nd:=u64inttype;
                         else
                           internalerror(200802291);
                       end;
@@ -1419,11 +1428,15 @@ implementation
           begin
             if (nodetype in [addn,equaln,unequaln,lten,gten,ltn,gtn]) then
               begin
+                { Is there a unicodestring? }
+                if is_unicodestring(rd) or is_unicodestring(ld) then
+                  strtype:=st_unicodestring
+                else
                 { Is there a widestring? }
-                if is_widestring(rd) or is_widestring(ld) or
-                   is_pwidechar(rd) or is_widechararray(rd) or is_widechar(rd) or is_open_widechararray(rd) or
-                   is_pwidechar(ld) or is_widechararray(ld) or is_widechar(ld) or is_open_widechararray(ld) then
-                  strtype:= st_widestring
+                  if is_widestring(rd) or is_widestring(ld) or
+                     is_pwidechar(rd) or is_widechararray(rd) or is_widechar(rd) or is_open_widechararray(rd) or
+                     is_pwidechar(ld) or is_widechararray(ld) or is_widechar(ld) or is_open_widechararray(ld) then
+                    strtype:=st_widestring
                 else
                   if is_ansistring(rd) or is_ansistring(ld) or
                      ((cs_ansistrings in current_settings.localswitches) and
@@ -1433,13 +1446,13 @@ implementation
                        is_pchar(ld) or (is_chararray(ld) and (ld.size > 255)) or is_open_chararray(ld)
                       )
                      ) then
-                    strtype:= st_ansistring
+                    strtype:=st_ansistring
                 else
                   if is_longstring(rd) or is_longstring(ld) then
-                    strtype:= st_longstring
+                    strtype:=st_longstring
                 else
                   begin
-                    {$warning todo: add a warning/hint here if one converting a too large array}
+                    { TODO: todo: add a warning/hint here if one converting a too large array}
                     { nodes is PChar, array [with size > 255] or OpenArrayOfChar.
                       Note: Delphi halts with error if "array [0..xx] of char"
                            is assigned to ShortString and string length is less
@@ -1456,6 +1469,13 @@ implementation
                       if not(is_widestring(ld)) then
                         inserttypeconv(left,cwidestringtype);
                     end;
+                  st_unicodestring :
+                    begin
+                      if not(is_unicodestring(rd)) then
+                        inserttypeconv(right,cunicodestringtype);
+                      if not(is_unicodestring(ld)) then
+                        inserttypeconv(left,cunicodestringtype);
+                    end;
                   st_ansistring :
                     begin
                       if not(is_ansistring(rd)) then
@@ -1739,9 +1759,9 @@ implementation
                   begin
                     { for strings, return is always a 255 char string }
                     if is_shortstring(left.resultdef) then
-                     resultdef:=cshortstringtype
+                      resultdef:=cshortstringtype
                     else
-                     resultdef:=left.resultdef;
+                      resultdef:=left.resultdef;
                   end;
                 else
                   resultdef:=left.resultdef;
@@ -2356,8 +2376,6 @@ implementation
          hp      : tnode;
 {$endif addstringopt}
          rd,ld   : tdef;
-         newstatement : tstatementnode;
-         temp    : ttempcreatenode;
          i       : longint;
          lt,rt   : tnodetype;
       begin
@@ -2522,6 +2540,11 @@ implementation
                    { this is only for add, the comparisaion is handled later }
                    expectloc:=LOC_REGISTER;
                 end
+              else if is_unicodestring(ld) then
+                begin
+                   { this is only for add, the comparisaion is handled later }
+                   expectloc:=LOC_REGISTER;
+                end
               else if is_ansistring(ld) then
                 begin
                    { this is only for add, the comparisaion is handled later }

+ 5 - 15
compiler/nbas.pas

@@ -136,7 +136,6 @@ type
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderefimpl;override;
           procedure derefimpl;override;
-          procedure derefnode;override;
           function dogetcopy: tnode; override;
           function pass_1 : tnode; override;
           function pass_typecheck: tnode; override;
@@ -153,8 +152,8 @@ type
           constructor create_offset(const temp: ttempcreatenode;aoffset:longint);
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
+          procedure resolveppuidx;override;
           function dogetcopy: tnode; override;
-          procedure derefnode;override;
           function pass_1 : tnode; override;
           function pass_typecheck : tnode; override;
           procedure mark_write;override;
@@ -176,8 +175,8 @@ type
           constructor create_normal_temp(const temp: ttempcreatenode);
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
+          procedure resolveppuidx;override;
           function dogetcopy: tnode; override;
-          procedure derefnode;override;
           function pass_1: tnode; override;
           function pass_typecheck: tnode; override;
           function docompare(p: tnode): boolean; override;
@@ -616,7 +615,7 @@ implementation
         hp : tai;
       begin
         inherited ppuwrite(ppufile);
-{$warning FIXME Add saving of register sets}
+{ TODO: FIXME Add saving of register sets}
         if not(nf_get_asm_position in flags) then
           begin
             hp:=tai(p_asm.first);
@@ -817,14 +816,6 @@ implementation
       end;
 
 
-    procedure ttempcreatenode.derefnode;
-      begin
-        inherited derefnode;
-        if assigned(tempinfo^.withnode) then
-          tempinfo^.withnode.derefnode;
-      end;
-
-
     function ttempcreatenode.pass_1 : tnode;
       begin
         result := nil;
@@ -933,11 +924,10 @@ implementation
       end;
 
 
-    procedure ttemprefnode.derefnode;
+    procedure ttemprefnode.resolveppuidx;
       var
         temp : ttempcreatenode;
       begin
-        inherited derefnode;
         temp:=ttempcreatenode(nodeppuidxget(tempidx));
         if temp.nodetype<>tempcreaten then
           internalerror(200311075);
@@ -1067,7 +1057,7 @@ implementation
       end;
 
 
-    procedure ttempdeletenode.derefnode;
+    procedure ttempdeletenode.resolveppuidx;
       var
         temp : ttempcreatenode;
       begin

+ 31 - 34
compiler/ncal.pas

@@ -121,7 +121,6 @@ interface
           destructor destroy;override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
-          procedure derefnode;override;
           procedure buildderefimpl;override;
           procedure derefimpl;override;
           function  dogetcopy : tnode;override;
@@ -604,7 +603,7 @@ implementation
                here to make the change permanent. in the overload
                choosing the changes are only made temporary }
              if (left.resultdef.typ=procvardef) and
-                (parasym.vardef.typ<>procvardef) then
+                not(parasym.vardef.typ in [procvardef,formaldef]) then
                begin
                  if maybe_call_procvar(left,true) then
                    resultdef:=left.resultdef;
@@ -975,7 +974,7 @@ implementation
         funcretnode:=ppuloadnode(ppufile);
         inherited ppuload(t,ppufile);
         ppufile.getderef(symtableprocentryderef);
-{$warning FIXME: No withsymtable support}
+{ TODO: FIXME: No withsymtable support}
         symtableproc:=nil;
         ppufile.getderef(procdefinitionderef);
         ppufile.getsmallset(callnodeflags);
@@ -995,20 +994,6 @@ implementation
       end;
 
 
-    procedure tcallnode.derefnode;
-      begin
-        if assigned(callinitblock) then
-          callinitblock.derefnode;
-        if assigned(methodpointer) then
-          methodpointer.derefnode;
-        if assigned(callcleanupblock) then
-          callcleanupblock.derefnode;
-        if assigned(funcretnode) then
-          funcretnode.derefnode;
-        inherited derefnode;
-      end;
-
-
     procedure tcallnode.buildderefimpl;
       begin
         inherited buildderefimpl;
@@ -1575,14 +1560,21 @@ implementation
                 without specifying self explicit }
               if (cnf_member_call in callnodeflags) then
                 begin
-                  { destructor: don't release instance, vmt=0
-                    constructor:
-                      if called from a constructor in the same class then
+                  { destructor (in the same class, since cnf_member_call):
+                    if not called from a destructor then
+                      call beforedestruction and release instance, vmt=1
+                    else
+                      don't release instance, vmt=0
+                    constructor (in the same class, since cnf_member_call):
+                      if called from a constructor then
                         don't call afterconstruction, vmt=0
                       else
                         call afterconstrution, vmt=1 }
                   if (procdefinition.proctypeoption=potype_destructor) then
-                    vmttree:=cpointerconstnode.create(0,voidpointertype)
+                    if (current_procinfo.procdef.proctypeoption<>potype_constructor) then
+                      vmttree:=cpointerconstnode.create(1,voidpointertype)
+                    else
+                      vmttree:=cpointerconstnode.create(0,voidpointertype)
                   else if (current_procinfo.procdef.proctypeoption=potype_constructor) and
                           (procdefinition.proctypeoption=potype_constructor) then
                     vmttree:=cpointerconstnode.create(0,voidpointertype)
@@ -1601,7 +1593,7 @@ implementation
                     if called from a constructor in the same class using self.create then
                       don't call afterconstruction, vmt=0
                     else
-                      call afterconstrution, vmt=1 }
+                      call afterconstruction, vmt=1 }
                 if (procdefinition.proctypeoption=potype_destructor) then
                   if not(cnf_create_failed in callnodeflags) then
                     vmttree:=cpointerconstnode.create(1,voidpointertype)
@@ -1705,6 +1697,15 @@ implementation
             exit;
           end;
 
+        { if the result is the same as the self parameter (in case of objects),
+          we can't optimise. We have to check this explicitly becaise
+          hidden parameters such as self have not yet been inserted at this
+          point
+        }
+        if assigned(methodpointer) and
+           realassignmenttarget.isequal(methodpointer.actualtargetnode) then
+          exit;
+
         { when we substitute a function result inside an inlined function,
           we may take the address of this function result. Therefore the
           substituted function result may not be in a register, as we cannot
@@ -1903,7 +1904,6 @@ implementation
         objectinfo : tobjectinfoitem;
         pd : tprocdef;
         i  : integer;
-        first : boolean;
       begin
         objectdf := nil;
         { verify if trying to create an instance of a class which contains
@@ -1954,17 +1954,12 @@ implementation
         if assigned(parents) then
           parents.free;
         { Finally give out a warning for each abstract method still in the list }
-        first:=true;
         for i:=0 to AbstractMethodsList.Count-1 do
           begin
             pd:=tprocdef(AbstractMethodsList[i]);
             if po_abstractmethod in pd.procoptions then
               begin
-                if first then
-                  begin
-                    Message1(type_w_instance_with_abstract,objectdf.objrealname^);
-                    first:=false;
-                  end;
+                Message2(type_w_instance_with_abstract,objectdf.objrealname^,pd.procsym.RealName);
                 MessagePos1(pd.fileinfo,sym_h_abstract_method_list,pd.fullprocname(true));
               end;
           end;
@@ -2263,6 +2258,7 @@ implementation
                               symtableprocentry.write_parameter_lists(nil);
                             end;
                         end;
+                      candidates.free;
                       goto errorexit;
                     end;
 
@@ -2364,7 +2360,7 @@ implementation
 
           { handle predefined procedures }
           is_const:=(po_internconst in procdefinition.procoptions) and
-                    ((block_type in [bt_const,bt_type]) or
+                    ((block_type in [bt_const,bt_type,bt_const_type,bt_var_type]) or
                      (assigned(left) and (tcallparanode(left).left.nodetype in [realconstn,ordconstn])));
           if (procdefinition.proccalloption=pocall_internproc) or is_const then
            begin
@@ -2769,7 +2765,7 @@ implementation
          if assigned(callcleanupblock) then
            firstpass(callcleanupblock);
 
-         if not (block_type in [bt_const,bt_type]) then
+         if not (block_type in [bt_const,bt_type,bt_const_type,bt_var_type]) then
            include(current_procinfo.flags,pi_do_call);
 
          { order parameters }
@@ -2785,7 +2781,8 @@ implementation
              else
              { ansi/widestrings must be registered, so we can dispose them }
               if is_ansistring(resultdef) or
-                 is_widestring(resultdef) then
+                 is_widestring(resultdef) or
+                 is_unicodestring(resultdef) then
                begin
                  expectloc:=LOC_REFERENCE;
                end
@@ -3040,8 +3037,8 @@ implementation
                       { call-by-reference const's may need to be passed by }
                       { reference to function called in the inlined code   }
                       (paramanager.push_addr_param(vs_const,para.parasym.vardef,procdefinition.proccalloption) and
-                       (not valid_for_addr(para.left,false) or
-                        is_constnode(para.left)))))
+                       not valid_for_addr(para.left,false))
+                     ))
                    )
                   ) then
                   begin

+ 1 - 1
compiler/ncgbas.pas

@@ -429,7 +429,7 @@ interface
         else
           begin
             location_reset(tempinfo^.location,LOC_REFERENCE,def_cgsize(tempinfo^.typedef));
-            tg.GetTemp(current_asmdata.CurrAsmList,size,tempinfo^.temptype,tempinfo^.location.reference);
+            tg.GetTemp(current_asmdata.CurrAsmList,size,tempinfo^.typedef.alignment,tempinfo^.temptype,tempinfo^.location.reference);
           end;
         include(tempinfo^.flags,ti_valid);
       end;

+ 10 - 5
compiler/ncgcal.pas

@@ -510,7 +510,9 @@ implementation
         tmpcgsize,
         cgsize    : tcgsize;
         retloc    : tlocation;
+{$ifdef cpu64bitaddr}
         ref       : treference;
+{$endif cpu64bitaddr}
 {$ifndef x86}
         hregister : tregister;
 {$endif not x86}
@@ -553,7 +555,7 @@ implementation
                     structs with up to 16 bytes are returned in registers }
                   if cgsize in [OS_128,OS_S128] then
                     begin
-                      tg.GetTemp(current_asmdata.CurrAsmList,16,tt_normal,ref);
+                      tg.GetTemp(current_asmdata.CurrAsmList,16,8,tt_normal,ref);
                       location_reset(location,LOC_REFERENCE,OS_NO);
                       location.reference:=ref;
                       cg.a_load_reg_ref(current_asmdata.CurrAsmList,OS_64,OS_64,procdefinition.funcretloc[callerside].register,ref);
@@ -873,7 +875,9 @@ implementation
 {$ifdef vtentry}
         sym : tasmsymbol;
 {$endif vtentry}
+{$ifdef x86_64}
         cgpara : tcgpara;
+{$endif x86_64}
       begin
          if not assigned(procdefinition) or
             not procdefinition.has_paraloc_info then
@@ -1014,7 +1018,7 @@ implementation
                       if (po_interrupt in procdefinition.procoptions) then
                         extra_interrupt_code;
                       extra_call_code;
-                      cg.a_call_name(current_asmdata.CurrAsmList,tprocdef(procdefinition).mangledname);
+                      cg.a_call_name(current_asmdata.CurrAsmList,tprocdef(procdefinition).mangledname,po_weakexternal in procdefinition.procoptions);
                       extra_post_call_code;
                     end;
                end;
@@ -1101,7 +1105,8 @@ implementation
            end;
 
 {$if defined(x86) or defined(arm)}
-         if procdefinition.proccalloption=pocall_safecall then
+         if (procdefinition.proccalloption=pocall_safecall) and
+            (target_info.system in system_all_windows) then
            begin
 {$ifdef x86_64}
              cgpara.init;
@@ -1110,7 +1115,7 @@ implementation
              cgpara.done;
 {$endif x86_64}
              cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-             cg.a_call_name(current_asmdata.CurrAsmList,'FPC_SAFECALLCHECK');
+             cg.a_call_name(current_asmdata.CurrAsmList,'FPC_SAFECALLCHECK',false);
              cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
            end;
 {$endif}
@@ -1148,7 +1153,7 @@ implementation
             not(po_virtualmethod in procdefinition.procoptions) then
            begin
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_IOCHECK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_IOCHECK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
            end;
       end;

+ 8 - 21
compiler/ncgcnv.pas

@@ -148,6 +148,8 @@ interface
                location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
                cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,left.location.reference,location.register);
              end;
+           cst_widestring,
+           cst_unicodestring,
            cst_ansistring :
              begin
                if tstringconstnode(left).len=0 then
@@ -159,8 +161,7 @@ interface
                 end
                else
                 begin
-                  location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
-                  cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,left.location.reference,location.register);
+                  location_copy(location,left.location);
                 end;
              end;
            cst_longstring:
@@ -168,22 +169,8 @@ interface
                {!!!!!!!}
                internalerror(8888);
              end;
-           cst_widestring:
-             begin
-               if tstringconstnode(left).len=0 then
-                begin
-                  reference_reset(hr);
-                  hr.symbol:=current_asmdata.RefAsmSymbol('FPC_EMPTYCHAR');
-                  location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
-                  cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,hr,location.register);
-                end
-               else
-                begin
-                  location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-                  cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_INT,left.location.reference,
-                    location.register);
-                end;
-             end;
+           else
+             internalerror(200808241);
          end;
       end;
 
@@ -256,7 +243,7 @@ interface
          case tstringdef(resultdef).stringtype of
            st_shortstring :
              begin
-               tg.GetTemp(current_asmdata.CurrAsmList,256,tt_normal,location.reference);
+               tg.GetTemp(current_asmdata.CurrAsmList,256,1,tt_normal,location.reference);
                cg.a_load_loc_ref(current_asmdata.CurrAsmList,left.location.size,left.location,
                  location.reference);
                location_freetemp(current_asmdata.CurrAsmList,left.location);
@@ -285,7 +272,7 @@ interface
              if (left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then
                location_force_fpureg(current_asmdata.CurrAsmList,left.location,false);
              { round them down to the proper precision }
-             tg.gettemp(current_asmdata.currasmlist,resultdef.size,tt_normal,tr);
+             tg.gettemp(current_asmdata.currasmlist,resultdef.size,resultdef.alignment,tt_normal,tr);
              cg.a_loadfpu_reg_ref(current_asmdata.CurrAsmList,left.location.size,location.size,left.location.register,tr);
              location_reset(left.location,LOC_REFERENCE,location.size);
              left.location.reference:=tr;
@@ -381,7 +368,7 @@ interface
     var r:Treference;
 
     begin
-      tg.gettemp(current_asmdata.currasmlist,2*sizeof(puint),tt_normal,r);
+      tg.gettemp(current_asmdata.currasmlist,2*sizeof(puint),sizeof(puint),tt_normal,r);
       location_reset(location,LOC_REFERENCE,OS_NO);
       location.reference:=r;
       cg.a_load_const_ref(current_asmdata.currasmlist,OS_ADDR,0,r);

+ 60 - 147
compiler/ncgcon.pas

@@ -71,7 +71,7 @@ implementation
       symconst,symdef,aasmbase,aasmtai,aasmdata,aasmcpu,defutil,
       cpuinfo,cpubase,
       cgbase,cgobj,cgutils,
-      ncgutil
+      ncgutil, cclasses
       ;
 
 
@@ -262,179 +262,79 @@ implementation
 
     procedure tcgstringconstnode.pass_generate_code;
       var
-         hp1,hp2 : tai;
          l1,
          lastlabel   : tasmlabel;
-         lastlabelhp : tai;
          pc       : pchar;
-         same_string : boolean;
-         l,j,
-         i,mylength  : longint;
+         l,i : longint;
+         href: treference;
+         pooltype: TConstPoolType;
+         pool: THashSet;
+         entry: PHashSetItem;
+
+      const
+        PoolMap: array[tconststringtype] of TConstPoolType = (
+          sp_conststr,
+          sp_shortstr,
+          sp_longstr,
+          sp_ansistr,
+          sp_widestr,
+          sp_unicodestr
+        );
       begin
          { for empty ansistrings we could return a constant 0 }
-         if (cst_type in [cst_ansistring,cst_widestring]) and (len=0) then
+         if (cst_type in [cst_ansistring,cst_widestring,cst_unicodestring]) and (len=0) then
           begin
             location_reset(location,LOC_CONSTANT,OS_ADDR);
             location.value:=0;
             exit;
           end;
-         { return a constant reference in memory }
-         location_reset(location,LOC_CREFERENCE,def_cgsize(resultdef));
          { const already used ? }
-         lastlabel:=nil;
-         lastlabelhp:=nil;
          if not assigned(lab_str) then
            begin
-              if is_shortstring(resultdef) then
-                mylength:=len+2
+              pooltype := PoolMap[cst_type];
+              if current_asmdata.ConstPools[pooltype] = nil then
+                current_asmdata.ConstPools[pooltype] := THashSet.Create(64, True, False);
+              pool := current_asmdata.ConstPools[pooltype];
+
+              if cst_type in [cst_widestring, cst_unicodestring] then
+                entry := pool.FindOrAdd(pcompilerwidestring(value_str)^.data, len*cwidechartype.size)
               else
-                mylength:=len+1;
-              { widestrings can't be reused yet }
-              if not(is_widestring(resultdef)) then
-                begin
-                  { tries to find an old entry }
-                  hp1:=tai(current_asmdata.asmlists[al_typedconsts].first);
-                  while assigned(hp1) do
-                    begin
-                       if hp1.typ=ait_label then
-                         begin
-                           lastlabel:=tai_label(hp1).labsym;
-                           lastlabelhp:=hp1;
-                         end
-                       else
-                         begin
-                            same_string:=false;
-                            if (hp1.typ=ait_string) and
-                               (lastlabel<>nil) and
-                               (tai_string(hp1).len=mylength) then
-                              begin
-                                 case cst_type of
-                                   cst_conststring:
-                                     begin
-                                       j:=0;
-                                       same_string:=true;
-                                       if len>0 then
-                                         begin
-                                           for i:=0 to len-1 do
-                                             begin
-                                               if tai_string(hp1).str[j]<>value_str[i] then
-                                                 begin
-                                                   same_string:=false;
-                                                   break;
-                                                 end;
-                                               inc(j);
-                                             end;
-                                         end;
-                                     end;
-                                   cst_shortstring:
-                                     begin
-                                       { if shortstring then check the length byte first and
-                                         set the start index to 1 }
-                                       if len=ord(tai_string(hp1).str[0]) then
-                                         begin
-                                           j:=1;
-                                           same_string:=true;
-                                           if len>0 then
-                                             begin
-                                               for i:=0 to len-1 do
-                                                begin
-                                                  if tai_string(hp1).str[j]<>value_str[i] then
-                                                   begin
-                                                     same_string:=false;
-                                                     break;
-                                                   end;
-                                                  inc(j);
-                                                end;
-                                             end;
-                                         end;
-                                     end;
-                                   cst_ansistring,
-                                   cst_widestring :
-                                     begin
-                                       { before the string the following sequence must be found:
-                                         <label>
-                                           constsymbol <datalabel>
-                                           constint -1
-                                           constint <len>
-                                         we must then return <label> to reuse
-                                       }
-                                       hp2:=tai(lastlabelhp.previous);
-                                       if assigned(hp2) and
-                                          (hp2.typ=ait_const) and
-                                          (tai_const(hp2).consttype=aitconst_aint) and
-                                          (tai_const(hp2).value=len) and
-                                          assigned(hp2.previous) and
-                                          (tai(hp2.previous).typ=ait_const) and
-                                          (tai_const(hp2.previous).consttype=aitconst_aint) and
-                                          (tai_const(hp2.previous).value=-1) and
-                                          assigned(hp2.previous.previous) and
-                                          (tai(hp2.previous.previous).typ=ait_const) and
-                                          (tai_const(hp2.previous.previous).consttype=aitconst_ptr) and
-                                          assigned(hp2.previous.previous.previous) and
-                                          (tai(hp2.previous.previous.previous).typ=ait_label) then
-                                         begin
-                                           lastlabel:=tai_label(hp2.previous.previous.previous).labsym;
-                                           same_string:=true;
-                                           j:=0;
-                                           if len>0 then
-                                             begin
-                                               for i:=0 to len-1 do
-                                                begin
-                                                  if tai_string(hp1).str[j]<>value_str[i] then
-                                                   begin
-                                                     same_string:=false;
-                                                     break;
-                                                   end;
-                                                  inc(j);
-                                                end;
-                                             end;
-                                         end;
-                                     end;
-                                 end;
-                                 { found ? }
-                                 if same_string then
-                                   begin
-                                     lab_str:=lastlabel;
-                                     break;
-                                   end;
-                              end;
-                            lastlabel:=nil;
-                         end;
-                       hp1:=tai(hp1.next);
-                    end;
-                end;
+                entry := pool.FindOrAdd(value_str, len);
+
+              lab_str := TAsmLabel(entry^.Data);  // is it needed anymore?
+
               { :-(, we must generate a new entry }
-              if not assigned(lab_str) then
+              if not assigned(entry^.Data) then
                 begin
                    current_asmdata.getdatalabel(lastlabel);
                    lab_str:=lastlabel;
+                   entry^.Data := lastlabel;
                    maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
                    if (len=0) or
-                      not(cst_type in [cst_ansistring,cst_widestring]) then
+                      not(cst_type in [cst_ansistring,cst_widestring,cst_unicodestring]) then
                      new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,lastlabel.name,const_align(sizeof(pint)))
                    else
                      new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata,lastlabel.name,const_align(sizeof(pint)));
-                   current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
                    { generate an ansi string ? }
                    case cst_type of
                       cst_ansistring:
                         begin
-                           { an empty ansi string is nil! }
                            if len=0 then
-                             current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_sym(nil))
+                             InternalError(2008032301)   { empty string should be handled above }
                            else
                              begin
                                 current_asmdata.getdatalabel(l1);
-                                current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_sym(l1));
+                                current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
                                 current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(-1));
                                 current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(len));
+
                                 { make sure the string doesn't get dead stripped if the header is referenced }
                                 if (target_info.system in systems_darwin) then
-                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
-                                current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
+                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lastlabel.name));
+                                current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
                                 { ... and vice versa }
                                 if (target_info.system in systems_darwin) then
-                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lab_str.name));
+                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
                                 { include also terminating zero }
                                 getmem(pc,len+1);
                                 move(value_str^,pc^,len);
@@ -442,33 +342,33 @@ implementation
                                 current_asmdata.asmlists[al_typedconsts].concat(Tai_string.Create_pchar(pc,len+1));
                              end;
                         end;
+                      cst_unicodestring,
                       cst_widestring:
                         begin
-                           { an empty wide string is nil! }
                            if len=0 then
-                             current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_sym(nil))
+                             InternalError(2008032302)   { empty string should be handled above }
                            else
                              begin
                                 current_asmdata.getdatalabel(l1);
-                                current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_sym(l1));
-
+                                current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
                                 { we use always UTF-16 coding for constants }
                                 { at least for now                          }
                                 { Consts.concat(Tai_const.Create_8bit(2)); }
-                                if tf_winlikewidestring in target_info.flags then
+                                if (cst_type=cst_widestring) and (tf_winlikewidestring in target_info.flags) then
                                   current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit(len*cwidechartype.size))
                                 else
                                   begin
                                     current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(-1));
                                     current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(len*cwidechartype.size));
                                   end;
+
                                 { make sure the string doesn't get dead stripped if the header is referenced }
                                 if (target_info.system in systems_darwin) then
-                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
-                                current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
+                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lastlabel.name));
+                                current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
                                 { ... and vice versa }
                                 if (target_info.system in systems_darwin) then
-                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lab_str.name));
+                                  current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
                                 for i:=0 to len-1 do
                                   current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_16bit(pcompilerwidestring(value_str)^.data[i]));
                                 { terminating zero }
@@ -477,6 +377,7 @@ implementation
                         end;
                       cst_shortstring:
                         begin
+                          current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
                           { truncate strings larger than 255 chars }
                           if len>255 then
                            l:=255
@@ -491,6 +392,7 @@ implementation
                         end;
                       cst_conststring:
                         begin
+                          current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
                           { include terminating zero }
                           getmem(pc,len+1);
                           move(value_str^,pc[0],len);
@@ -500,7 +402,18 @@ implementation
                    end;
                 end;
            end;
-         location.reference.symbol:=lab_str;
+         if cst_type in [cst_ansistring, cst_widestring, cst_unicodestring] then
+           begin
+             location_reset(location, LOC_REGISTER, OS_ADDR);
+             reference_reset_symbol(href, lab_str, 0);
+             location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
+             cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,href,location.register);
+           end
+         else
+           begin
+             location_reset(location, LOC_CREFERENCE, def_cgsize(resultdef));
+             location.reference.symbol:=lab_str;
+           end;
       end;
 
 
@@ -548,7 +461,7 @@ implementation
         var
            hp1         : tai;
            lastlabel   : tasmlabel;
-           i, diff     : longint;
+           i           : longint;
            neededtyp   : taiconst_type;
         begin
           location_reset(location,LOC_CREFERENCE,OS_NO);

+ 30 - 27
compiler/ncgflw.pas

@@ -977,14 +977,14 @@ implementation
               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc2);
               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc3);
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RAISEEXCEPTION');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RAISEEXCEPTION',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
            end
          else
            begin
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
            end;
          paraloc1.done;
@@ -1008,7 +1008,7 @@ implementation
         paraloc1 : tcgpara;
       begin
          cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPOBJECTSTACK');
+         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPOBJECTSTACK',false);
          cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
          paraloc1.init;
          paramanager.getintparaloc(pocall_default,1,paraloc1);
@@ -1016,7 +1016,7 @@ implementation
          cg.a_param_reg(current_asmdata.CurrAsmList,OS_ADDR,NR_FUNCTION_RESULT_REG,paraloc1);
          paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
          cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION');
+         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION',false);
          cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
          paraloc1.done;
       end;
@@ -1130,7 +1130,7 @@ implementation
               cg.a_param_const(current_asmdata.CurrAsmList,OS_ADDR,-1,paraloc1);
               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CATCHES');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CATCHES',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               paraloc1.done;
 
@@ -1152,7 +1152,7 @@ implementation
               free_exception(current_asmdata.CurrAsmList,destroytemps,0,doobjectdestroy,false);
 
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPSECONDOBJECTSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPSECONDOBJECTSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
 
               paraloc1.init;
@@ -1161,12 +1161,12 @@ implementation
               cg.a_param_reg(current_asmdata.CurrAsmList, OS_ADDR, NR_FUNCTION_RESULT_REG, paraloc1);
               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               paraloc1.done;
               { we don't need to restore esi here because reraise never }
               { returns                                                 }
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
 
               cg.a_label(current_asmdata.CurrAsmList,doobjectdestroy);
               cleanupobjectstack;
@@ -1175,7 +1175,7 @@ implementation
            end
          else
            begin
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
               exceptflowcontrol:=flowcontrol;
            end;
 
@@ -1186,7 +1186,7 @@ implementation
               { we must also destroy the address frame which guards }
               { exception object                                    }
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               cg.g_exception_reason_load(current_asmdata.CurrAsmList,excepttemps.reasonbuf);
               cleanupobjectstack;
@@ -1199,7 +1199,7 @@ implementation
               { we must also destroy the address frame which guards }
               { exception object                                    }
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               cg.g_exception_reason_load(current_asmdata.CurrAsmList,excepttemps.reasonbuf);
               cleanupobjectstack;
@@ -1212,7 +1212,7 @@ implementation
               { we must also destroy the address frame which guards }
               { exception object                                    }
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               cg.g_exception_reason_load(current_asmdata.CurrAsmList,excepttemps.reasonbuf);
               cleanupobjectstack;
@@ -1224,7 +1224,7 @@ implementation
               { do some magic for exit in the try block }
               cg.a_label(current_asmdata.CurrAsmList,exittrylabel);
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               cg.g_exception_reason_load(current_asmdata.CurrAsmList,excepttemps.reasonbuf);
               cg.a_jmp_always(current_asmdata.CurrAsmList,oldCurrExitLabel);
@@ -1234,7 +1234,7 @@ implementation
            begin
               cg.a_label(current_asmdata.CurrAsmList,breaktrylabel);
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               cg.g_exception_reason_load(current_asmdata.CurrAsmList,excepttemps.reasonbuf);
               cg.a_jmp_always(current_asmdata.CurrAsmList,oldBreakLabel);
@@ -1244,7 +1244,7 @@ implementation
            begin
               cg.a_label(current_asmdata.CurrAsmList,continuetrylabel);
               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK');
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               cg.g_exception_reason_load(current_asmdata.CurrAsmList,excepttemps.reasonbuf);
               cg.a_jmp_always(current_asmdata.CurrAsmList,oldContinueLabel);
@@ -1302,7 +1302,7 @@ implementation
          cg.a_paramaddr_ref(current_asmdata.CurrAsmList,href2,paraloc1);
          paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
          cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CATCHES');
+         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CATCHES',false);
          cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
 
          { is it this catch? No. go to next onlabel }
@@ -1323,7 +1323,7 @@ implementation
            end
          else
            begin
-             tg.GetTemp(current_asmdata.CurrAsmList,sizeof(pint),tt_normal,exceptref);
+             tg.GetTemp(current_asmdata.CurrAsmList,sizeof(pint),sizeof(pint),tt_normal,exceptref);
              cg.a_load_reg_ref(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,NR_FUNCTION_RESULT_REG,exceptref);
            end;
 
@@ -1360,18 +1360,18 @@ implementation
          free_exception(current_asmdata.CurrAsmList,excepttemps,0,doobjectdestroy,false);
 
          cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPSECONDOBJECTSTACK');
+         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPSECONDOBJECTSTACK',false);
          cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
          paramanager.getintparaloc(pocall_default,1,paraloc1);
          paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc1);
          cg.a_param_reg(current_asmdata.CurrAsmList, OS_ADDR, NR_FUNCTION_RESULT_REG, paraloc1);
          paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
          cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION');
+         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION',false);
          cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
          { we don't need to store/restore registers here because reraise never
            returns                                                             }
-         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE');
+         cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
 
          cg.a_label(current_asmdata.CurrAsmList,doobjectdestroy);
          cleanupobjectstack;
@@ -1501,7 +1501,9 @@ implementation
          { finally code }
          flowcontrol:=[fc_inflowcontrol];
          secondpass(right);
-         if flowcontrol<>[fc_inflowcontrol] then
+         { goto is allowed if it stays inside the finally block,
+           this is checked using the exception block number }
+         if (flowcontrol-[fc_gotolabel])<>[fc_inflowcontrol] then
            CGMessage(cg_e_control_flow_outside_finally);
          if codegenerror then
            exit;
@@ -1519,18 +1521,19 @@ implementation
              if codegenerror then
                exit;
 {$if defined(x86) or defined(arm)}
-             if current_procinfo.procdef.proccalloption=pocall_safecall then
+             if (target_info.system in system_all_windows) and
+                (current_procinfo.procdef.proccalloption=pocall_safecall) then
                begin
                  { Remove and destroy the last exception object }
-                 cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPOBJECTSTACK');
-                 cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION');
+                 cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPOBJECTSTACK',false);
+                 cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DESTROYEXCEPTION',false);
                  { Set return value of safecall procedure to indicate exception.       }
                  { Exception will be raised after procedure exit based on return value }
                  cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_ADDR,aint($8000FFFF),NR_FUNCTION_RETURN_REG);
                end
              else
 {$endif}
-               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE');
+               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
            end
          else
            begin
@@ -1559,7 +1562,7 @@ implementation
                   cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_EQ,0,NR_FUNCTION_RESULT_REG,oldContinueLabel);
                end;
              cg.a_label(current_asmdata.CurrAsmList,reraiselabel);
-             cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE');
+             cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
              { do some magic for exit,break,continue in the try block }
              if fc_exit in tryflowcontrol then
                begin

+ 76 - 22
compiler/ncginl.pas

@@ -54,6 +54,7 @@ interface
           procedure second_round_real; virtual;
           procedure second_trunc_real; virtual;
           procedure second_abs_long; virtual;
+          procedure second_rox; virtual;
        end;
 
 implementation
@@ -161,6 +162,11 @@ implementation
                    end;
               end;
 {$endif SUPPORT_MMX}
+            in_rol_x,
+            in_rol_x_x,
+            in_ror_x,
+            in_ror_x_x:
+              second_rox;
             else internalerror(9);
          end;
       end;
@@ -225,7 +231,7 @@ implementation
        paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc3);
        paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc4);
        cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-       cg.a_call_name(current_asmdata.CurrAsmList,'FPC_ASSERT');
+       cg.a_call_name(current_asmdata.CurrAsmList,'FPC_ASSERT',false);
        cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
        location_freetemp(current_asmdata.CurrAsmList,hp3.location);
        location_freetemp(current_asmdata.CurrAsmList,hp2.location);
@@ -352,7 +358,7 @@ implementation
                hregister:=cg.makeregsize(current_asmdata.CurrAsmList,left.location.register,OS_INT);
                cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,href,hregister);
              end;
-           if is_widestring(left.resultdef) then
+           if is_widestring(left.resultdef) or is_unicodestring(left.resultdef) then
              cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHR,OS_INT,1,hregister);
            cg.a_label(current_asmdata.CurrAsmList,lengthlab);
            location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
@@ -438,6 +444,8 @@ implementation
               { when constant, just multiply the addvalue }
               if is_constintnode(tcallparanode(tcallparanode(left).right).left) then
                  addvalue:=addvalue*get_ordinal_value(tcallparanode(tcallparanode(left).right).left)
+              else if is_constpointernode(tcallparanode(tcallparanode(left).right).left) then
+                 addvalue:=addvalue*tpointerconstnode(tcallparanode(tcallparanode(left).right).left).value
               else
                 begin
                   location_force_reg(current_asmdata.CurrAsmList,tcallparanode(tcallparanode(left).right).left.location,cgsize,addvalue<=1);
@@ -689,29 +697,75 @@ implementation
     end;
 
     procedure Tcginlinenode.second_get_caller_addr;
+      var
+        frame_ref:Treference;
+      begin
+        if current_procinfo.framepointer=NR_STACK_POINTER_REG then
+          begin
+            location_reset(location,LOC_REGISTER,OS_ADDR);
+            location.register:=cg.getaddressregister(current_asmdata.currasmlist);
+            reference_reset_base(frame_ref,NR_STACK_POINTER_REG,{current_procinfo.calc_stackframe_size}tg.lasttemp);
+            cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
+          end
+        else
+          begin
+            location_reset(location,LOC_REGISTER,OS_ADDR);
+            location.register:=cg.getaddressregister(current_asmdata.currasmlist);
+          {$ifdef cpu64bitaddr}
+            reference_reset_base(frame_ref,current_procinfo.framepointer,8);
+          {$else}
+            reference_reset_base(frame_ref,current_procinfo.framepointer,4);
+          {$endif}
+            cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
+          end;
+      end;
 
-    var frame_ref:Treference;
 
-    begin
-      if current_procinfo.framepointer=NR_STACK_POINTER_REG then
-        begin
-          location_reset(location,LOC_REGISTER,OS_ADDR);
-          location.register:=cg.getaddressregister(current_asmdata.currasmlist);
-          reference_reset_base(frame_ref,NR_STACK_POINTER_REG,{current_procinfo.calc_stackframe_size}tg.lasttemp);
-          cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
-        end
-      else
-        begin
-          location_reset(location,LOC_REGISTER,OS_ADDR);
-          location.register:=cg.getaddressregister(current_asmdata.currasmlist);
-        {$ifdef cpu64bitaddr}
-          reference_reset_base(frame_ref,current_procinfo.framepointer,8);
-        {$else}
-          reference_reset_base(frame_ref,current_procinfo.framepointer,4);
-        {$endif}
-          cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
+    procedure tcginlinenode.second_rox;
+      var
+        op : topcg;
+        {hcountreg : tregister;}
+        op1,op2 : tnode;
+      begin
+        { one or two parameters? }
+        if assigned(tcallparanode(left).right) then
+          begin
+            op1:=tcallparanode(tcallparanode(left).right).left;
+            op2:=tcallparanode(left).left;
+          end
+        else
+          op1:=left;
+
+        secondpass(op1);
+        { load left operator in a register }
+        location_copy(location,op1.location);
+        case inlinenumber of
+          in_ror_x,
+          in_ror_x_x:
+            op:=OP_ROR;
+          in_rol_x,
+          in_rol_x_x:
+            op:=OP_ROL;
         end;
-    end;
+        location_force_reg(current_asmdata.CurrAsmList,location,location.size,false);
+
+        if assigned(tcallparanode(left).right) then
+          begin
+             secondpass(op2);
+             { rotating by a constant directly coded: }
+             if op2.nodetype=ordconstn then
+               cg.a_op_const_reg(current_asmdata.CurrAsmList,op,location.size,
+                 tordconstnode(op2).value.uvalue and (resultdef.size*8-1),location.register)
+             else
+               begin
+                 location_force_reg(current_asmdata.CurrAsmList,op2.location,location.size,false);
+                 { do modulo 2 operation }
+                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,op,location.size,op2.location.register,location.register);
+               end;
+          end
+        else
+          cg.a_op_const_reg(current_asmdata.CurrAsmList,op,location.size,1,location.register);
+      end;
 
 begin
    cinlinenode:=tcginlinenode;

+ 61 - 29
compiler/ncgld.pas

@@ -270,7 +270,8 @@ implementation
                 gvs:=tstaticvarsym(symtableentry);
                 if ([vo_is_dll_var,vo_is_external] * gvs.varoptions <> []) then
                   begin
-                    location.reference.base := cg.g_indirect_sym_load(current_asmdata.CurrAsmList,tstaticvarsym(symtableentry).mangledname);
+                    location.reference.base := cg.g_indirect_sym_load(current_asmdata.CurrAsmList,tstaticvarsym(symtableentry).mangledname,
+                      vo_is_weak_external in gvs.varoptions);
                     if (location.reference.base <> NR_NO) then
                       exit;
                   end;
@@ -279,7 +280,10 @@ implementation
                 { DLL variable }
                   begin
                     hregister:=cg.getaddressregister(current_asmdata.CurrAsmList);
-                    location.reference.symbol:=current_asmdata.RefAsmSymbol(tstaticvarsym(symtableentry).mangledname);
+                    if not(vo_is_weak_external in gvs.varoptions) then
+                      location.reference.symbol:=current_asmdata.RefAsmSymbol(tstaticvarsym(symtableentry).mangledname)
+                    else
+                      location.reference.symbol:=current_asmdata.WeakRefAsmSymbol(tstaticvarsym(symtableentry).mangledname);
                     cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,location.reference,hregister);
                     reference_reset_base(location.reference,hregister,0);
                   end
@@ -290,7 +294,10 @@ implementation
                      if (tf_section_threadvars in target_info.flags) then
                        begin
                          if gvs.localloc.loc=LOC_INVALID then
-                           reference_reset_symbol(location.reference,current_asmdata.RefAsmSymbol(gvs.mangledname),0)
+                           if not(vo_is_weak_external in gvs.varoptions) then
+                             reference_reset_symbol(location.reference,current_asmdata.RefAsmSymbol(gvs.mangledname),0)
+                           else
+                             reference_reset_symbol(location.reference,current_asmdata.WeakRefAsmSymbol(gvs.mangledname),0)
                          else
                            location:=gvs.localloc;
 {$ifdef i386}
@@ -324,7 +331,10 @@ implementation
                          cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,hregister);
                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_ADDR,OC_EQ,0,hregister,norelocatelab);
                          { don't save the allocated register else the result will be destroyed later }
-                         reference_reset_symbol(href,current_asmdata.RefAsmSymbol(tstaticvarsym(symtableentry).mangledname),0);
+                         if not(vo_is_weak_external in gvs.varoptions) then
+                           reference_reset_symbol(href,current_asmdata.RefAsmSymbol(gvs.mangledname),0)
+                         else
+                           reference_reset_symbol(href,current_asmdata.WeakRefAsmSymbol(gvs.mangledname),0);
                          paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc1);
                          cg.a_param_ref(current_asmdata.CurrAsmList,OS_32,href,paraloc1);
                          paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
@@ -342,7 +352,10 @@ implementation
                            layout of a threadvar is (4 bytes pointer):
                              0 - Threadvar index
                              4 - Threadvar value in single threading }
-                         reference_reset_symbol(href,current_asmdata.RefAsmSymbol(tstaticvarsym(symtableentry).mangledname),sizeof(pint));
+                         if not(vo_is_weak_external in gvs.varoptions) then
+                           reference_reset_symbol(href,current_asmdata.RefAsmSymbol(gvs.mangledname),sizeof(pint))
+                         else
+                           reference_reset_symbol(href,current_asmdata.WeakRefAsmSymbol(gvs.mangledname),sizeof(pint));
                          cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,href,hregister);
                          cg.a_label(current_asmdata.CurrAsmList,endrelocatelab);
                          location.reference.base:=hregister;
@@ -352,7 +365,10 @@ implementation
                  else
                    begin
                      if gvs.localloc.loc=LOC_INVALID then
-                       reference_reset_symbol(location.reference,current_asmdata.RefAsmSymbol(gvs.mangledname),0)
+                       if not(vo_is_weak_external in gvs.varoptions) then
+                         reference_reset_symbol(location.reference,current_asmdata.RefAsmSymbol(gvs.mangledname),0)
+                       else
+                         reference_reset_symbol(location.reference,current_asmdata.WeakRefAsmSymbol(gvs.mangledname),0)
                      else
                        location:=gvs.localloc;
                    end;
@@ -409,13 +425,14 @@ implementation
                     internalerror(200312011);
                   if assigned(left) then
                     begin
-                      if (sizeof(pint) = 4) then
-                         location_reset(location,LOC_CREFERENCE,OS_64)
-                      else if (sizeof(pint) = 8) then
-                         location_reset(location,LOC_CREFERENCE,OS_128)
-                      else
+                      {$if sizeof(pint) = 4}
+                         location_reset(location,LOC_CREFERENCE,OS_64);
+                      {$else} {$if sizeof(pint) = 8}
+                         location_reset(location,LOC_CREFERENCE,OS_128);
+                      {$else}
                          internalerror(20020520);
-                      tg.GetTemp(current_asmdata.CurrAsmList,2*sizeof(pint),tt_normal,location.reference);
+                      {$endif} {$endif}
+                      tg.GetTemp(current_asmdata.CurrAsmList,2*sizeof(pint),sizeof(pint),tt_normal,location.reference);
                       secondpass(left);
 
                       { load class instance/classrefdef address }
@@ -481,14 +498,22 @@ implementation
                     begin
                        pd:=tprocdef(tprocsym(symtableentry).ProcdefList[0]);
                        if (po_external in pd.procoptions) then
-                         location.reference.base := cg.g_indirect_sym_load(current_asmdata.CurrAsmList,pd.mangledname);
+                         location.reference.base :=
+                            cg.g_indirect_sym_load(current_asmdata.CurrAsmList,pd.mangledname,
+                                                   po_weakexternal in pd.procoptions);
                        {!!!!! Be aware, work on virtual methods too }
                        if (location.reference.base = NR_NO) then
-                         location.reference.symbol:=current_asmdata.RefAsmSymbol(procdef.mangledname);
+                         if not(po_weakexternal in pd.procoptions) then
+                           location.reference.symbol:=current_asmdata.RefAsmSymbol(procdef.mangledname)
+                         else
+                           location.reference.symbol:=current_asmdata.WeakRefAsmSymbol(procdef.mangledname);
                     end;
                end;
             labelsym :
-              location.reference.symbol:=tcglabelnode((tlabelsym(symtableentry).code)).getasmlabel;
+              if assigned(tlabelsym(symtableentry).asmblocklabel) then
+                location.reference.symbol:=tlabelsym(symtableentry).asmblocklabel
+              else
+                location.reference.symbol:=tcglabelnode((tlabelsym(symtableentry).code)).getasmlabel;
             else internalerror(200510032);
          end;
       end;
@@ -710,7 +735,7 @@ implementation
                           end
                         else
                           begin
-{$warning HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler}
+{ TODO: HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler}
                             { Use unaligned copy when the offset is not aligned }
                             len:=left.resultdef.size;
                             if (right.location.reference.offset mod sizeof(aint)<>0) or
@@ -735,7 +760,7 @@ implementation
                             { convert an extended into a double/single, since sse   }
                             { doesn't support extended)                             }
                             r:=cg.getfpuregister(current_asmdata.CurrAsmList,right.location.size);
-                            tg.gettemp(current_asmdata.CurrAsmList,left.resultdef.size,tt_normal,href);
+                            tg.gettemp(current_asmdata.CurrAsmList,left.resultdef.size,left.resultdef.alignment,tt_normal,href);
                             cg.a_loadfpu_ref_reg(current_asmdata.CurrAsmList,right.location.size,right.location.size,right.location.reference,r);
                             cg.a_loadfpu_reg_ref(current_asmdata.CurrAsmList,right.location.size,left.location.size,r,href);
                             if releaseright then
@@ -812,7 +837,7 @@ implementation
                         begin
                           { perform size conversion if needed (the mm-code cannot convert an   }
                           { extended into a double/single, since sse doesn't support extended) }
-                          tg.gettemp(current_asmdata.CurrAsmList,left.resultdef.size,tt_normal,href);
+                          tg.gettemp(current_asmdata.CurrAsmList,left.resultdef.size,left.resultdef.alignment,tt_normal,href);
                           cg.a_loadfpu_reg_ref(current_asmdata.CurrAsmList,right.location.size,left.location.size,right.location.register,href);
                           location_reset(right.location,LOC_REFERENCE,left.location.size);
                           right.location.reference:=href;
@@ -929,31 +954,38 @@ implementation
         hp    : tarrayconstructornode;
         href  : treference;
         lt    : tdef;
-        vaddr : boolean;
-        vtype : longint;
-        freetemp,
-        dovariant : boolean;
-        elesize : longint;
-        tmpreg  : tregister;
         paraloc : tcgparalocation;
         otlabel,
         oflabel : tasmlabel;
+        vtype : longint;
+        elesize,
+        elealign : longint;
+        tmpreg  : tregister;
+        vaddr : boolean;
+        freetemp,
+        dovariant : boolean;
       begin
         if is_packed_array(resultdef) then
           internalerror(200608042);
         dovariant:=(nf_forcevaria in flags) or is_variant_array(resultdef);
         if dovariant then
-          elesize:=sizeof(pint)+sizeof(pint)
+          begin
+            elesize:=sizeof(pint)+sizeof(pint);
+            elealign:=sizeof(pint);
+          end
         else
-          elesize:=tarraydef(resultdef).elesize;
+          begin
+            elesize:=tarraydef(resultdef).elesize;
+            elealign:=tarraydef(resultdef).elementdef.alignment;
+          end;
         location_reset(location,LOC_CREFERENCE,OS_NO);
         fillchar(paraloc,sizeof(paraloc),0);
         { Allocate always a temp, also if no elements are required, to
           be sure that location is valid (PFV) }
          if tarraydef(resultdef).highrange=-1 then
-           tg.GetTemp(current_asmdata.CurrAsmList,elesize,tt_normal,location.reference)
+           tg.GetTemp(current_asmdata.CurrAsmList,elesize,elealign,tt_normal,location.reference)
          else
-           tg.GetTemp(current_asmdata.CurrAsmList,(tarraydef(resultdef).highrange+1)*elesize,tt_normal,location.reference);
+           tg.GetTemp(current_asmdata.CurrAsmList,(tarraydef(resultdef).highrange+1)*elesize,resultdef.alignment,tt_normal,location.reference);
          href:=location.reference;
         { Process nodes in array constructor }
         hp:=self;
@@ -1072,7 +1104,7 @@ implementation
                            freetemp:=false;
                          end
                        else
-                        if is_widestring(lt) then
+                        if is_widestring(lt) or is_unicodestring(lt) then
                          begin
                            vtype:=vtWideString;
                            freetemp:=false;

+ 4 - 4
compiler/ncgmat.pas

@@ -149,7 +149,7 @@ implementation
         { get a temporary memory reference to store the floating
           point value
         }
-        tg.gettemp(current_asmdata.CurrAsmList,tcgsize2size[_size],tt_normal,href);
+        tg.gettemp(current_asmdata.CurrAsmList,tcgsize2size[_size],tcgsize2size[_size],tt_normal,href);
         { store the floating point value in the temporary memory area }
         cg.a_loadfpu_reg_ref(current_asmdata.CurrAsmList,_size,_size,r,href);
         { only single and double ieee are supported, for little endian
@@ -193,7 +193,7 @@ implementation
               location.register64.reglo,tr);
             current_asmdata.getjumplabel(hl);
             cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_NE,0,tr,hl);
-            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW');
+            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
             cg.a_label(current_asmdata.CurrAsmList,hl);
           end;
       end;
@@ -244,7 +244,7 @@ implementation
           begin
             current_asmdata.getjumplabel(hl);
             cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_SINT,OC_NE,low(aint),location.register,hl);
-            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW');
+            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
             cg.a_label(current_asmdata.CurrAsmList,hl);
           end;
       end;
@@ -371,7 +371,7 @@ implementation
                   paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc1);
                   cg.a_param_const(current_asmdata.CurrAsmList,OS_S32,200,paraloc1);
                   paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
-                  cg.a_call_name(current_asmdata.CurrAsmList,'FPC_HANDLEERROR');
+                  cg.a_call_name(current_asmdata.CurrAsmList,'FPC_HANDLEERROR',false);
                   paraloc1.done;
                   cg.a_label(current_asmdata.CurrAsmList,hl);
                   if nodetype = modn then

+ 46 - 37
compiler/ncgmem.pas

@@ -56,18 +56,18 @@ interface
        end;
 
        tcgvecnode = class(tvecnode)
+         function get_mul_size : aint;
        private
          procedure rangecheck_array;
        protected
-         function get_mul_size : aint;
          {# This routine is used to calculate the address of the reference.
             On entry reg contains the index in the array,
            and l contains the size of each element in the array.
            This routine should update location.reference correctly,
            so it points to the correct address.
          }
-         procedure update_reference_reg_mul(reg:tregister;l:aint);virtual;
-         procedure update_reference_reg_packed(reg:tregister;l:aint);virtual;
+         procedure update_reference_reg_mul(maybe_const_reg:tregister;l:aint);virtual;
+         procedure update_reference_reg_packed(maybe_const_reg:tregister;l:aint);virtual;
          procedure second_wideansistring;virtual;
          procedure second_dynamicarray;virtual;
        public
@@ -228,7 +228,7 @@ implementation
             paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
             paraloc1.done;
             cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CHECKPOINTER');
+            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CHECKPOINTER',false);
             cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
           end;
       end;
@@ -283,7 +283,7 @@ implementation
                 cg.a_param_reg(current_asmdata.CurrAsmList, OS_ADDR,location.reference.base,paraloc1);
                 paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
                 cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-                cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CHECKPOINTER');
+                cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CHECKPOINTER',false);
                 cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               end;
            end
@@ -302,7 +302,7 @@ implementation
                 cg.a_param_reg(current_asmdata.CurrAsmList, OS_ADDR,location.reference.base,paraloc1);
                 paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
                 cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-                cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CHECKPOINTER');
+                cg.a_call_name(current_asmdata.CurrAsmList,'FPC_CHECKPOINTER',false);
                 cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
               end;
            end
@@ -453,39 +453,44 @@ implementation
        end;
 
 
-     procedure tcgvecnode.update_reference_reg_mul(reg:tregister;l:aint);
+     { this routine must, like any other routine, not change the contents }
+     { of base/index registers of references, as these may be regvars.    }
+     { The register allocator can coalesce one LOC_REGISTER being moved   }
+     { into another (as their live ranges won't overlap), but not a       }
+     { LOC_CREGISTER moved into a LOC_(C)REGISTER most of the time (as    }
+     { the live range of the LOC_CREGISTER will most likely overlap the   }
+     { the live range of the target LOC_(C)REGISTER)                      }
+     { The passed register may be a LOC_CREGISTER as well.                }
+     procedure tcgvecnode.update_reference_reg_mul(maybe_const_reg:tregister;l:aint);
        var
          hreg: tregister;
        begin
+         if l<>1 then
+           begin
+             hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
+             cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_ADDR,l,maybe_const_reg,hreg);
+             maybe_const_reg:=hreg;
+           end;
          if location.reference.base=NR_NO then
-          begin
-            if l<>1 then
-              cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_ADDR,l,reg);
-            location.reference.base:=reg;
-          end
+           location.reference.base:=maybe_const_reg
          else if location.reference.index=NR_NO then
-          begin
-            if l<>1 then
-              cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_ADDR,l,reg);
-            location.reference.index:=reg;
-          end
+           location.reference.index:=maybe_const_reg
          else
           begin
-            hreg := cg.getaddressregister(current_asmdata.CurrAsmList);
+            hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
             cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,location.reference,hreg);
             reference_reset_base(location.reference,hreg,0);
             { insert new index register }
-            if l<>1 then
-              cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_ADDR,l,reg);
-            location.reference.index:=reg;
+            location.reference.index:=maybe_const_reg;
           end;
        end;
 
 
-     procedure tcgvecnode.update_reference_reg_packed(reg:tregister;l:aint);
+     { see remarks for tcgvecnode.update_reference_reg_mul above }
+     procedure tcgvecnode.update_reference_reg_packed(maybe_const_reg:tregister;l:aint);
        var
          sref: tsubsetreference;
-         offsetreg: tregister;
+         offsetreg, hreg: tregister;
          alignpower: aint;
          temp : longint;
        begin
@@ -496,21 +501,22 @@ implementation
             (ispowerof2(l div 8,temp) or
              not is_ordinal(resultdef)) then
            begin
-             update_reference_reg_mul(reg,l div 8);
+             update_reference_reg_mul(maybe_const_reg,l div 8);
              exit;
            end;
          if (l > 8*sizeof(aint)) then
            internalerror(200608051);
          sref.ref := location.reference;
-         offsetreg := cg.getaddressregister(current_asmdata.CurrAsmList);
-         cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SUB,OS_INT,tarraydef(left.resultdef).lowrange,reg);
-         cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_INT,l,reg);
+         hreg := cg.getaddressregister(current_asmdata.CurrAsmList);
+         cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SUB,OS_INT,tarraydef(left.resultdef).lowrange,maybe_const_reg,hreg);
+         cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_IMUL,OS_INT,l,hreg);
          { keep alignment for index }
          sref.ref.alignment := left.resultdef.alignment;
          if not ispowerof2(sref.ref.alignment,temp) then
            internalerror(2006081201);
          alignpower:=temp;
-         cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHR,OS_ADDR,3+alignpower,reg,offsetreg);
+         offsetreg := cg.getaddressregister(current_asmdata.CurrAsmList);
+         cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHR,OS_ADDR,3+alignpower,hreg,offsetreg);
          cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_ADDR,alignpower,offsetreg);
          if (sref.ref.base = NR_NO) then
            sref.ref.base := offsetreg
@@ -521,8 +527,8 @@ implementation
              cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_ADD,OS_ADDR,sref.ref.base,offsetreg);
              sref.ref.base := offsetreg;
            end;
-         cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_AND,OS_INT,(1 shl (3+alignpower))-1,reg);
-         sref.bitindexreg := reg;
+         cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_AND,OS_INT,(1 shl (3+alignpower))-1,hreg);
+         sref.bitindexreg := hreg;
          sref.startbit := 0;
          sref.bitlen := resultdef.packedbitsize;
          if (left.location.loc = LOC_REFERENCE) then
@@ -579,7 +585,7 @@ implementation
                cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_LT,0,hreg,poslabel);
                cg.a_cmp_loc_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_BE,hightree.location,hreg,neglabel);
                cg.a_label(current_asmdata.CurrAsmList,poslabel);
-               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RANGEERROR');
+               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RANGEERROR',false);
                cg.a_label(current_asmdata.CurrAsmList,neglabel);
                { release hightree }
                hightree.free;
@@ -597,7 +603,7 @@ implementation
                paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
                paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc2);
                cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DYNARRAY_RANGECHECK');
+               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_DYNARRAY_RANGECHECK',false);
                cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
             end
          else
@@ -642,7 +648,8 @@ implementation
 
          { an ansistring needs to be dereferenced }
          if is_ansistring(left.resultdef) or
-            is_widestring(left.resultdef) then
+            is_widestring(left.resultdef) or
+            is_unicodestring(left.resultdef) then
            begin
               if nf_callunique in flags then
                 internalerror(200304236);
@@ -678,7 +685,7 @@ implementation
                    cg.a_param_reg(current_asmdata.CurrAsmList,OS_ADDR,location.reference.base,paraloc1);
                    paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
                    cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-                   cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_CHECKZERO');
+                   cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_CHECKZERO',false);
                    cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
                 end;
 
@@ -763,6 +770,7 @@ implementation
                      begin
                        case tstringdef(left.resultdef).stringtype of
                          { it's the same for ansi- and wide strings }
+                         st_unicodestring,
                          st_widestring,
                          st_ansistring:
                            begin
@@ -787,7 +795,7 @@ implementation
                               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
                               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc2);
                               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-                              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK');
+                              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK',false);
                               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
                            end;
 
@@ -898,7 +906,7 @@ implementation
               secondpass(right);
 
               { if mulsize = 1, we won't have to modify the index }
-              location_force_reg(current_asmdata.CurrAsmList,right.location,OS_ADDR,not is_packed_array(left.resultdef) and (mulsize = 1) );
+              location_force_reg(current_asmdata.CurrAsmList,right.location,OS_ADDR,true);
 
               if isjump then
                begin
@@ -926,6 +934,7 @@ implementation
                    begin
                       case tstringdef(left.resultdef).stringtype of
                          { it's the same for ansi- and wide strings }
+                         st_unicodestring,
                          st_widestring,
                          st_ansistring:
                            begin
@@ -954,7 +963,7 @@ implementation
                               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
                               paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc2);
                               cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-                              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK');
+                              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK',false);
                               cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
                            end;
                          st_shortstring:

+ 1 - 1
compiler/ncgopt.pas

@@ -90,7 +90,7 @@ begin
   if not(tg.istemp(left.location.reference) and
          (tg.sizeoftemp(current_asmdata.CurrAsmList,left.location.reference) = 256)) then
     begin
-       tg.Gettemp(current_asmdata.CurrAsmList,256,tt_normal,href);
+       tg.Gettemp(current_asmdata.CurrAsmList,256,1,tt_normal,href);
        cg.g_copyshortstring(current_asmdata.CurrAsmList,left.location.reference,href,255);
        location_freetemp(current_asmdata.CurrAsmList,left.location);
        { return temp reference }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно