Commit Graph

11084 Commits

Author SHA1 Message Date
Jonas Maebe
dd55947b4b - disabled jump tables for x86_64, because they cause various kinds of
crashes with dynamic libraries (mantis #13628 and related bugs)

git-svn-id: trunk@13073 -
2009-05-01 14:54:38 +00:00
Jonas Maebe
7885f6c892 * give a generic "type mismatch" error if copy() is called with less than
3 parameters and none of the valid cases apply (mantis #13625)

git-svn-id: trunk@13070 -
2009-05-01 11:40:02 +00:00
Jonas Maebe
844e0d04ba * to determine the alignment of arrays of orddef, enumdef and floatdef,
use the alignment of these elements rather than their size (fixes
    alignment of arrays of int64/qword/double on darwin/i386 and darwin/arm)

git-svn-id: trunk@13068 -
2009-05-01 11:15:31 +00:00
Jonas Maebe
2635212ebc * fixed warnings and removed unused "Current_moduleIndex" global variable
(patch by Alexander S. Klenin, mantis #13618)

git-svn-id: trunk@13063 -
2009-04-30 15:32:28 +00:00
Jonas Maebe
79c70c52a7 * store/restore taddnode.resultrealdef to/from the ppufiles, and also
copy/compare it when copying/comparing taddnodes (necessary for inlined
    procedures, mantis #13596)

git-svn-id: trunk@13054 -
2009-04-27 21:03:11 +00:00
Jonas Maebe
5b08047d1c * allow exlicit type conversions from class/interface to enums in Delphi
mode (mantis #11859)
  * cleaned up some superfluous "eq=te_incompatible" checks (probably from
    copy/pasting conditions from elsewhere)

git-svn-id: trunk@13050 -
2009-04-26 20:41:24 +00:00
Jonas Maebe
58f4f7829c * don't replace the vmt entries of unused published virtual methods with
references to FPC_ABSTRACTERROR when using -Owoptvmts, since these can
    also be called via rtti

git-svn-id: trunk@13045 -
2009-04-26 09:42:33 +00:00
florian
80c0f33c0e * patch by Sergei Gorelkin: fixes compilation with -dEXTDEBUG
git-svn-id: trunk@13043 -
2009-04-25 20:02:08 +00:00
Jonas Maebe
e2b8792bd3 * do not initialize global reference-counted variables in the automatic
initialization code of units/programs, because they are already
    zero and initializing them explicitly is Delphi-incompatible
    (mantis #13345)

git-svn-id: trunk@13042 -
2009-04-25 18:53:58 +00:00
Jonas Maebe
ca132e203f * treat typecast(register) the same as typecast([register]) in assembler
expressions (for Delphi compatibility, mantis #9327)

git-svn-id: trunk@13040 -
2009-04-25 15:37:38 +00:00
Jonas Maebe
dbeb3e060f * fixed internalerror(2007120903) when using -Cfsse2 in case an unsigned
32 bit subrange type with high(subrange_type) <= high(longint) is
    converted to a float

git-svn-id: trunk@13037 -
2009-04-25 11:40:02 +00:00
Jonas Maebe
045ae3ab69 o fixed r13033:
* test now tests both ansistring and widestring constants, instead of only
     ansistring
   * fixed writing of widestring constants to ppu file
   * fixed setting length of read widestring constants (don't only set maxlen)
   * handle cross-endian reading of widestring constants

git-svn-id: trunk@13034 -
2009-04-24 22:29:05 +00:00
Jonas Maebe
37a2cff8fb * fixed loading widestring constsym values from ppu files (mantis #13583)
* null-terminate loaded ansistring/resourcestring constants from ppu files

git-svn-id: trunk@13033 -
2009-04-24 21:36:01 +00:00
Jonas Maebe
8de8d4c29b * don't call FPC_CHECKPOINTER for references built from a LOC_CONSTANT
(mantis #13522)

git-svn-id: trunk@13031 -
2009-04-24 13:08:39 +00:00
Jonas Maebe
a6f20cdba9 * align the stack pointer to alignment.localalignmax, fixes crashes on
ARM EABI systems because of a missing 8 byte alignment (mantis
    #11595, #13391 and #13454)

git-svn-id: trunk@13030 -
2009-04-24 12:35:26 +00:00
Jonas Maebe
10158da60e * give an error when trying to use the offset of a non-byte-aligned field
of a bitpacked record in assembler code
  * convert the offsets of byte-aligned fields of bitpacked records from bits
    to bytes (mantis #13563)

git-svn-id: trunk@13027 -
2009-04-23 17:27:44 +00:00
Jonas Maebe
2465126f60 * also check that nested procedures don't have any nested procedures
of their own that are marked as inline, instead of only doing so
    for non-nested procedures (mantis #13553)

git-svn-id: trunk@13025 -
2009-04-22 15:12:42 +00:00
Jonas Maebe
02b14b2d5d * don't free deref info after using it, because it may be needed again
again later (in case of recompilations with circular unit references)
    (mantis #13323)

git-svn-id: trunk@13024 -
2009-04-22 14:52:27 +00:00
Jonas Maebe
a4bf91001e * fixed location_free() for locations consisting of multiple
physical registers
  * free the physical return registers at the caller side for 64 bit
    systems
  * make sure that we do not double-free registers in case a return
    value is not used (mantis #13536)

git-svn-id: trunk@13023 -
2009-04-20 18:57:49 +00:00
Jonas Maebe
626a723f8c * in {$h+} mode, always treat string constants as if they were ansistrings
when determining the result of string concatenations (mantis #13456)

git-svn-id: trunk@13004 -
2009-04-05 17:26:38 +00:00
Jonas Maebe
b2607e0d83 * refactored append_entry(), so that the code to append a single
attribute is available via the new append_attribute() method
    (to enable easily adding extra attributes)
  * write the definitions of methods as child entries of the
    objectdef, instead of in the global scope
  * only write DW_AT_calling_convention and DW_AT_external attributes
    if their value is different from the DWARF default one
  + write DW_AT_virtuality and DW_AT_vtable_elem_location attributes
    for virtual methods
  * write the debug info for the hidden "self" parameter before all
    other parameters and mark it as "artificial", because that is
    how GDB distinguishes regular methods from static methods

git-svn-id: trunk@13003 -
2009-04-05 16:12:10 +00:00
Jonas Maebe
b45482e979 + provisional DW_CC_GNU_borland_fastcall_i386 constant to identify
Borland's i386 calling convention (its value may still change)
* specify the calling convention of each procedure in the DWARF info
* don't add the function result twice or even thrice to the debug
  info, and don't add it at all to the parameter lists (even if it's
  a hidden parameter, gdb will automatically add it according to the
  ABI rules when calling the function)
-> calling "register" functions/procedures works with my experimental
   gdb patch (methods not yet tested, and probably won't work yet)

git-svn-id: trunk@12995 -
2009-04-02 22:21:27 +00:00
Jonas Maebe
40247d2d87 * give an error when the typeinfo() function is called for an enumeration
whose base is not 0, or that has jumps in its value range (manits #9551)

git-svn-id: trunk@12960 -
2009-03-22 20:54:49 +00:00
Jonas Maebe
624a7be9b1 * fixed internal error when a subscripted object is used in a property
(mantis #12756)

git-svn-id: trunk@12956 -
2009-03-22 16:21:06 +00:00
Jonas Maebe
5cf4ab7642 * always initialize/finalize global refcounted variables in units, also
when they are not used in the unit where they are defined (since they
    may be used elsewhere, discovered while analyzing mantis #13345)

git-svn-id: trunk@12954 -
2009-03-22 15:41:13 +00:00
joost
d4c2a35c75 * Use ExeSearch instead of FileSearch to find compiler executable
git-svn-id: trunk@12948 -
2009-03-22 10:03:03 +00:00
Jonas Maebe
a7e02c7948 * check validity of calling conventions specified using {$calling x}
(previously, this was only checked for calling conventions specified
     as a procedure directive)

git-svn-id: trunk@12944 -
2009-03-21 21:21:45 +00:00
Jonas Maebe
d61a09debf * assigment -> assignment in explanation of warning about uninitialized
variables

git-svn-id: trunk@12940 -
2009-03-21 16:15:20 +00:00
Jonas Maebe
36668a6ec5 * don't emit "include file search paths" for stabs since they don't exist
(and hence those directories were interpreted as source files themselves)
  + added -gostabsabsincludes option to make the compiler store absolute
    paths to include files in Stabs debugging information (since no
    search paths are used). This is not the default because it breaks
    when only the base path of an entire source tree changes (relative
    paths, which are the previous behaviour and the current default,
    work fine, but the absolute paths don't anymore; this can happen
    with shared network drives, and possibly with distros shipping
    external .dbg files)

git-svn-id: trunk@12933 -
2009-03-20 18:35:17 +00:00
Jonas Maebe
bf7c9361f6 * delay effect of {$calling x} until switches are flushed (mantis #12985)
git-svn-id: trunk@12932 -
2009-03-20 16:27:56 +00:00
Jonas Maebe
c04e9e36f7 * set alignment for 0-byte sized entities to 1 instead of to 0
git-svn-id: trunk@12931 -
2009-03-20 16:26:06 +00:00
Jonas Maebe
c548ce30ba * replaced old DWARF CFI section notation for Darwin with new one (more
changes are required before it works for Darwin)

git-svn-id: trunk@12920 -
2009-03-19 14:22:26 +00:00
Jonas Maebe
d8aa5a1ff8 * set the node complexity of realconstn to 1 instead of the default (maximum)
git-svn-id: trunk@12919 -
2009-03-19 14:20:51 +00:00
Jonas Maebe
e9dedb7377 * disabled generation of DW_AT_low_pc/DW_AT_high_pc compilation unit
information for Win32, as it doesn't work there due to the way we
    name sections on that platform
   (http://lists.freepascal.org/lists/fpc-devel/2009-March/016591.html)

git-svn-id: trunk@12918 -
2009-03-19 10:02:09 +00:00
Jonas Maebe
41dcda600c * disabled the internal linker when using DWARF debug info (it doesn't
work correctly with DWARF)
  * only force the internal linker for STABS when generating relocatable
    output (rather than for all debugging formats)

git-svn-id: trunk@12917 -
2009-03-19 09:01:29 +00:00
Jonas Maebe
630aa5c493 * do not use voidtype for temporary parameter/result locations when
inlining, because that results in alignment settings of "0"
    (voidtype.savesize = 0 -> size2align(0) = 0), which is interpreted
    by the code generators as unaligned (and is actually even invalid
    nowadays). This caused errors on NDS when writing to memory mapped
    I/O devices (mantis #13343)

git-svn-id: trunk@12916 -
2009-03-18 22:25:06 +00:00
Jonas Maebe
9ab03e72f3 * mark class and interface parameters as pfAddress (further fix for
mantis #12038) + test

git-svn-id: trunk@12913 -
2009-03-17 20:37:11 +00:00
Jonas Maebe
c90ecac667 - disabled CFI again for Darwin, it doesn't work there yet
git-svn-id: trunk@12911 -
2009-03-17 19:03:33 +00:00
Jonas Maebe
173ca78a68 * removed superfluous "end of debug info" marker (zero-byte), about
which objdump complained

git-svn-id: trunk@12910 -
2009-03-17 18:42:00 +00:00
Jonas Maebe
c9af7d6476 * added tf_dwarf_only_local_labels for Windows (should make DWARF usable
on Windows, although there are still some warnings)

git-svn-id: trunk@12909 -
2009-03-17 17:07:17 +00:00
florian
b4953e3a50 * ignore $CONTROLLERTPYES marco on non-AVR/ARM platforms in msg files
git-svn-id: trunk@12908 -
2009-03-17 13:55:52 +00:00
florian
6e8a6790d1 + FPC_ARMEB and CPUARMEB similiar to FPC_ARMEL and CPUARMEL
git-svn-id: trunk@12907 -
2009-03-17 13:43:24 +00:00
Marc Weustink
0efd37a4c9 * enabled generation of dwarf frames for non x64 targets when dwarf debug info is requested
* renamed al_dwarf enum to al_dwarf_frame since this enum only enables frame generation
* renamed create_dwarf procedure for the same reason
* skipped check for dwarf support in assember, since we generate all dwarf info ourselves

git-svn-id: trunk@12906 -
2009-03-16 23:43:26 +00:00
Jonas Maebe
f54089a5e2 * encode the offset of absolute global variables in the symbol instead
of in the DWARF, as it's more efficient and avoids a gdb bug which
    occurs on some platforms (thanks to Jan Kratochvil for the tip,
    http://sourceware.org/ml/gdb/2009-03/msg00094.html )

git-svn-id: trunk@12905 -
2009-03-16 21:14:54 +00:00
Jonas Maebe
bfd753b7c9 - removed tf_dwarf_relative_addresses again, it causes differences
compared to the gcc-generated code (and removing it does not cause
    other differences). Partial revert of r12592.

git-svn-id: trunk@12904 -
2009-03-16 17:20:04 +00:00
Jonas Maebe
4e20c12326 * fixed compilation on x86_64 and ARM after r12891
git-svn-id: trunk@12903 -
2009-03-16 08:24:12 +00:00
Jonas Maebe
ab8b32dafb - removed PARAOUTFILE define and ifdefs
git-svn-id: trunk@12898 -
2009-03-15 12:31:02 +00:00
Jonas Maebe
a8eb1cc30b - removed FPC_DARWIN_JMP_MAIN and FPC_DARWIN_PASCALMAIN defines and ifdefs
git-svn-id: trunk@12897 -
2009-03-15 12:21:59 +00:00
Jonas Maebe
c6470a75e7 * do not disable smart linking when using DWARF debug information on Darwin,
because there it does work correctly
  * print a note if smart linking is disabled due to using DWARF

git-svn-id: trunk@12896 -
2009-03-15 12:16:45 +00:00
Jonas Maebe
cdc4933826 - removed accidentally committed change from previous commit
git-svn-id: trunk@12895 -
2009-03-15 12:07:49 +00:00