Commit Graph

12257 Commits

Author SHA1 Message Date
florian
fb84cb865b * rebase to trunk@17295
git-svn-id: branches/avr@17296 -
2011-04-10 19:20:48 +00:00
florian
eb2a2a5ea0 + implements tavraddnode.second_cmpsmallset
git-svn-id: branches/avr@17295 -
2011-04-10 18:52:56 +00:00
florian
8cfbb70326 + generic a_cmp_const_reg_label
git-svn-id: branches/avr@17294 -
2011-04-10 18:52:37 +00:00
florian
ebe8078263 * compilation fixed
git-svn-id: branches/avr@17293 -
2011-04-10 18:43:44 +00:00
florian
610fa89484 + basic avr linker script
git-svn-id: branches/avr@17292 -
2011-04-10 18:43:04 +00:00
florian
7b8f3a61d3 + implemented tcgavr.g_flags2reg
git-svn-id: branches/avr@17290 -
2011-04-10 18:39:51 +00:00
florian
ed8d652398 + implemened a_cmp_reg_reg_label
git-svn-id: branches/avr@17289 -
2011-04-10 18:39:07 +00:00
florian
5fd4bb70de * started to implement ref.base parameter for normalize_ref
git-svn-id: branches/avr@17288 -
2011-04-10 18:38:06 +00:00
florian
a0b0b43d0c + implemented tcgavr.a_jmp_name
* updated todos

git-svn-id: branches/avr@17287 -
2011-04-10 18:37:26 +00:00
florian
c97869bd89 * merge user sections support branch
git-svn-id: trunk@17285 -
2011-04-10 18:08:59 +00:00
sergei
c939beee70 * Changed register allocation order for x86_64, putting first registers that don't need to be preserved by procedure. This way registers needing preservation are allocated less frequently (and for non-complex leaf functions not allocated at all), reducing amount of entry/exit code.
git-svn-id: trunk@17284 -
2011-04-10 18:04:17 +00:00
florian
7f995c093e * moved some code from pmodules to ncgutil to get rid of cpubase in pmodules
git-svn-id: trunk@17280 -
2011-04-10 16:27:49 +00:00
florian
3ce9ff93f1 + patch by Jeppe Johansen to support automatic interrupt table generation by using the interrupt directive with an offset. Not activated yet because it requires to change also the startup code of the different mcus.
git-svn-id: trunk@17279 -
2011-04-10 15:59:06 +00:00
Jonas Maebe
66258fb0b8 * fixed TCmdStrListItem.GetCopy() (the reference count of the ansistring
field was messed up due to the use of "move()" to copy all field data)

git-svn-id: trunk@17270 -
2011-04-08 08:10:07 +00:00
armin
672d76e636 added a segment table containing segments for symbols defined by linker script (needed for relocs)
git-svn-id: trunk@17268 -
2011-04-07 19:38:25 +00:00
florian
6fb666135f * forbid <ordinal> in <set type>
git-svn-id: trunk@17263 -
2011-04-06 20:32:45 +00:00
sergei
c6accaba5c * tcg386.g_copyvaluepara_openarray, improved generated code:
- second calculation of EDI is obsolete, its value is never used.
  - calculation of ECX can be partially shared with first calculation of EDI.
  - multiplying ECX by 1 is also redundant (was happening due to a wrong condition).

git-svn-id: trunk@17260 -
2011-04-06 08:54:20 +00:00
florian
9279c6955e * support for SSSE3, SSE4,1, SSE4.2, AES instructions set by Emelyanov Roman, resolves #18527
+ test for aes support

git-svn-id: trunk@17256 -
2011-04-05 20:22:57 +00:00
florian
0c62133d38 * patch by Mattias Gaertner to allow to override how the compiler reads source/ppu files, resolves #18740
git-svn-id: trunk@17255 -
2011-04-05 20:10:09 +00:00
florian
8bff2a0de4 * patch by Jeppe Johansen to fix thumb2 epilog generation, resolves #18392
git-svn-id: trunk@17252 -
2011-04-05 19:25:20 +00:00
florian
07c9a772bf * fix compilation when object type cast checking is on
git-svn-id: trunk@17236 -
2011-04-03 10:50:34 +00:00
florian
736071e716 * updated copyright to 2011
* corrected copyright notice in message files and added "and others"

git-svn-id: trunk@17232 -
2011-04-02 20:06:46 +00:00
Jonas Maebe
bc46ea5cba * use compare_defs() instead of a plain "=" comparison to check that the
return type of the interface and implementation declaration of a function
    match (so that in case the "real defs" match as described in the comment
    of r17201, they are accepted as being the same)

git-svn-id: trunk@17207 -
2011-03-29 18:51:36 +00:00
Jonas Maebe
5c2050e756 * when two objectdefs resolve to the same "real" objectdef, consider them
as te_exact rather than as te_equal (otherwise you get compilation errors
    if only a formal external definition is in scope in the interface, but
    the full definition is in scope in the implementation)

git-svn-id: trunk@17201 -
2011-03-28 18:03:57 +00:00
Jonas Maebe
ebb4d26201 * replaced all tobjectdef() typecasts of the first argument of
do_member_read() with tabstractrecorddef() typecasts, because in
    many cases it can also be a record nowadays

git-svn-id: trunk@17200 -
2011-03-28 15:23:25 +00:00
sergei
1c01d52ea6 * Improvements of tprocinfo class:
* Moved nestedprocs from tcgprocinfo to tprocinfo, in order to be able to access the entire nested procedure hierarchy without depending on psub.pas or code generator.
  * Creating an instance of tprocinfo automatically inserts it into list of parent's nested procedures.
  * nestedprocs list is created on demand. Public read-only access is provided by has_nestedprocs and get_first_nestedproc functions.
  + Method destroy_tree is provided for destroying the entire hierarchy of procinfo's. It can be called on any procinfo object in the tree.
  + Also added methods save_jump_labels and restore_jump_labels for asmlabel maintenance, which is currently being repeatedly done all over the codegenerator.

git-svn-id: trunk@17197 -
2011-03-27 17:21:48 +00:00
armin
7eace122dc internal linker support for creating novell netware loadable modules
git-svn-id: trunk@17192 -
2011-03-27 14:47:25 +00:00
joost
fe503598c1 * samplecfg now also creates fppkg configuration files
git-svn-id: trunk@17190 -
2011-03-27 12:29:32 +00:00
joost
dc5f4b038d * Do not use scripts, but let fpcmkcfg create eventual parent directories
git-svn-id: trunk@17185 -
2011-03-26 20:48:31 +00:00
joost
6fa6151bef * Do not create a backup, fpcmkcfg does this already
git-svn-id: trunk@17183 -
2011-03-26 17:32:52 +00:00
Jonas Maebe
9ae0414dda * always print the fully qualified type name in case a type is nested
git-svn-id: trunk@17172 -
2011-03-23 22:24:37 +00:00
Jonas Maebe
c0423b6a78 * handle implementing objcprotocols that are defined as formal external
in the current scope, but whose full definition is available elsewhere

git-svn-id: trunk@17171 -
2011-03-23 22:23:08 +00:00
Jonas Maebe
10674153cf * set result of searchsym_in_record() in case nothing was found
git-svn-id: trunk@17161 -
2011-03-21 12:42:23 +00:00
pierre
f49fb7329a * Avoid crash if right node of _IN keyword is a type node that is not a set
git-svn-id: trunk@17159 -
2011-03-21 07:57:37 +00:00
florian
1f4be60927 * fix token order, I should really learn the alphabet
git-svn-id: branches/usersections@17155 -
2011-03-20 17:43:36 +00:00
florian
f328b6d635 + user section type
+ parsing of section directive for variables
  + section test
  + write section names in the assembler/binary writers correctly
  * allow section only after ; and for embedded targets

git-svn-id: branches/usersections@17154 -
2011-03-20 15:42:28 +00:00
florian
e4656050a7 + get/putansistring
git-svn-id: branches/usersections@17153 -
2011-03-20 15:39:33 +00:00
florian
0bdd15e0da + added cwindirs for the time being to the compiler dir till a release with windirs in the rtl is released
git-svn-id: trunk@17149 -
2011-03-19 22:48:56 +00:00
joost
3c6bb40c52 * Samplecfg now uses fpcmkcfg to create the configuration files
git-svn-id: trunk@17148 -
2011-03-19 22:09:47 +00:00
Jonas Maebe
3d3a42b911 * improvement to r16050 for non-fixed stack targets: they never have to use
a temporary parameter location, since calls cannot overwrite parameters
    already on the stack in that case (it will just grow)

git-svn-id: trunk@17144 -
2011-03-18 18:32:02 +00:00
sergei
7f62d5cfb0 * tcg.g_array_rtti_helper: if high-value is a constant, handle it without using a register.
* Now g_initialize, g_finalize, g_incrrefcount and g_decrrefcount should never more be used for open arrays, trigger internal error if it happens.

git-svn-id: trunk@17137 -
2011-03-15 09:30:55 +00:00
sergei
48d93dc40e * Fixed handling of "open array of managed type" out-parameters at caller side. Reference count should be decremented only for those array elements which are actually passed to the called procedure; it may be a part of original array if range or slice is used. Concludes work on #18859.
+ Test

git-svn-id: trunk@17136 -
2011-03-15 09:17:24 +00:00
joost
2df0ef4937 * Use GetWindowsSpecialDir from the new windirs unit
git-svn-id: trunk@17135 -
2011-03-14 20:51:00 +00:00
sergei
3e6ad5f5aa * tcgvecnode, simplified range checking for strings. Removed FPC_*STR_CHECKZERO helpers, and changed FPC_*STR_CHECKRANGE so they accept the original left node. Now strings are checked the same way as dynamic arrays, and the compiler part is considerably simpler.
git-svn-id: trunk@17129 -
2011-03-13 15:52:02 +00:00
Jonas Maebe
ac283bb237 * when checking whether the current class definition finalises an existing
forward-declared class, only search the current symtable rather than the
    entire symtable stack (to prevent finding types in e.g. nested types)

git-svn-id: trunk@17128 -
2011-03-13 13:34:49 +00:00
Jonas Maebe
8e788c6fa5 * further fixes for parsing declarations involving nested types that are
declared inside the the current structdef hierarchy: properly deal with
    multiple types of the same name nested into each other, by keeping track
    of at which point in the hierarchy we found the first type (and afterwards
    continuing from there, instead of from any point in the hierarchy where
    a type with this name can be found)

git-svn-id: trunk@17126 -
2011-03-12 23:54:12 +00:00
sergei
cf4c00e8d6 tcgvecnode, cleanup/refactoring:
* Separated two almost identical parts of code into procedure rangecheck_string;
- Removed range checking of regular_array[constant], which should, according to the comments, happen in typecheckpass. tvecnode.pass_typecheck indeed does the necessary tests, so removing this duplicate check also eliminates duplicate warning when range checking is off.

git-svn-id: trunk@17124 -
2011-03-12 21:40:10 +00:00
joost
b1dd2f8659 * Fixed compilation on WinCE after r17114 and r17094
git-svn-id: trunk@17115 -
2011-03-10 19:03:00 +00:00
pierre
1f1172e73e * Fix win64 compilation failure
git-svn-id: trunk@17114 -
2011-03-10 13:59:19 +00:00
Jonas Maebe
af38604706 * fixed spelling of "isforward" parameter in previous patch
* fixed support for fully qualified classes that are multiple levels deep
    in another part of the hierarchy (+ adapted test)

git-svn-id: trunk@17112 -
2011-03-09 22:58:23 +00:00