Commit Graph

10613 Commits

Author SHA1 Message Date
yury
ba081ab36f * Improved finding of resource compiler during cross-compilation.
git-svn-id: trunk@10745 -
2008-04-21 11:13:13 +00:00
tom_at_work
553b524c0a * also fix rtti for named enumerations
* updated test program to test both named and unnamed enumerations

git-svn-id: trunk@10741 -
2008-04-20 20:02:23 +00:00
florian
427d35e816 * updated also 2006 copyright strings
git-svn-id: trunk@10734 -
2008-04-20 08:35:06 +00:00
tom_at_work
30cb2b088b * also updated compiler copyright date to 2008 in the translations that translated the affected string
git-svn-id: trunk@10731 -
2008-04-19 23:16:56 +00:00
tom_at_work
50b98f1177 * updated compiler copyright date to 2008
git-svn-id: trunk@10730 -
2008-04-19 23:03:02 +00:00
tom_at_work
d84e8adc77 further fix for tw10233 on powerpc(64) platforms:
* do not overwrite left.location.register in second_int_to_bool() but use temp register when converting input value to C style truth values (i.e. 0,-1). With -Or enabled this register will be reused not containing the correct value anymore.

git-svn-id: trunk@10729 -
2008-04-19 22:47:41 +00:00
tom_at_work
20737f0ac1 fix webts/tw10033 on ppc64:
* correctly write rtti for enumerations (missing alignment instructions on CPUs requiring proper alignment, breaking on architectures with 64 bit pointers)
* fix hardcoded offsets in fpc_write_text_enum
* updated example program

git-svn-id: trunk@10728 -
2008-04-19 22:06:18 +00:00
tom_at_work
ee76679326 * cleaned up r10705 for ppc, improved comments
git-svn-id: trunk@10721 -
2008-04-19 19:54:09 +00:00
florian
9595256ff5 * cleaned up overleft of 10710
git-svn-id: trunk@10712 -
2008-04-19 11:38:54 +00:00
florian
4e7e0f620a * first try to fix #10863 (don't do SSL in case left is already handled in an assignment node)
git-svn-id: trunk@10710 -
2008-04-19 09:23:45 +00:00
Jonas Maebe
263984f874 * fixed a_load_ref_reg for OS_S8->OS_16 for ppc32, ppc64 and sparc
(and on ppc64 also for OS_S8->OS_32 and OS_S16->OS_32)
  * adapted tcnvint6 to check for ppc64 OS_S16->OS_32 conversion
    (the old comparison was performed using a 32 bit compare and
     therefore did not notice the wrong result)

git-svn-id: trunk@10705 -
2008-04-18 20:04:55 +00:00
yury
9222540e84 * Small optimization.
git-svn-id: trunk@10692 -
2008-04-18 11:46:39 +00:00
yury
95ea5d87dd * Fixed int to int conversion in ARM code generator.
+ Added new test to detect more bugs in int to int conversion.

git-svn-id: trunk@10691 -
2008-04-18 11:31:12 +00:00
yury
b70bf05ad5 * I hope it's proper fix for r10688.
git-svn-id: trunk@10690 -
2008-04-18 10:51:56 +00:00
yury
e71d631c24 * Fix for tw10233 for all CPUs.
git-svn-id: trunk@10688 -
2008-04-18 07:38:25 +00:00
yury
ec943198fd * Properly fill treference.alignment when variable is loaded by tcgloadnode. It allows code generator to insert unaligned handling if needed.
* Improved generic a_load_ref_reg_unaligned if ref alignment is 2.
* Improved unaligned load/store of register for ARM.
* It fixes passing records by value on ARM.
+ New test.

git-svn-id: trunk@10681 -
2008-04-16 23:01:20 +00:00
yury
24be2c31f7 * Fixed tw11027.
* Updated tcnvint2 to new rules.

git-svn-id: trunk@10677 -
2008-04-16 08:34:30 +00:00
yury
771479e65c * Improved fix for bug #10233 for better Delphi compatibility and efficiency:
- Explicit typecasts like LongBool(byte_value) do not change ordinal value.
  - Explicit typecasts like ByteBool(longint_value) do not change ordinal value and can lead to data loss if longint_value is outside of ByteBool range.
  - Explicit typecasts like ByteBool(LongBool) handle type ranges correctly.
  - Updated test tw10233.pp. It is passed by Delphi as well.

git-svn-id: trunk@10672 -
2008-04-15 22:19:29 +00:00
yury
cf235145cb * Fixed a_load_reg_reg for arm.
* Fixed sign/zero-extension in second_int_to_bool for all CPUs. x86 and pppc were not affected by this bug, but I fixed it for all CPUs for consistency.
* cg/tcnvint1 is passed on arm now.

git-svn-id: trunk@10669 -
2008-04-15 20:44:27 +00:00
Jonas Maebe
a3b877247c * don't perform call/jmp into push/jmp in case we're generating
pic, as that optimization is invalid in that case

git-svn-id: trunk@10655 -
2008-04-13 17:03:07 +00:00
yury
348e30958e * If object has VMT, properly align whole object instance if target CPU requires alignment. It fixes usage of static object instances created as var or const on CPUs which require alignment.
* Partially reverted Micha's fix in revs 10544,10546,10548, because it is not needed anymore.

git-svn-id: trunk@10648 -
2008-04-13 15:36:44 +00:00
Jonas Maebe
76e23fc54e * fixed internalerror when having to choose between different
overloads in case there is only one variant parameter and
    one of the candidates has more hidden parameters than the
    other at the start (e.g. function(para):char and
    function(para):shortstring, depending on in which order the
    hidden shortstring result and para are processed, mantis
    #11139)

git-svn-id: trunk@10643 -
2008-04-13 10:21:26 +00:00
Jonas Maebe
81ad9ea6e8 * fixed typo in r10602 causing the names of all record structures of
classes to be replaced with "sym_name" in the debuginfo

git-svn-id: trunk@10642 -
2008-04-13 09:36:31 +00:00
florian
951a202e5d * fix by Jan Bruns for #11042: improves reading of references on arm
git-svn-id: trunk@10625 -
2008-04-10 19:47:49 +00:00
Jonas Maebe
42a4684f60 * use global label to refer enum subrange type for setdefs
on systems without tf_dwarf_only_local_labels to avoid
    potential problems when using the set type in a separate
    unit

git-svn-id: trunk@10619 -
2008-04-09 08:03:55 +00:00
peter
95aaa7a74b * reorder code after r10602 so it is more clear
git-svn-id: trunk@10608 -
2008-04-06 12:47:05 +00:00
Jonas Maebe
07b3e11e2b * fixed "set of enumeration" for gdb 6.7/6.8
git-svn-id: trunk@10603 -
2008-04-05 17:05:34 +00:00
Jonas Maebe
39fa81d40e * fixed stabs debug info for webtbs/tw9766 again
git-svn-id: trunk@10602 -
2008-04-05 12:29:07 +00:00
Jonas Maebe
cd28ce9dfc * only write set elementdef information if there is an elementdef
(can be absent for empty sets)

git-svn-id: trunk@10600 -
2008-04-03 19:31:09 +00:00
peter
f7737bebda * fix parameter allocation for left to right calling conventions
git-svn-id: trunk@10597 -
2008-04-02 08:05:31 +00:00
Jonas Maebe
55bd5cedb4 - removed unused writing_def_dwarf field
git-svn-id: trunk@10585 -
2008-03-29 16:37:41 +00:00
Jonas Maebe
7e4750ac50 * workaround for default property constant value limitations
git-svn-id: trunk@10575 -
2008-03-28 10:15:33 +00:00
florian
c83af469d0 * new translations from Karl-Michael Schindler
git-svn-id: trunk@10567 -
2008-03-27 10:37:34 +00:00
peter
a9c9ca0115 * set elf flags for soft float on arm
git-svn-id: trunk@10560 -
2008-03-25 16:15:15 +00:00
Jonas Maebe
99e1e85447 * fixed execution of finalization section of smart linked shared
libraries on linux (mantis #6822)
  * fixed execution of library finalization sections on darwin
    (previously only the finalization section of the library
     compilation unit itself was executed, now those of the units
     used by the library are also executed)

git-svn-id: trunk@10554 -
2008-03-24 22:19:21 +00:00
micha
b0838b13d7 * add armeb target to compiler/Makefiles
git-svn-id: trunk@10552 -
2008-03-24 17:48:11 +00:00
Jonas Maebe
150eda304b * factored unix exports handling from t_bsd and t_linux into expunix unit
(todo: at least solaris, maybe others)
  * changed the "exports" section handling:
    a) make everything private which is not exported (implemented for
       darwin and linux)
    b) for the exported symbols:
     - functions/procedures
      1) if no name or index is provided, and if the procedure has aliases
         defined via the public/export directives, then export the default
         mangled name and all defined aliases
      2) otherwise if no name is specified (but there is an index) then
        i) if the procedure is defined as cdecl/cppdecl/mwpascal, use the
           appropriately mangled version of the function name
       ii) otherwise export the name without any mangling(e.g. "exports
           proc1" -> proc1 is the exported name)
     - variables
      1) if no name is provided and the variable was specified as cvar,
         use the mangled name
      2) otherwise if no name is provided, export the name without any
         mangling
  -> initialization/finalization of shared libraries under Linux works
     again (mantis #7838)
  -> sharing symbols between shared library and main program works
     under Linux (mantis #9089)

git-svn-id: trunk@10551 -
2008-03-24 16:55:05 +00:00
peter
f96817b5e9 * support CROSSOPT which is only passed to the cross compiler. Can be used to bootstrap a native compiler with
softfpu (-Cfsoft) that is not supported by i386

git-svn-id: trunk@10550 -
2008-03-24 14:23:45 +00:00
peter
52722b2cab * allocate .bss entries manual so we can take care of alignment
* disable COMMON symbol code, it might be needed again for ELF package
    support (.comm for ELF supports alignment)

git-svn-id: trunk@10549 -
2008-03-24 11:55:03 +00:00
micha
3e1149f740 * fix alignrecord fieldoffset size
git-svn-id: trunk@10548 -
2008-03-24 09:57:28 +00:00
micha
4b8486e55b * fix r10544 to take care of packed objects
git-svn-id: trunk@10546 -
2008-03-24 09:46:24 +00:00
micha
1130fb3e95 * revert accidental change to arm
git-svn-id: trunk@10545 -
2008-03-23 23:44:21 +00:00
micha
40211152d4 * make sure tobjects are pointer-size aligned in case of VMT usage; fixes tw1365 on armeb-linux
git-svn-id: trunk@10544 -
2008-03-23 23:42:53 +00:00
peter
741b5a1df7 * fix writing procedure local type defs
* write type names once for types defined in the current compiled unit

git-svn-id: trunk@10541 -
2008-03-23 13:40:41 +00:00
florian
7ef191021f + check for location.loc<>expectloc in extdebug mode
* set expectloc properly for add nodes on arm

git-svn-id: trunk@10536 -
2008-03-23 10:18:33 +00:00
Jonas Maebe
3d97db7976 + support for subrange types in dwarf (allows proper printing of packed
sets of subrange types)

git-svn-id: trunk@10532 -
2008-03-22 11:49:05 +00:00
Jonas Maebe
62e66d2a56 * explicit typecasting of any ordinal type to a boolean of the same
size must happen without any mangling of the value (mantis #11027)
  * moved checking for signed-to-unsigned (or vice versa) type
    conversions in assignments from htypechk to ncnv (where there
    was already code for similar checks) and added support for
    bool_to_bool there as well

git-svn-id: trunk@10521 -
2008-03-21 14:44:58 +00:00
michael
e9b3f7feb9 Merged revisions 10507-10509 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r10507 | giulio | 2008-03-19 11:13:54 +0100 (Wed, 19 Mar 2008) | 2 lines
  
  properly handle resource files with spaces in their path
........
  r10509 | giulio | 2008-03-20 13:07:31 +0100 (Thu, 20 Mar 2008) | 2 lines
  
  * Strip off path from resource file name when resource file is copied to output directory (fixes #11022)
........

git-svn-id: trunk@10516 -
2008-03-20 19:59:18 +00:00
Jonas Maebe
242b335531 * fixed widestring range checking on win64 (mantis #10450, fix also
depends on r10505)

git-svn-id: trunk@10506 -
2008-03-18 23:09:12 +00:00
Jonas Maebe
a6b9b3e00a * fixed a_param_ref for source sizes < 8 bytes
git-svn-id: trunk@10505 -
2008-03-18 20:10:22 +00:00