Commit Graph

38144 Commits

Author SHA1 Message Date
florian
4b4e08c28b * fixes copy&paste errors when moving end of live pointers
git-svn-id: trunk@22113 -
2012-08-17 19:36:16 +00:00
florian
53a0d3e3a3 * fixed typo when checking live start of references
git-svn-id: trunk@22112 -
2012-08-17 19:36:10 +00:00
florian
5ceeb8aaa9 * enable scheduler when compiling at least with -O2
git-svn-id: trunk@22111 -
2012-08-17 19:36:04 +00:00
florian
a693fe9fb7 + implemented TCpuPreRegallocScheduler.SwapRegLive and make use of it to be able to reschedule instructions before register allocation
git-svn-id: trunk@22110 -
2012-08-17 19:35:59 +00:00
florian
f9dd5bf5e6 + live_start and live_end_properties
git-svn-id: trunk@22109 -
2012-08-17 19:35:51 +00:00
florian
c2d067940a * get rid of hash chars, modern tools and IDEs can use normal comments as documentation if needed
git-svn-id: trunk@22108 -
2012-08-17 19:35:46 +00:00
masta
6729164fcc Work around load latency in InterlockedExchange for ARM
An LDR will have two load latency cycles on most ARM implementations,
moving the
  mov r4, r0
two instructions away from the corresponding ldr will avoid the stalls.

git-svn-id: trunk@22107 -
2012-08-17 12:42:49 +00:00
florian
7e5b8584cf * set MaxOps to 4 for the optimizer because fpc generates now mla instructions
git-svn-id: trunk@22106 -
2012-08-17 12:38:59 +00:00
florian
e353222a8a * if the selected cpu type supports pld, provide and use only the pld variant
git-svn-id: trunk@22105 -
2012-08-17 10:37:36 +00:00
florian
354cac2bb6 + completed arm architectures
* ldrd/strd and pld collected under the edsp define

git-svn-id: trunk@22104 -
2012-08-17 10:37:27 +00:00
florian
7588896775 * make use of cpuflags in the arm compiler
* armv5te architecture

git-svn-id: trunk@22103 -
2012-08-17 10:37:17 +00:00
tom_at_work
38226169a9 Make use of "blx" instruction in fpc_ansistr_dec_ref conditional on CPUARM_HAS_BX, otherwise just use the "bl" instruction. Bug introduced in r22035. Fixes bug report 22632.
git-svn-id: trunk@22102 -
2012-08-17 08:28:08 +00:00
tom_at_work
7c56a9f34d Revert r22080 because it prevents crosscompilation.
git-svn-id: trunk@22101 -
2012-08-16 21:24:47 +00:00
Jonas Maebe
3983342648 * free temps created for case-of-string-statements
git-svn-id: trunk@22100 -
2012-08-16 19:22:23 +00:00
Jonas Maebe
f3ad4af343 * make sure valid_for_assign() returns false for inlined function bodies
(mantis #22613)

git-svn-id: trunk@22099 -
2012-08-16 19:22:17 +00:00
Jonas Maebe
e06d3a6e04 * raise an error when locate is used on a closed dataset (patch by
Claudio Romero, mantis #13938)

git-svn-id: trunk@22098 -
2012-08-16 17:53:09 +00:00
florian
3987c82bab * assign a complexity of 2 to float nodes because they usually involve a loading from memory
git-svn-id: trunk@22097 -
2012-08-15 18:28:47 +00:00
florian
41e8da998c * cast raise node only to a tertiary node in foreach, makes adding more tertiary nodes easier
git-svn-id: trunk@22096 -
2012-08-15 18:22:47 +00:00
florian
b78f9826fb * call AllocMem instead of GetMem/FillChar
git-svn-id: trunk@22095 -
2012-08-15 17:47:15 +00:00
michael
b26797e818 * Fixed memory leak in classes with interfaces
git-svn-id: trunk@22094 -
2012-08-15 16:14:09 +00:00
florian
b8ab3d48f6 * fix compilation on non avr/arm architectures
git-svn-id: trunk@22093 -
2012-08-15 16:02:36 +00:00
michael
3bc8bbf378 * Fixed to conform to new structures in pastree
git-svn-id: trunk@22092 -
2012-08-15 16:00:51 +00:00
florian
e6efbd36ad * compiler defined cpuflags instead of creating them during system unit compilation
git-svn-id: trunk@22091 -
2012-08-15 15:49:11 +00:00
florian
e4f89fe524 + introduce cpuflags for arm
git-svn-id: trunk@22090 -
2012-08-15 15:49:05 +00:00
florian
895aa0d752 * reworked cpuflags for avr
+ define cpuflags in options unit so user programs can access them

git-svn-id: trunk@22089 -
2012-08-15 15:48:59 +00:00
michael
9af6f49c02 * Finished try/except statements
git-svn-id: trunk@22088 -
2012-08-15 15:02:05 +00:00
sergei
f14e038172 + Implemented writeReloc_internal method for TElfObjSection.
+ TElfSymtab.writeInternalSymbol: added 'aValue' argument, needed for writing dynamic symbols.

git-svn-id: trunk@22087 -
2012-08-15 12:27:32 +00:00
sergei
ec56677927 + Added method TObjSection.writeReloc_internal to write relocations to given section+offset without need to have a symbol at target location.
* Optimized COFF importing code using the new method.
  - Don't create .text sections for imported variables.
  - Don't create .idata$6 sections for imports by ordinal.

git-svn-id: trunk@22086 -
2012-08-15 12:22:07 +00:00
michael
0801287956 * Adapted tests to use expression objects where needed
git-svn-id: trunk@22085 -
2012-08-15 12:21:52 +00:00
michael
06b092280e * Use expression objects in case and constants
git-svn-id: trunk@22084 -
2012-08-15 12:21:22 +00:00
michael
e9a339448a * Better Except handling
git-svn-id: trunk@22083 -
2012-08-15 10:52:21 +00:00
michael
4c47beb7b7 * Reworked raise parsing, now also supports raise X at Addr
git-svn-id: trunk@22082 -
2012-08-15 09:01:11 +00:00
tom_at_work
f252fd369e Tried to reorganize the ARM define mess in rtl/arm/arm.inc. Instead of requiring to enumerate all possible ARM variants each time a CPU feature is used, add a define of the format CPUARM_HAS_XXX and use that. Note that a better solution would be to properly implement the compiler cpuinfo infrastructure, however that is much more work.
+ CPUARM_HAS_BX is defined if the CPU supports the BX* instruction
  + CPUARM_HAS_REV is defined if the CPU supports the REV instruction. Note that you still have to check for compiler versions > 2.6.0 since the assembler reader of 2.6.0 does not understand that instruction.
  + CPUARM_HAS_IDIV is defined if the CPU supports the sdiv, udiv instructions. Use of this fixes a bug where previously these instruction were only used for armv7-m, while cortex3m cpus also support it.
  + CPUARM_HAS_LDREX is defined if the CPU supports the ldrex/strex instructions. Use of this fixes a bug with armv7(-a) cpus where this path has not been used.
  + SYSTEM_HAS_KUSER_CMPXCHG is defined if the system (mainly OS) support the kuser_cmpxchg functions. Use of this fixes a bug where ARMHF systems did not use it for synchronization (although ARMHF is armv7+ only, i.e. the LDREX path is used anyway)

git-svn-id: trunk@22081 -
2012-08-14 19:45:03 +00:00
tom_at_work
7b6bcd315f Pass FPCOPT to fpmkunit and fpmake compilation. This prevents build errors of these programs if the given FPCOPT options of the previously compiled RTL are incompatible to default options. Regenerated associated makefiles.
git-svn-id: trunk@22080 -
2012-08-14 19:09:17 +00:00
michael
9635787b5a * Added functionality to create fpdoc.css from internal copy
git-svn-id: trunk@22079 -
2012-08-14 18:47:57 +00:00
michael
4a9d012d3a * Patch from Reinier Olislagers to update copyright and emit a more friendly message if an input file is not found (bug ID 22639)
git-svn-id: trunk@22078 -
2012-08-14 18:27:46 +00:00
tom_at_work
65a4ab399e Fix use of FPC_OPT to build gparmake. The correct name of the parameter is FPCOPT. Regenerate makefile.
git-svn-id: trunk@22077 -
2012-08-13 20:45:39 +00:00
florian
bd47ba6ba4 * the address of complex inline parameters can be hold always in a register
git-svn-id: trunk@22076 -
2012-08-13 15:09:11 +00:00
florian
5b90a02e75 * inherit nf_write/nf_modify in tcallnode.replaceparaload also when replacing parameters
git-svn-id: trunk@22075 -
2012-08-13 15:06:16 +00:00
florian
ecb037ad79 + tarminnode.pass_1 to set expectloc correctly
git-svn-id: trunk@22074 -
2012-08-13 15:03:35 +00:00
florian
d2aa35e9de * throw an internal error if code generation depends on expectloc but expectloc and real loc do not match
git-svn-id: trunk@22073 -
2012-08-13 15:02:55 +00:00
florian
dd18d0bd4d * write flags in tnode.printnodeinfo
git-svn-id: trunk@22072 -
2012-08-13 14:50:37 +00:00
michael
1b10dfbc26 * Use HTTP delimiters for locations
git-svn-id: trunk@22071 -
2012-08-13 11:44:01 +00:00
michael
3418ba156e * Retry opening session file on error (max 5 times)
git-svn-id: trunk@22070 -
2012-08-13 11:43:16 +00:00
marco
b822371d41 * add platform modifiers to all locally defined functions in unix' dos unit.
git-svn-id: trunk@22069 -
2012-08-13 10:14:07 +00:00
sergei
45d27ef82e * Relocating common symbols needs adjusting by symbol size only on DJCOFF targets, not on PECOFF ones.
git-svn-id: trunk@22068 -
2012-08-13 09:31:49 +00:00
sergei
de34f58284 * Update instruction segment prefix when copying operands from another instruction, Mantis #18113.
git-svn-id: trunk@22067 -
2012-08-13 04:51:28 +00:00
svenbarth
3ad324ad13 Removed x86 unit from the Makefile.fpc (it's a Unix only unit) and regenerated Makefile.
git-svn-id: trunk@22066 -
2012-08-12 13:53:55 +00:00
Jonas Maebe
ed8087c71a * check with parameters that must be followed by either nothing or a +/-,
are indeed never followed by other characters (prevents typos such as
    -EnabledFeature instead of -dEnableFeature from simply switching of
    linking)

git-svn-id: trunk@22065 -
2012-08-12 13:30:36 +00:00
florian
33f287d320 + tarminnode.in_smallset making use of tst
git-svn-id: trunk@22064 -
2012-08-11 22:10:45 +00:00