Commit Graph

671 Commits

Author SHA1 Message Date
pierre
365666c833 Fix remaining failure for make testppudump at compiler level
git-svn-id: trunk@27568 -
2014-04-13 19:31:55 +00:00
nickysn
0ef858a6ca * fixed the reading of x86 pointer defs in ppudump after the ppuwrite_platform
changes

git-svn-id: trunk@27557 -
2014-04-13 11:40:20 +00:00
nickysn
9ab2aa7463 * fixed ppudump after r27434
git-svn-id: trunk@27556 -
2014-04-13 09:56:17 +00:00
nickysn
e21783a281 * i8086 small and tiny memory model ppus made incompatible. Rationale:
o the maintenance effort will be less - previously we had to test 4
    combinations:
      tiny program with tiny rtl
      tiny program with small rtl
      small program with tiny rtl
      small program with small rtl
    I only tested both tiny and small programs with the small rtl, so I missed
    a bug, which caused small programs built with the tiny rtl to always give
    a "Nil pointer assignment" error. Now we only need to test two cases:
      tiny program with tiny rtl
      small program with small rtl
  o I'm planning a bug fix for interrupt procedures in the tiny model, which
    will make their prolog differ between small and tiny. Currently, they're
    not used in the rtl, but that may change. And even if it doesn't,
    interrupt procedures may also be used by user units.

git-svn-id: trunk@27516 -
2014-04-10 16:31:06 +00:00
marco
56277b18db * move fpcsubst to utils/ because it uses classes
git-svn-id: trunk@27370 -
2014-03-30 11:45:51 +00:00
florian
686a2d2f3f + Support omitting the frame pointer on arm even in procedures with incoming parameters
on the stack, this can be enabled by -OoFORCENOSTACKFRAME. This reduces the required
  entry/exit code and makes an extra register available to the compiler. However, since this is
  based on an estimation of the required stack size, it might have two drawbacks:
  either the stack frame is estimated to big, the program requires a bigger stack than needed
  or it is estimated too small, then the compiler throws an internalerror during compilation. These
  issues can be overcome as soon as the compiler supports recompiling subroutines if needed.

git-svn-id: trunk@27239 -
2014-03-23 14:38:53 +00:00
Jonas Maebe
1ac4021178 * moved po_has_inlininginfo from procoptions to procimploptions so that
the availability of the body of a function declared as "inline" no
    longer changes the CRC and hence no longer triggers recompilations
    (mantis #24121)

git-svn-id: trunk@27192 -
2014-03-19 21:53:10 +00:00
Jonas Maebe
72c1e2a8ce * write newline after synthetickind
git-svn-id: trunk@27191 -
2014-03-19 21:53:06 +00:00
Jonas Maebe
c47b4cbe86 * fixed spacing of "alias names"
git-svn-id: trunk@27190 -
2014-03-19 21:53:02 +00:00
Jonas Maebe
7d8e9cf0f6 * moved tprocdef.isempty to a new set called implprocoptions that
contains flags related to the procdef's implementation (and that
    don't influence the interface crc)

git-svn-id: trunk@27189 -
2014-03-19 21:52:59 +00:00
florian
b2b26f84cf * partially merged the mips-embedded branch of Michael Ring:
- startup code/controller units are not merged yet
  - assembler call does not pass the needed CPU type yet

git-svn-id: trunk@27188 -
2014-03-19 21:25:38 +00:00
Jeppe Johansen
7fdb125356 Added AVR support to fpc and root Makefile.
Rebuilt root Makefile.

git-svn-id: trunk@26944 -
2014-03-04 08:02:10 +00:00
svenbarth
47b4a52c8f Also respect the supplied version suffix when printing the compiler path name using -PB. Fixes Mantis #25791
* compiler/utils/fpc.pp:
    also apply the versionstr suffix to ppcbin if versionstr is set like is done when really executing the compiler

git-svn-id: trunk@26887 -
2014-02-26 19:13:06 +00:00
yury
73c26bd6be * mipsel-android: Regenerated makefiles. From now the mipsel-android target can be built and used.
git-svn-id: trunk@26705 -
2014-02-07 12:37:17 +00:00
yury
56b3287e29 + Added compiler support for mipsel-android target.
git-svn-id: trunk@26686 -
2014-02-06 17:02:43 +00:00
paul
19d71655eb utils: fix few errors with sharepath in samplecfg
git-svn-id: trunk@26424 -
2014-01-11 16:15:02 +00:00
paul
4df2637e99 fpc: pass sharepath to fpc.cfg maker using samplecfg
git-svn-id: trunk@26423 -
2014-01-11 14:41:45 +00:00
yury
eea69a2947 * ppudump: Fixed json and xml output of inline types in array declaration.
git-svn-id: trunk@26277 -
2013-12-24 12:32:55 +00:00
yury
996ee048be * ppudump: Properly handle type definitions inside a class definition for json and xml output.
git-svn-id: trunk@26273 -
2013-12-23 14:45:03 +00:00
yury
bc14407ffe * ppudump: Deref index -1 is valid for absolute symbols. Handle this.
git-svn-id: trunk@26270 -
2013-12-23 12:26:28 +00:00
yury
7e8ce16f6b * ppudump: Output the "default" option for properties.
git-svn-id: trunk@26173 -
2013-12-03 14:31:33 +00:00
florian
1d4a4d0684 + noreturn directive
git-svn-id: trunk@26003 -
2013-11-10 09:00:59 +00:00
nickysn
e160dab697 + added i8086 to the list of supported CPUs by FPC.exe
git-svn-id: trunk@25792 -
2013-10-15 13:29:51 +00:00
nickysn
f6e846c574 + added the NEC V20/V30 instructions
git-svn-id: trunk@25750 -
2013-10-11 21:27:56 +00:00
yury
b293f7e5c4 * ppudump: Do not skip unnamed inline array type definitions such as "var arr: array of integer";
git-svn-id: trunk@25716 -
2013-10-07 20:15:13 +00:00
nickysn
9ed0d6d40d * updated ppudump after r25672
git-svn-id: trunk@25673 -
2013-10-06 00:45:03 +00:00
nickysn
1bea98995b * regenerated fpcmake makefiles after r25642
git-svn-id: trunk@25644 -
2013-10-05 10:11:27 +00:00
sergei
5af873ee5b * x86 targets: Profiling shows that quite a bit of time is spent in findreg_by_number(), despite it uses binary search. Worse, it is repeated for every piece of register information. Trying to get rid of some of these calls: rearranged registers so that their "opcode" matches 3 LSBs of superregister number (with a few exceptions described at the beginning of x86reg.dat). This allows to lookup opcodes in regval() with O(1) complexity, and removes need in rXXXop.inc files.
git-svn-id: trunk@25627 -
2013-10-03 08:08:04 +00:00
nickysn
c47d745bcf + added support for i8086 in mkx86ins.pp
git-svn-id: trunk@25601 -
2013-09-28 21:06:09 +00:00
nickysn
d8ef5aa3c4 * mkx86reg.pp updated to support i8086
git-svn-id: trunk@25599 -
2013-09-28 20:56:47 +00:00
nickysn
bf3e48d8e0 * compilation of ppudump fixed
git-svn-id: trunk@25368 -
2013-08-25 17:11:57 +00:00
nickysn
571e9c2e3e + added the new i8086 memory model flags to ppudump as well
git-svn-id: trunk@25366 -
2013-08-25 16:48:13 +00:00
sergei
5c4abfa75a + Implemented saving/restoring registers using PUSH/POP instructions on i386 targets with non-fixed stack. Provides some advantage in code size (e.g. the compiler becomes about 20KBytes smaller).
* This should be applicable to i8086 targets as well (but needs testing), by copying changes from i386/cgcpu.pas to i8086/cgcpu.pas and removing "$ifdef i386" lines in cgx86.pas.

git-svn-id: trunk@25224 -
2013-08-07 09:59:07 +00:00
nickysn
381c996e53 + added po_far to tprocoptions
git-svn-id: trunk@24815 -
2013-06-08 16:34:30 +00:00
svenbarth
956b26bc97 Completely reworked implementation of generic constraints, by moving the generic constraint data from the symbols to the definitions (I originally thought that this would simplyfy things, but the more correct approach is to add it to the defs).
symsym.pas:
    - remove "tgenericconstraintdata" and any using/loading/writing of it in "ttypesym"
    - remove "tgenericconstraintflag"
symdef.pas:
    + add "tgenericconstraintdata"
    + load and write "genconstraintdata" in "tstoreddef"
symconst.pas:
    + add "tgenericconstraintflag" so it can be used in "ppudump" as well
defcmp.pas, compare_defs_ext:
    * as we allow global operator overloads we can't really determine whether two defs are compatible, because a valid operator for the specialization types might just happen to be in scope of the generic; so for now constraints are only strictly checked when declaring a specialization
pgenutil.pas:
    * adjust "parse_generic_parameters" and "check_generic_constraints" to the new location of the constraint data
ppudump.pp:
    * corrrectly parse defs which contain generic constraints

git-svn-id: trunk@24628 -
2013-05-29 08:19:02 +00:00
nickysn
10ef91a7f6 * updated ppudump after the x86 pointer type changes introduced in r24453
git-svn-id: trunk@24548 -
2013-05-21 14:46:52 +00:00
svenbarth
f1f89c77c3 Finally refactor "b_needs_init_final" flag to be a symtable flag which is written to/loaded from the PPU (as discussed in the thread "Status report for "class helpers"" in fpc-devel on 29th January 2011).
symconst.pas:
    + add "sto_needs_init_final" value to "tsymtableoptions"
symtable.pas:
    - TStoredSymtable: remove "b_needs_init_final"
    + TStoredSymtable: add "init_final_check_done" (which is False by default)
    * TStoredSymtable.ppuload: set "init_final_check_done" to True if PPU is loaded (because the flag will then already be restored)
    * TStoredSymtable.needs_init_final: check the symbols only if "init_final_check_done" is not set yet
    * TStoredSymtable._needs_init_final: only check the symbol if "sto_needs_init_final" is not set yet and set the flag accordingly if needed
utils/ppuutils/ppudump.pp:
    * respect the new flag

git-svn-id: trunk@24523 -
2013-05-17 12:15:13 +00:00
yury
10c1b11d15 * ppudump: Output "RetType" attribute for procedures and destructors.
git-svn-id: trunk@24511 -
2013-05-15 14:18:38 +00:00
yury
2ec85e9705 * ppudump: Output "Size" attribute for objects and records.
git-svn-id: trunk@24506 -
2013-05-15 09:13:12 +00:00
yury
ec6ff22588 * ppudump: Output "MethodPtr" attribute for procedural types.
git-svn-id: trunk@24504 -
2013-05-15 08:15:23 +00:00
nickysn
0b09c50138 * updated ppudump because of the ppu changes in r24491
git-svn-id: trunk@24497 -
2013-05-14 19:22:54 +00:00
paul
d38bd1b9bd compiler: remove dummy ado_none from tarraydefoption. It is probably a leftover from time when tarraydefoptions was not present, comment options
ppudump: simplify readarraydefoptions

git-svn-id: trunk@24456 -
2013-05-07 06:51:32 +00:00
paul
17e7ef0d28 ppudump: fix help message
git-svn-id: trunk@24416 -
2013-05-04 02:23:39 +00:00
yury
15b3695a0e * ppudump: Proper tag for a source file in XML.
git-svn-id: trunk@24411 -
2013-05-03 15:13:28 +00:00
yury
eb26ccfbe7 * ppudump: Proper output of Unicode string constants.
git-svn-id: trunk@24410 -
2013-05-03 15:04:50 +00:00
yury
906cd9d365 + ppudump: XML output.
git-svn-id: trunk@24409 -
2013-05-03 14:27:17 +00:00
yury
65d832420e * ppudump:
- Check PPU version to be the same as the current PPU version of the compiler. It prevents reading errors if a unit has wrong PPU version. The version check can be turned off using -S switch.
  - User WriteError() in appropriate places in the code.
  

git-svn-id: trunk@24408 -
2013-05-03 13:03:22 +00:00
yury
ad8f42cd29 * ppudump: JSON output of float, string, file, variant, undefined, formal definitions.
git-svn-id: trunk@24407 -
2013-05-03 12:28:19 +00:00
yury
44a0b61224 * ppudump: Write errors to StdErr and write warnings to StdErr when output to JSON.
git-svn-id: trunk@24406 -
2013-05-03 11:12:15 +00:00
yury
3a8ed11e23 * ppudump: JSON output of pointers and ordinal definitions.
git-svn-id: trunk@24405 -
2013-05-03 11:04:18 +00:00