Commit Graph

12778 Commits

Author SHA1 Message Date
paul
fbc01291c4 merge r17327 from cpstrnew branch by michael:
* Patch from Inoussa to fix first test case

git-svn-id: trunk@19105 -
2011-09-17 13:04:50 +00:00
paul
9e0ad7baae merge r17318 from cpstrnew branch by florian:
* compilation fix by Inoussa OUEDRAOGO, resolves #19160

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

git-svn-id: trunk@19102 -
2011-09-17 12:00:06 +00:00
paul
e9f8182370 merge r14142 from cpstrnew branch by paul:
eat {$stringchecks} directive without the warning

git-svn-id: trunk@19098 -
2011-09-17 11:53:36 +00:00
paul
8f3f583199 merge r14140 from cpstrnew branch by paul:
prefer exact string const matches

git-svn-id: trunk@19096 -
2011-09-17 11:48:18 +00:00
paul
b3db8db481 merge r14133 from cpstrnew branch by paul except ptconst.pas which has a difficult merge conflict (code moved to another unit which is not at the branch during the revision):
make AnsiStr concatenation and copy work

git-svn-id: trunk@19094 -
2011-09-17 11:44:47 +00:00
paul
27538f21a4 merge r13489 from cpstrnew branch by florian:
* made tcpstr1 work

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

git-svn-id: trunk@19085 -
2011-09-17 11:16:45 +00:00
paul
06af8f3e44 merge r13486 from cpstrnew branch by florian:
+ fpc_ansistr_to_ansistr implemented, rtl compiles again

git-svn-id: trunk@19084 -
2011-09-17 11:03:30 +00:00
paul
ae0d732c8f merge r13485 from cpstrnew branch by florian:
* fixed compilation of system unit after last changes

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

git-svn-id: trunk@19080 -
2011-09-17 10:37:36 +00:00
paul
a95512f0ec merge cpstrnew branch r13480 by florian:
* merged old cpstr branch

git-svn-id: trunk@19079 -
2011-09-17 10:03:59 +00:00
sergei
1365467b0d + Support classes for creating unwind bytecode for Win64.
git-svn-id: trunk@19071 -
2011-09-15 15:35:08 +00:00
sergei
6280ee2eed * Changed attributes of .pdata section so it is smart-linkable on x86_64.
* Changed alignment of .pdata section to 4.
+ Support saving RELOC_NONE relocations to .o files and reading them back on x86_64.

git-svn-id: trunk@19070 -
2011-09-15 15:22:03 +00:00
sergei
782cdd8e9a x86 external Intel assembler:
+ Write name of sec_threadvar
+ Also write actual section alignment instead of always using PARA.

git-svn-id: trunk@19069 -
2011-09-15 15:05:14 +00:00
pierre
30129a0363 * msg files regeneration after commit 19057
git-svn-id: trunk@19066 -
2011-09-14 13:38:46 +00:00
pierre
a5d2840980 + Fix commit 19061, by restoring cs_link_smart code and disabling
cs_create_smart if using dwarf information and external assembler
   debug information as this is not compatible.
 * Added a different message for cs_create_smart.

git-svn-id: trunk@19065 -
2011-09-14 13:38:15 +00:00
pierre
f9fbe661f0 * msg files regeneration after commit 19057
git-svn-id: trunk@19064 -
2011-09-14 12:21:43 +00:00
pierre
b5c4df8eb5 * exclude cs_create_smart if using external assembler and dwarf
debug information as this is not compatible.

git-svn-id: trunk@19063 -
2011-09-14 12:16:53 +00:00
pierre
0d15a427c2 * Consider cs_create_smart instead of cs_link_smart for
use of global labels for alt_dbgline type.

git-svn-id: trunk@19062 -
2011-09-14 12:14:52 +00:00
pierre
5d39f2208a * Consider cs_create_smart instead of cs_link_smart for disabling
smartlink creation if using external assembler and Dwarf debugging
 * Call CheckOptionsCompatibility again after setting currentt assembler

git-svn-id: trunk@19061 -
2011-09-14 12:13:05 +00:00
pierre
5a671336c7 Fix go32v2 rtl compilation error and add warning for %es:Const
git-svn-id: trunk@19057 -
2011-09-13 16:20:12 +00:00
paul
ec29fddda7 compiler: implement Delphi like dynamic array constructors. E.g.: SomeArrayVar := TSomeDynArrayType.Create(value1, value2). (issue #0015385)
git-svn-id: trunk@19045 -
2011-09-11 04:41:46 +00:00
pierre
daa27f636d + exeinstall: New phony target to install only current cpu taret compiler.
+ fullinstall: New phony target to install all posible compilers.

git-svn-id: trunk@19041 -
2011-09-10 08:54:50 +00:00
sergei
a9515e9446 * Don't include ShortString constants into resourcestring reference table, because current design allows RTL to handle only a single string type.
git-svn-id: trunk@19038 -
2011-09-09 17:58:32 +00:00
tom_at_work
9ce34c63c9 Fix shared library loading and unloading for Linux platforms. Shared library initialization and finalization are now called correctly at program startup for compile-time linked dynamic libraries on powerpc-/powerpc64-/arm-/i386- and x86_64-linux.
Every startup code must now provide an additional entry point called "_dynamic_start" that is set as new the entry point if the program links to a Pascal shared library. Its purpose is to set up an exit hook usually passed via a register, which should be called during program finalization if non-nil.

We use this additional entry point because this register only has meaningful content when there are any compile-time linked shared libraries, otherwise it often contains random garbage. The difference between the _dynamic_start and the original code is minimal; actually in all implementations the _dynamic_start code passes on control to the old startup code, so we use an additional entry point instead of an additional startup file.

Detailed changes and fixes list:
compiler:
  always link to the dynamic loader (ld.so) when compiling shared libraries. Fixes crashes in the loader during shared library finalization on some Linuxes
  remove additional ENTRY() section in arm linker script
  select either _dynamic_start or _start as entry point depending on whether this is a static or dynamic executable
powerpc*:
  do not set System.isLibrary in startup code, it will be set during library initialization anyway
  trap in case of reaching code locations that should not be reached instead of looping (possibly endlessly)
powerpc:
  register atexit() function pointer if supplied to the executable and call it during shutdown
  correctly set argc/argv/envp in shared library code and return correctly to the caller after initialization
  pass on exitcode in shared library haltproc
  use the more recent exit_group system call if available for shutdown
powerpc64
  fix .ptrgl stub, do not set the environment register to the value of the GOT entry in the function descriptor
arm
  do not set System.isLibrary in startup code, it will be set during library initialization anyway
  reload exitcode to pass to shutdown
mips,mipsel,sparc
  added stubs to allow correct linking

git-svn-id: trunk@19036 -
2011-09-08 21:17:35 +00:00
pierre
a1c5b7c118 + Add property options display
git-svn-id: trunk@19024 -
2011-09-07 23:20:47 +00:00
pierre
a17390126a Fix an error in reading real variable for change_endian
git-svn-id: trunk@19023 -
2011-09-07 23:19:48 +00:00
pierre
01526fa582 * Remove forgotten wrong increments
git-svn-id: trunk@19019 -
2011-09-07 19:43:50 +00:00
florian
b270a1922b * reverts r18960, should solve sparc trouble
git-svn-id: trunk@19017 -
2011-09-07 18:33:22 +00:00
pierre
47f39748f6 Handle FileIndex/Line/Column for change_nedian in token buffer for generics
git-svn-id: trunk@19014 -
2011-09-07 16:27:33 +00:00
florian
bbed546f56 * make code and data size in status independent of target alu size
git-svn-id: trunk@19013 -
2011-09-07 16:04:38 +00:00
pierre
57f3f0a82b scanner unit:
treplaystack class: added change_endian boolean field
  treplaystack.create added achange_endian parameter
  tscannerfile class: added tokenbuf_change_endian boolean field
  readsizeint method: use tokenbuf_change_endian to maybe swap sizeint
  startreplaytokens method: added achange_endian field
  psub and ptype units:
  adapt to tscannerfile.startreplaytokens change above.

git-svn-id: trunk@19012 -
2011-09-07 13:13:15 +00:00
pierre
9073beffec Remember change_endian from ppufile for generictokenbuf reading
git-svn-id: trunk@19011 -
2011-09-07 13:04:55 +00:00
pierre
d3d91e40ab + Add procinfo options
git-svn-id: trunk@19010 -
2011-09-07 13:02:41 +00:00
paul
7e88628b02 compiler: clear vd_class option if it was added by _STATIC token (issue #0020119)
git-svn-id: trunk@19001 -
2011-09-07 02:22:03 +00:00
paul
389c033a29 compiler: fix private and protected members visibility check for nested records (issue #0018768)
git-svn-id: trunk@19000 -
2011-09-07 01:51:13 +00:00
paul
dd5aa12531 compiler: fix strict private visibility check for nested types (issue #0018767)
git-svn-id: trunk@18999 -
2011-09-07 01:32:43 +00:00
florian
8c2eb2fa36 + added forgotten unaligned call
git-svn-id: trunk@18998 -
2011-09-06 21:02:59 +00:00
florian
431da61f3a * cleaned up FreeLocalVerbosity usage
git-svn-id: trunk@18997 -
2011-09-06 21:02:20 +00:00
paul
7dd8a97487 compiler: allow "with" to search members in nested types properly
git-svn-id: trunk@18987 -
2011-09-06 10:23:57 +00:00
Jonas Maebe
852ae48cb7 * also use blx instead of bl for direct calls on ARMv5+, since the target
may be thumb(2) (mantis #19896)
  * don't conditionalize "blx <imm target>", because that's not a valid
    encoding

git-svn-id: trunk@18984 -
2011-09-05 20:33:15 +00:00
sergei
16859976da Mantis #19182, Delphi compatible tweaks:
* Allow properties of type interface to implement not just the same interface, but also any of its ancestors.
* Allow a single property to implement multiple interfaces.

git-svn-id: trunk@18983 -
2011-09-05 19:51:10 +00:00
pierre
df4388a47d + Added code to display 80-bit value on
system supporting only 64-bit double type.
  * Try to display reals in target format.
  * Corrected ibrecorddef handling if df_copied_def is set.

git-svn-id: trunk@18979 -
2011-09-05 16:16:25 +00:00
pierre
713f269ce2 * Change Field passing type of FreeLocalVerbosity parameter
to by value to avoid passing an unaligned pointer.
  * Adapt code calling FreeLocalVerbosity  to reset
    currrent_settings.pmessage to nil afterwards.

git-svn-id: trunk@18978 -
2011-09-05 12:52:37 +00:00
pierre
b526bb4dfa * Fix failures introduced by rev 18975
git-svn-id: trunk@18976 -
2011-09-05 07:51:22 +00:00
pierre
68d27263e7 Try to improve RecordTokenBuf with respect to PPU reading
git-svn-id: trunk@18975 -
2011-09-04 22:43:41 +00:00
florian
e9f2f3388e * use dwarf2 on avr-embedded by default because stabs is difficult due to name mangling issues
git-svn-id: trunk@18973 -
2011-09-04 19:37:26 +00:00
florian
f1f0cb033a * move ReplaceForbiddenChars to cpubase of avr so it can be used in dbgstabs as well
* tried to fix dbgstabs so that it doesn't emit illegal chars using ReplaceForbiddenChars, however, dbgstabs accesses symbol names quite often, so this failed

git-svn-id: trunk@18972 -
2011-09-04 19:36:43 +00:00
florian
7bceba2392 * since the last name mangling changes, gas writer for avr needs to replace more illegal characters
git-svn-id: trunk@18971 -
2011-09-04 18:56:47 +00:00
florian
645b6942d0 * version update
git-svn-id: trunk@18970 -
2011-09-04 18:53:12 +00:00
florian
0066a12974 * makes a_jmp_cond working
git-svn-id: trunk@18969 -
2011-09-04 18:47:08 +00:00
sergei
689d4b3ecc + Mantis #19651: Generate table of typed string constants which are initialized with resourcestrings, so they are updated when SetResourceStrings or SetUnitResourceStrings is called.
git-svn-id: trunk@18968 -
2011-09-04 16:01:26 +00:00
florian
a1381c1240 * some aint -> tcgint changes to avoid range check errors on systems with sizeof(aint)<4
git-svn-id: trunk@18966 -
2011-09-04 14:26:27 +00:00
florian
a1b7ec0999 * forgot again part of a commit, this belongs to r18962
git-svn-id: trunk@18963 -
2011-09-03 20:42:01 +00:00
florian
6d996bf832 * made a_call_ref of PowerPC generic, we need to allocate a register after all on risc platforms
git-svn-id: trunk@18962 -
2011-09-03 20:37:53 +00:00
florian
b17a9385e5 * use generic first_int_to_real 64 bit values on sparc
* compile part of softfpu into the system unit as consequence of using the generic first_int_to_real

git-svn-id: trunk@18961 -
2011-09-03 19:58:32 +00:00
florian
1de4d16eea - remove ncpucall for sparc, it has no use anymore
git-svn-id: trunk@18960 -
2011-09-03 19:46:13 +00:00
florian
7b72e21743 * forgotten part of r18958
git-svn-id: trunk@18959 -
2011-09-03 19:45:17 +00:00
florian
6211a83865 * write variable locations of 64 bit integer values on 32 bit targets correctly
* when transforming imag. register variable locations into real ones, take care of the register type

git-svn-id: trunk@18958 -
2011-09-03 19:43:50 +00:00
pierre
637a4671d9 Fix messages to tokenbuufer writing to zvoid problems with PPU
git-svn-id: trunk@18957 -
2011-09-03 17:38:53 +00:00
pierre
4c633c46ed Change mangling to avoid overlap and increase PPU version
git-svn-id: trunk@18946 -
2011-09-02 14:20:14 +00:00
paul
8a8db0a822 compiler: pass both modulename and filename to tmodule.create. extract modulename from filename if modulename is not passed (probably fix an error with asm/obj filename appeared after the namespace branch merge).
git-svn-id: trunk@18930 -
2011-09-01 01:50:53 +00:00
florian
0781ac1f82 + support for lpc1768 by David Welch
git-svn-id: trunk@18927 -
2011-08-31 20:17:23 +00:00
pierre
041f3d0222 Fix 20093 bug report
git-svn-id: trunk@18922 -
2011-08-31 16:20:40 +00:00
paul
3c5d642685 fix indenting (after the merge of namespaces branch)
git-svn-id: trunk@18920 -
2011-08-31 08:10:31 +00:00
sergei
2650326e6b * Call get_high_value_sym() instead of duplicating its functionality.
git-svn-id: trunk@18914 -
2011-08-30 08:44:04 +00:00
paul
4b24a58871 compiler: remove/hide few unused variables
git-svn-id: trunk@18912 -
2011-08-30 01:32:23 +00:00
paul
adceaf438c reintegrate paul/namespaces branch into trunk:
r18890 | paul | 2011-08-29 16:45:23 +0800 (Пн, 29 авг 2011) | 1 line

compiler: also parse dots in package name and in units which package contains (although package support is not implemented yet in FPC it can parse packages)
------------------------------------------------------------------------
r18886 | paul | 2011-08-29 10:46:13 +0800 (Пн, 29 авг 2011) | 1 line

compiler: replace "string" with ansistring where we concatenate substrings to prevent 255 chars limit overflow
------------------------------------------------------------------------
r18859 | paul | 2011-08-27 11:52:07 +0800 (Сб, 27 авг 2011) | 1 line

compiler: implement delphi like namespaces

git-svn-id: trunk@18911 -
2011-08-30 01:10:24 +00:00
paul
fbbbc1117d compiler: also parse dots in package name and in units which package contains (although package support is not implemented yet in FPC it can parse packages)
git-svn-id: branches/paul/namespaces@18890 -
2011-08-29 08:45:23 +00:00
paul
61f2335de9 compiler: replace "string" with ansistring where we concatenate substrings to prevent 255 chars limit overflow
git-svn-id: branches/paul/namespaces@18886 -
2011-08-29 02:46:13 +00:00
florian
df01d0209e * report code and data size for embedded targets
git-svn-id: trunk@18866 -
2011-08-27 22:03:40 +00:00
florian
1491d77c9d * avoid ugly space in compilation summary
git-svn-id: trunk@18865 -
2011-08-27 21:21:24 +00:00
florian
34b033ba72 + armv4t
* use armv4t and armv7m, in the makefiles instead of armv7 and cortexm3

git-svn-id: trunk@18863 -
2011-08-27 20:21:42 +00:00
florian
c95f7b1c2f * remove cpu type cortex m3 on arm, it is just an ARMv7-M
git-svn-id: trunk@18862 -
2011-08-27 19:26:16 +00:00
florian
7e537161c4 * allow %seg. register:offset without (...), resolves #20035
git-svn-id: trunk@18861 -
2011-08-27 15:41:39 +00:00
paul
de21de2024 compiler: implement delphi like namespaces
git-svn-id: branches/paul/namespaces@18859 -
2011-08-27 03:52:07 +00:00
florian
42c94d1b91 * controllerunit.inc is no longer used
git-svn-id: trunk@18852 -
2011-08-26 07:22:09 +00:00
florian
f629e3b4fb * new version
* title name is ppcarm now

git-svn-id: trunk@18851 -
2011-08-26 07:21:40 +00:00
florian
a08dfdf803 o slightly modified patch by John Clymer:
* converts the embedded information into controller specific records (arm and avr)
  * new cpu-specific units for several Stellaris (Fury and Tempest class) targets, 
  + STM32F103RB
  - old Stellaris unit has been removed

git-svn-id: trunk@18848 -
2011-08-25 21:46:26 +00:00
florian
6005ec2c91 + a_jmp_cond implemented
git-svn-id: trunk@18840 -
2011-08-25 18:27:33 +00:00
florian
cf0d808708 + avr assemblers do not convert automatically cond. branches with too large jump distances into an unconditional branch and a reverse condition branch, so fpc does this now
git-svn-id: trunk@18837 -
2011-08-24 22:29:50 +00:00
paul
8309809a0d compiler: use try_consume_unitsym for except variable parse. this is needed to reduce maintenance cost for later unit identifier search changes
git-svn-id: trunk@18826 -
2011-08-24 10:54:17 +00:00
florian
4c403baa85 * new lpi version
git-svn-id: trunk@18805 -
2011-08-21 19:56:40 +00:00
Jonas Maebe
1bb9a3b3d7 * fixed generic code for subtracting one set from another if both are
in registers, because the left set could be overwritten before its
    last use

git-svn-id: trunk@18792 -
2011-08-20 20:36:13 +00:00
florian
46cc0209de * make use of mulps/mulpd and haddps/haddpd/hsubpd/hsubps to optimze x*x+y*y and x*x-y*y where x and y might be single or double
git-svn-id: trunk@18790 -
2011-08-20 12:34:37 +00:00
florian
13ac5d185f * fix add_move_instruction for sse moves
git-svn-id: trunk@18789 -
2011-08-20 12:30:47 +00:00
florian
ca1f33aae1 * extended do_spill_replace with some sse instructions
git-svn-id: trunk@18788 -
2011-08-20 12:29:41 +00:00
florian
e8dafe4dde * fixed change information for a lot of sse instructions
git-svn-id: trunk@18787 -
2011-08-20 12:28:49 +00:00
florian
2f4fcf7dee * avoid range check error
git-svn-id: trunk@18786 -
2011-08-20 12:25:58 +00:00
florian
da9d0d24e8 * update of german error message files by Karl-Michael Schindler, resolves #20021
git-svn-id: trunk@18457 -
2011-08-20 08:01:26 +00:00
florian
68dd23b5a2 * write proper register locations when doing ssa, resolves #7552
git-svn-id: trunk@18278 -
2011-08-19 22:06:52 +00:00
florian
c855c7a0aa * unified handling of comparison of constant and expression with disjunct ranges of values
* warn if such an expression is encountered
* don't optimize the expression if it has side effects, resolves #17838

git-svn-id: trunk@18275 -
2011-08-19 18:47:37 +00:00
florian
c011949765 + iretq for x86_64
git-svn-id: trunk@18273 -
2011-08-19 12:56:26 +00:00
Jonas Maebe
008e0a1317 * reverted r18262 and fixed tcgint-related range check errors correctly at
the caller sides of that routine

git-svn-id: trunk@18272 -
2011-08-19 09:45:02 +00:00
florian
4f6a803c29 + might_have_sideeffects, make use of it when optimizing x*x into sqr(x)
git-svn-id: trunk@18271 -
2011-08-19 09:26:40 +00:00
florian
860d753055 * treat registers (and identifiers of register parameter) as normal identifiers when parsing record fields in intel assembler, resolves #19555
git-svn-id: trunk@18268 -
2011-08-18 21:58:30 +00:00
florian
cf874a3465 * give a more understandable error message if a procedure "result" is tried to be a
ssigned, resolves #19122 (and breaks hopefully nothing procvar related)

git-svn-id: trunk@18267 -
2011-08-18 21:10:05 +00:00
Jonas Maebe
baf2a3f1fb * fixed copy/paste error that didn't disable default inline support when
switching from a mode that has it to a mode that doesn't have it (which
    meant that all modes had it, since the default FPC mode has it)
  * added default inline support to mode macpas to minimize breaking existing
    code due to this switch (only TP and ISO modes now don't have it by
    default)

git-svn-id: trunk@18265 -
2011-08-18 18:12:09 +00:00
Jonas Maebe
8c7f1e1013 * only transform multiplication nodes to sqr, not any kind of addnode
(fix for 18252)

git-svn-id: trunk@18263 -
2011-08-18 12:47:41 +00:00
Jonas Maebe
3abfec476a * fixed range checke errors after aint->tcgint change
git-svn-id: trunk@18262 -
2011-08-18 11:53:34 +00:00
Jonas Maebe
3b9e1a4398 * fixed wrong class cast in r18226
git-svn-id: trunk@18261 -
2011-08-18 11:53:02 +00:00
Jonas Maebe
b5fc32750b * check whether both left and right are reals rather than twice whether left
is real before transforming a multiply into an sqr operation (fixes make
    cycle after r18252, don't know where or even how it caused a wrong
    optimization)

git-svn-id: trunk@18257 -
2011-08-18 09:12:13 +00:00
Jonas Maebe
6748a9a238 * fixed forcing setelementn on the correct side in add nodes
(pass_left_right() can switch the sides, so putting it in the
     correct location before calling that method is useless)

git-svn-id: trunk@18254 -
2011-08-17 20:12:47 +00:00
florian
275c6092e5 * avoid range check errors for empty ansistrings written/read from ppus
git-svn-id: trunk@18253 -
2011-08-17 19:01:03 +00:00
florian
e796a878ca * convert <real x>*<real x> into sqr(<real x>), it might reduces register
pressure and/or memory accesses without a drawback

git-svn-id: trunk@18252 -
2011-08-17 16:00:16 +00:00
florian
87696a4b70 * cr*, dr*, tr* registers are 64 bit on x86-64
git-svn-id: trunk@18243 -
2011-08-17 11:42:11 +00:00
florian
79a96ab287 + ttypesym.prettyname
* write names of specialization type syms more pretty

git-svn-id: trunk@18241 -
2011-08-17 11:10:00 +00:00
florian
e2f21c0a56 * version update
git-svn-id: trunk@18239 -
2011-08-17 10:57:32 +00:00
florian
ffde44ea6e * forgotten part of r18233
git-svn-id: trunk@18235 -
2011-08-16 22:44:50 +00:00
florian
d6ad7721e6 * patch by Jeppe Johansen to avoid corruption of frame/stack pointer by pre/post indexed operations, resolves #19679
git-svn-id: trunk@18234 -
2011-08-16 22:43:30 +00:00
florian
2eb39c8843 * patch by Jeppe Johansen to support jumptable generation for case nodes on arm/thumb-2, resolves #19502
git-svn-id: trunk@18233 -
2011-08-16 22:39:00 +00:00
florian
1e1c45c665 * references containing a symbol must be virtually always pc relative on arm
git-svn-id: trunk@18232 -
2011-08-16 22:28:30 +00:00
florian
8bc94610c7 + tai_stab.create_ansistr
* write vmt info using create_ansistr, resolves #20003
* replaced move/getmem sequences in dbgstabs.pas by create_ansistr

git-svn-id: trunk@18230 -
2011-08-16 20:27:54 +00:00
florian
84b8733945 - remove accidently commited working directory entry
git-svn-id: trunk@18229 -
2011-08-16 20:18:22 +00:00
pierre
1c2a5f9819 + Update all Makefile's modified by
change in utils/fpcm/fpcmake.ini in prevous commit.

  Adapt also other files to that change:

  * compiler/globals.pas: Replace $FPCTARGET by os_string if
  tf_use_8_3 flag is set for target_info also.

  * tests/Makefile.fpc: Modify TEST_TARGETSUFFIX in the same way
  as TARGETSUFFIX was modified in previous commit.

  * tests/utils/dotest.pp:
    + New variable UseOSOnly, set to true if only target OS name
    should be used for subdirectories.

git-svn-id: trunk@18228 -
2011-08-16 20:10:19 +00:00
florian
2f58065873 * don't warn about unsed symbols in generic procedures/methods, resolves #18907
git-svn-id: trunk@18226 -
2011-08-16 19:48:36 +00:00
florian
8308b46a94 + support for assembler instructions with four operands
+ support for insertq, resolves #19910

git-svn-id: trunk@18206 -
2011-08-14 16:46:35 +00:00
florian
58d1a66cd0 * set max_operands to 4 on x86 to be prepared for avx and to be able to fix #19910,
- memory usage of a compiler compilation increases by approx. 2 per cent due to this
  - actually docs say avx has operations with 5 parameter, however I were not able to find
    an instruction having 5 operands

git-svn-id: trunk@18202 -
2011-08-14 09:09:57 +00:00
florian
bc0def5e01 * optimized memory layout of some often used classes
git-svn-id: trunk@18201 -
2011-08-13 22:19:45 +00:00
florian
ff5f311b34 - removed no more used constants
git-svn-id: trunk@18199 -
2011-08-13 20:54:01 +00:00
florian
8b58d69576 * accept undefineddef (generic parameter) as parameter for assigned, resolves #19974
git-svn-id: trunk@18183 -
2011-08-12 20:33:22 +00:00
sergei
bbae63a4f2 * Check that a single interface is only delegated to a single property within a class.
* Disallow simultaneous use of method resolution and delegation for the same interface. An interface with method resolution must be implemented directly. This is Delphi compatible and resolves #18058.

git-svn-id: trunk@18179 -
2011-08-12 14:42:30 +00:00
Jonas Maebe
d8a2c47c75 * fixed calling inherited message handlers after r18162
git-svn-id: trunk@18173 -
2011-08-11 20:08:43 +00:00
sergei
392dafd175 * Another attempt to align section raw data size in COFF headers. Without this, image modification WinAPIs like BeginUpdateResource/EndUpdateResource typically corrupt the image. Resolves #16852 (at least partially).
git-svn-id: trunk@18172 -
2011-08-11 16:42:24 +00:00
Jonas Maebe
48695a7705 * when removing unnecessary 64 bit widenings, modify both the resultdef
and the totypedef of typeconvnodes because the totypedef is used for
    equality comparisons in the node cse

git-svn-id: trunk@18171 -
2011-08-11 16:05:11 +00:00
sergei
25bf0012f2 * When the interface method mapping is present, being unable to find the implementing procedure using the mapped name is a error condition. No attempt to find implementing procedure using symbol name should be made in this case. Resolves #19591.
git-svn-id: trunk@18166 -
2011-08-10 21:33:39 +00:00
Jonas Maebe
9195506c56 * make sure that anonymous inherited calls only call through to the
overridden method, rather than to any method that can accept similar
    parameters as the current one (Delphi-compatible, and corresponds to
    what is described in our documentation)
  * do not flag "inherited" call nodes that are not "anonymous inherited"
    calls using the cnf_anon_inherited flag

git-svn-id: trunk@18162 -
2011-08-10 17:26:19 +00:00
Jonas Maebe
4de8f53f03 * prevent exception when the compiler is compiled with -CR and we find a
non-procsym during overload resolving

git-svn-id: trunk@18161 -
2011-08-10 15:41:00 +00:00
pierre
bafbbe9f0f * Fix bug report 7210
git-svn-id: trunk@18154 -
2011-08-09 15:52:03 +00:00
pierre
c43b91ef15 Fix infinite loop in PUSH/POP directives
git-svn-id: trunk@18141 -
2011-08-07 20:44:22 +00:00
florian
562961fd42 * catch EOSError, EIOError and IOutOfMemory exceptions inside the compiler
so a proper error message is written (resolves #19871), 
  EOutOfMemory is not handle perfectly because it could be that the exception
  handling requires again a memory allocation

git-svn-id: trunk@18132 -
2011-08-07 09:18:07 +00:00
florian
e6e6b98dd8 * stellaris => ct_stellaris
git-svn-id: trunk@18125 -
2011-08-06 19:56:01 +00:00
Jonas Maebe
20c3809c3a * when a constant Objective-C class reference is used for anything but
the methodpointer of a call, transform it into a call to the classclass
    method because otherwise it can be used before the first call to any
    method of the class (such as in the packages/cocoaint/src/IvarSize test)
    and this can result in crashes

git-svn-id: trunk@18124 -
2011-08-06 19:49:59 +00:00
sergei
fec5dde5b6 * Fix handling of Windows WideString typed constants, resolves #15842 and completes the related #14308:
* Do not initialize unused symbols, because finalization code is not generated for them either.
  * Always initialize/finalize such constants, even if they are declared in {$J-} state and cannot be modified by user code.

git-svn-id: trunk@18121 -
2011-08-06 18:11:39 +00:00
Jonas Maebe
0398ff6bf5 * also save/restore the size of the padding of record/objectsymtables
* when creating a child class, ignore the padding added to the parent
    in case of objcclasses (gcc/clang also do that; maybe the same
    has to be done for cppclass as well)
  -> objcclass layouts seem to finally completely match the gcc ones

git-svn-id: trunk@18119 -
2011-08-06 18:01:39 +00:00
Jonas Maebe
1c11f6c8b7 + tppufile.putasizeint()
* save/restore tabstractrecordsymtable.datasize as asizeint instead of
    aint (not ppu version change because they are the same on all
    production targets)
  * add shortint() typecasts when reading/writing fieldalignment/
    recordalignment fields

git-svn-id: trunk@18118 -
2011-08-06 17:18:21 +00:00
Jonas Maebe
13598f1b5f * update of ppudump for r18114
git-svn-id: trunk@18117 -
2011-08-06 17:14:22 +00:00
Jonas Maebe
86b088f398 * store the current field alignment of tobjectdefs that use C_alignment,
because it influences the offset at which the next field in child classes
    should be placed in case it also uses C_alignment
  * also pad objectdefs based on the packrecords setting (Delphi-compatible)
  -> field offset calculation in objcclasses is now correct if they are
     compiled with {$packrecords c}

git-svn-id: trunk@18114 -
2011-08-06 13:11:23 +00:00
sergei
0231863fce + Added missing PMULLD instruction, part of Mantis #19910
git-svn-id: trunk@18106 -
2011-08-06 06:59:33 +00:00
Jonas Maebe
0d4d1a2ac8 * fixed two places where after r1913 valid_for_assign() didn't immediately
exit anymore if an error was detected

git-svn-id: trunk@18098 -
2011-08-04 22:44:00 +00:00
marco
043e9b2ec2 * Trunk version to 2.7.1
git-svn-id: trunk@18075 -
2011-08-03 13:59:33 +00:00
marco
39d7bb511d * Regenned all makefiles before 2.6.x branching.
git-svn-id: trunk@18073 -
2011-08-03 13:41:52 +00:00
Jonas Maebe
ec8c7b4888 + when compiling for Darwin/ARM, pass the subarchitecture to the linker.
The old linker option to accept object files from all subarchitecture
    types no longer works.
  + support for subarchitectures in fcl-res/fpcres

git-svn-id: trunk@18070 -
2011-08-02 20:41:39 +00:00
Jonas Maebe
da056da20f + added armv7 identifier (no special code generation, but required to
link against Xcode 3.2.6/4-generated code for ARMv7 -- use -Cparmv7,
    but note that you also have to compile the RTL and all other units with
    this option for them to be linkable against other ARMv7 code when using
    those tools)

git-svn-id: trunk@18069 -
2011-08-02 20:36:43 +00:00
Jonas Maebe
d7c1967351 * fixed switched around lists for read-only/read-write typed consts
git-svn-id: trunk@18068 -
2011-08-02 20:32:48 +00:00
Jonas Maebe
da3fb5de0f * prevent double freeing temps containing int64-sized parameters
(mantis #19700)

git-svn-id: trunk@18053 -
2011-08-01 17:12:45 +00:00
sergei
c9f92c0323 * Excluded oso_executable from attributes of user sections. User sections may currently be specified only for variables and typed consts, which are not executable.
* Fixed TLS directory size written to PE header when cross-compiling. It must be the value for target, not for host.

git-svn-id: trunk@18024 -
2011-07-27 14:10:22 +00:00
Jonas Maebe
cb1da8de85 * fixed getcopy order for ttempcreatenode in case it has tempinitcode
(this tempinitcode contains a reference to the tempcreatenode itself
     -> hookoncopy must be set before copying the tempinitnode)

git-svn-id: trunk@18016 -
2011-07-18 00:38:47 +00:00
florian
95ad75c7bf * hack to set stack top for atmega128
* default output for avr-embedded is .hex

git-svn-id: trunk@18015 -
2011-07-17 20:46:05 +00:00
florian
57613d1bb9 + add avr-embedded to systems_embedded
git-svn-id: trunk@18014 -
2011-07-17 20:44:43 +00:00
florian
5c9e0a7a1b + V is avr help screen option
git-svn-id: trunk@18013 -
2011-07-17 20:44:10 +00:00
florian
57cdf34a6b * put -Wpxxxx switch on the help screen
git-svn-id: trunk@18012 -
2011-07-17 20:42:56 +00:00
florian
ecb04d1620 * use tcgint instead of aint in ttempcreatenode
git-svn-id: trunk@18011 -
2011-07-17 20:10:05 +00:00
florian
98d3007580 + support to parse hi8/lo8(...) in inline assembler
git-svn-id: trunk@18009 -
2011-07-17 16:26:57 +00:00
florian
04e2321724 * avr cpuflags renames
+ cpuflagsstr

git-svn-id: trunk@18007 -
2011-07-17 08:55:16 +00:00
sergei
ae4cdf25f8 + aggas.pas: Write section attributes when long section names are used for smart linking (enabled for win32 and win64). It is needed because GAS does not understand that '.text.something' is part of '.text' and assigns default attributes (writable data) to all such sections, which is not the desired behavior.
git-svn-id: trunk@17989 -
2011-07-13 23:45:28 +00:00
florian
b0cef1693a * compilation of system unit was broken
git-svn-id: trunk@17972 -
2011-07-10 21:03:55 +00:00
florian
4f08d148ea * unique internal errors
git-svn-id: trunk@17970 -
2011-07-10 20:54:48 +00:00
sergei
6a2e87121b * ogcoff.pas: sort all objsections having '$' in the name, not just .idata$*. This is a documented PECOFF feature and it is required for tls callback stuff to link correctly regardless of the order of declarations in source files.
git-svn-id: trunk@17968 -
2011-07-10 12:24:35 +00:00
pierre
5a2d6c0429 Fix constant pointer reading for 64 bit CPU
git-svn-id: trunk@17962 -
2011-07-08 16:28:24 +00:00
pierre
0ca127b97e * Fix length size for non-short string types
git-svn-id: trunk@17961 -
2011-07-08 16:21:28 +00:00
pierre
f23b265ce1 + Add global testppudump rule
git-svn-id: trunk@17960 -
2011-07-08 16:01:28 +00:00
pierre
efb0193cb2 Add ./utils/ppudump prerequisite to log-ppu files
git-svn-id: trunk@17959 -
2011-07-08 15:57:27 +00:00
pierre
d4372a7ac5 * Add ppudump testing rules
git-svn-id: trunk@17958 -
2011-07-08 15:47:27 +00:00
pierre
b94cdd4881 * Handled real constants of different size
git-svn-id: trunk@17957 -
2011-07-08 15:39:04 +00:00
pierre
322e3f8a16 * More fixes for ppudump use
git-svn-id: trunk@17956 -
2011-07-08 15:38:14 +00:00
pierre
3017132268 * Remove triple sources
git-svn-id: trunk@17955 -
2011-07-08 15:37:23 +00:00
pierre
2f7a57fcab * Use extended for bestreal type if GENERIC_CPU is defined
git-svn-id: trunk@17954 -
2011-07-08 15:36:29 +00:00
pierre
eb4798238d * Display hexadecimal values of wide strings
* Set has_errors on more locations
  + Add has_more_infos boolean
  * Add -M option to set ExitCode to 2 if more info is available.
  * Support constnil type.

git-svn-id: trunk@17953 -
2011-07-08 10:32:28 +00:00
pierre
dd96bfb3dd * fix ppu dumping with ppudump utility for cross CPU
git-svn-id: trunk@17952 -
2011-07-08 08:57:24 +00:00
sergei
5d5ddbbe3e * Revert rounding section data size, it should be done in a more sophisticated way
git-svn-id: trunk@17950 -
2011-07-07 11:34:57 +00:00
sergei
2d96c34b06 * Improvements to PE executable output:
* Clear bits in section flags, that are only valid for object files
  * Round section datasize up to filealignment (PECOFF v8 documentation requires this)
  * Zero datapos and datasize for all sections w/o data, not just for .bss
  * Produce IMPORT_ADDRESS_TABLE directory in exe header
  * Entirely smartlink away unused DLLs (these used to have two terminating thunks left)

git-svn-id: trunk@17949 -
2011-07-06 20:55:57 +00:00
pierre
cff85bdb3b * Rename ag386nsm.pas unit source to agx86nsm.pas
git-svn-id: trunk@17933 -
2011-07-04 09:13:55 +00:00
pierre
f6ab12d677 * Move ag386nsm.pas to x86 directory
git-svn-id: trunk@17932 -
2011-07-04 09:08:54 +00:00
pierre
54fc0bf694 Add missing x86_64 -A options
git-svn-id: trunk@17931 -
2011-07-04 08:59:06 +00:00
pierre
bded762fef Add missing x86_64 -A options
git-svn-id: trunk@17930 -
2011-07-04 08:58:46 +00:00
pierre
d1a6ef9cd9 * Restrict use of postw32 external utility to
win32/wdosx target systems.

git-svn-id: trunk@17929 -
2011-07-04 07:36:47 +00:00
pierre
1a468eebc7 * Fix insdatx86 rule for Windows Makefiles
Also include regeneration of register include files.

git-svn-id: trunk@17928 -
2011-07-04 07:35:24 +00:00
pierre
cdd4b0297a * Show usage and halt with error if unknown parameters are given
at command line.
  * Also generate NASM register files for x86_64 (for support of NASM
    assembler for x86_64 CPU, to be committed later).

git-svn-id: trunk@17927 -
2011-07-04 07:33:00 +00:00
pierre
cfdc7c861d * Use public/global name 'name' section 'section' without semicolon for Windows TLS support
git-svn-id: trunk@17909 -
2011-07-01 19:29:38 +00:00
pierre
372b16b2e6 * Look for __FPC_tls_callbacks, should be reset to nil for DLLs, not yet done
git-svn-id: trunk@17908 -
2011-07-01 19:28:32 +00:00
pierre
4ad2707674 Windows TLS callback code testable by using -dTEST_TLS_DIRECTORY
git-svn-id: trunk@17906 -
2011-07-01 14:42:39 +00:00
pierre
92c92e1945 * Add oso_keep option to threadvar section if FPC_USE_TLS_DIRECTORY is set
git-svn-id: trunk@17905 -
2011-07-01 14:40:02 +00:00
pierre
eb90591ea9 TLS directory requires some labels in specific sections
I implemented this by allowing '.section sec_name mangled_name'
   for name 'xxxx'; specifier in tstaticvarsym.set_mangledname

git-svn-id: trunk@17904 -
2011-07-01 14:36:44 +00:00
pierre
30feeff3c2 + TlsDirectory handling code
git-svn-id: trunk@17903 -
2011-07-01 14:30:32 +00:00
pierre
bcb2bb9e5b Add removal of braces for parameters in linker script
git-svn-id: trunk@17902 -
2011-07-01 14:28:18 +00:00
pierre
c611c91cef Provide _tls_index in script
git-svn-id: trunk@17901 -
2011-07-01 14:27:33 +00:00
pierre
a45b29911c * Handle vo_has_section for constants
git-svn-id: trunk@17900 -
2011-07-01 14:26:21 +00:00
pierre
e6b5ce8557 * Use vo_has_section to test for user name section in insertbssdata
git-svn-id: trunk@17899 -
2011-07-01 14:24:56 +00:00
pierre
b3e1ba70e9 * Avoid warning about missing field for AVR
git-svn-id: trunk@17896 -
2011-07-01 11:59:31 +00:00
pierre
af098d08d5 * Avoid pointer to signed integer warning
git-svn-id: trunk@17895 -
2011-07-01 11:55:05 +00:00
pierre
37b98917e0 * Handle invalid register correctly
git-svn-id: trunk@17894 -
2011-07-01 11:52:37 +00:00
pierre
3cc2b5e97b + Added default dynamic linker for mips CPU
git-svn-id: trunk@17889 -
2011-07-01 07:37:05 +00:00
tom_at_work
619afa83ad Use NOCPUDEF for all ppu* compilations
git-svn-id: trunk@17888 -
2011-07-01 07:30:16 +00:00
florian
570f3c4b39 * merges recent class helper fixes by Sven Barth
git-svn-id: trunk@17887 -
2011-06-30 18:54:46 +00:00
pierre
2909e43043 * Make TAICPU class child of TAI_CPU_ABSTRACT_SYM instead of TAI_CPU_ABSTRACT
git-svn-id: trunk@17883 -
2011-06-30 13:19:48 +00:00
pierre
f328836cad + Add checks for internal linker script
git-svn-id: trunk@17882 -
2011-06-30 13:16:04 +00:00
pierre
0227fbad7d * Fix some internal linker script lines
git-svn-id: trunk@17881 -
2011-06-30 13:02:31 +00:00
pierre
63f38e6c03 * Fix make_dllmangledname: Use computed dllprefix instead of dllname
git-svn-id: trunk@17879 -
2011-06-29 20:34:40 +00:00