Commit Graph

10120 Commits

Author SHA1 Message Date
peter
db98f1eecb * indenting of node names
git-svn-id: trunk@8418 -
2007-09-09 14:03:31 +00:00
Jonas Maebe
523b7b84cd * properly set the "current compilation directory" (all included files
are relative to this directory, otherwise include dirs appear twice
    in some paths)

git-svn-id: trunk@8417 -
2007-09-09 13:51:30 +00:00
Jonas Maebe
488cfa3c32 + -go<x> switch for debugging options (some global switches could be
moved to it)
  + -go[no]dwarfsets switch to [disable]/enable generation of dwarf set
    information, as this breaks gdb < 6.5 (used to be disabled in the
    compiler by an ifdef, still off by default)

git-svn-id: trunk@8414 -
2007-09-09 09:27:49 +00:00
Jonas Maebe
9888e674cc * upped recordalignmax for darwin/ppc and darwin/ppc64 a bit
git-svn-id: trunk@8413 -
2007-09-08 22:52:12 +00:00
Jonas Maebe
42ff6fc5bb * enabled tail recursion optimization for ppc
git-svn-id: trunk@8412 -
2007-09-08 22:47:34 +00:00
Jonas Maebe
0567329343 * the "external alignment" (i.e., that of their starting addresses) of
record variables is now independent of their packrecords setting
    (except for packrecords C, which already calculated a reasonable
    alignment). This means that e.g. a packed record consisting of two
    pointers will be aligned at sizeof(pointer) normally. The internal
    alignment of the individual fields of packed records obviously did
    not change, also not if those fields are records themselves.
  * The size of records without any packing atributes is also padded to
    become a multiple of this improved alignment calculation, which
    means that the size of such records may change after this patch.
    Always explicitly specify a packing for records which are used for
    data storage/transmission if you want to have a consistent layout.

git-svn-id: trunk@8409 -
2007-09-08 18:13:28 +00:00
Jonas Maebe
70d94ade58 * replaced uses of -1 as C_alignment with the symbolic constant name
* some reformatting of ppc-specific code to be the same as the
    surrounding code

git-svn-id: trunk@8408 -
2007-09-08 15:26:55 +00:00
peter
703158292b * fix high value in pointer to array conversion
git-svn-id: trunk@8407 -
2007-09-08 15:25:25 +00:00
Jonas Maebe
91629f810f * better error messages for non-overloadable operators:
* only suggest = if the user tried to overload <>
    * suggest ** if the user tried to overload ^ (mantis #9606)
    * no suggestion otherwise
   (instead of always suggesting '=')

git-svn-id: trunk@8402 -
2007-09-08 10:49:16 +00:00
Jonas Maebe
b02fd37fbe * removed some unused variables
git-svn-id: trunk@8399 -
2007-09-08 08:45:12 +00:00
Jonas Maebe
666d156e8e * disabled inlining when passing a refcounted parameter typecasted to
a non-refcounted type to a procedure, as this is incompatible with
    the inlining process

git-svn-id: trunk@8391 -
2007-09-07 10:40:26 +00:00
Jonas Maebe
22f616d6af * treat procvardef parameters the same as records (fixes webtbs/tw9141)
* fixed some issues with 16 byte parameters on both ppc and ppc64

git-svn-id: trunk@8389 -
2007-09-06 17:35:50 +00:00
Jonas Maebe
e1aefdbac5 * Improved escape analysis so the improved tretopt no longer fails.
The downside is that because it is context-insensitive, several
    (correct) optimizations which were performed in the past no longer
    are now (and while some new ones are done now, the downside is bigger
    -- but at least the code should be correct in all cases now)

git-svn-id: trunk@8385 -
2007-09-05 13:29:22 +00:00
peter
0a9b94ca92 * save and restore aktobjectdef
git-svn-id: trunk@8384 -
2007-09-04 18:31:20 +00:00
peter
b513ebe9c6 * missing not
git-svn-id: trunk@8383 -
2007-09-04 18:30:57 +00:00
peter
8c24a15e26 * allow -l-
git-svn-id: trunk@8382 -
2007-09-04 18:29:58 +00:00
Jonas Maebe
11cb2a5614 * moved the setting of many target-specific defines to
TOption.TargetDefines and call it before parsing the config file,
    so extra defines like UNIX and WINDOWS are already defined while
    parsing the config file (mantis #9450)

git-svn-id: trunk@8371 -
2007-09-03 18:24:07 +00:00
Jonas Maebe
c10b375615 * give an error for high(ansistring) and high(widestring)
(mantis #9579)

git-svn-id: trunk@8370 -
2007-09-03 16:37:24 +00:00
Jonas Maebe
1ee8207ffa * fixed mantis #9522: no longer allow typecasting ordinal constants
to complex types (caused a lot of internal errors later on, and
    was also Delphi-incompatible)

git-svn-id: trunk@8369 -
2007-09-03 15:55:26 +00:00
Jonas Maebe
df84ca49b4 * fixed tests/cg/opt/tretopt, and also in more cases
perform the transformation of x:=f(hiddencomplexresult, ..)
    -> f(x, ...) (the compiler now performs some very
    conservative escape analysis for such types)

git-svn-id: trunk@8361 -
2007-09-02 21:27:37 +00:00
Jonas Maebe
cc0bd74ea0 - removed unused variable after div-by-zero simplify patch
git-svn-id: trunk@8359 -
2007-09-02 21:06:50 +00:00
Jonas Maebe
30e618ccb6 * fixed typecast error in last char/widechar/widestring patch
git-svn-id: trunk@8358 -
2007-09-02 20:29:26 +00:00
marco
6f9c7ede62 * fixed bug #9577 using short boolean eval. While fixing also fixed next IF.
git-svn-id: trunk@8357 -
2007-09-02 19:22:04 +00:00
Jonas Maebe
cadcfa76d8 * optimized TLinkedList.clear so it can use regvars for everything in
its loop (helps a lot on ppc)

git-svn-id: trunk@8354 -
2007-09-02 16:16:25 +00:00
Jonas Maebe
c7a5b0cf33 * forgot to commit (-CF<x> support)
git-svn-id: trunk@8351 -
2007-09-02 07:49:50 +00:00
Jonas Maebe
21abdd2f4e + support for specifying the minimal precision for floating point
constants. The default is currently 32 bits/single, which corresponds
    to the old behaviour (constants which cannot be exactly represented
    in the default/chosen precision will also still be automatically
    upgraded to higher precision). Supported constructs:
   * Command line switch -CF<x>
   * Compiler directive {$MINFPCONSTPREC <x>}
  whereby in both cases <x> can be default, 32 or 64. 80 is not supported
  because there is no generic way to figure out whether the current target
  actually supports 80 bit precision floating point calculations while
  parsing the command line switches (pbestreal can still change in case of
  win64 or -Cfsse2)

git-svn-id: trunk@8349 -
2007-09-01 19:38:27 +00:00
Jonas Maebe
12575526da * also generate an implicit exception frame in case only the function
result is refcounted, since it may need to be finalized in case of
    an exception (mantis #9385)

git-svn-id: trunk@8347 -
2007-09-01 14:18:09 +00:00
Jonas Maebe
c5b3180f5f * save/load LinkOtherFrameworks to/from ppu files
git-svn-id: trunk@8344 -
2007-08-31 17:03:33 +00:00
Jonas Maebe
ac22ff09da * detect division by zero in tmoddiv.simplify (mantis #9499)
git-svn-id: trunk@8341 -
2007-08-30 17:21:29 +00:00
Jonas Maebe
b1631b6918 * fixed wrong uninitialized warnings with passing array elements
as out-parameters

git-svn-id: trunk@8337 -
2007-08-29 20:23:59 +00:00
Jonas Maebe
e4487e628d * fixed overload choosing error on 64 bit
git-svn-id: trunk@8327 -
2007-08-29 06:30:38 +00:00
yury
1159ee9744 * Small improvement to previous commit.
git-svn-id: trunk@8325 -
2007-08-28 21:06:15 +00:00
yury
614dbe6a8c * Fixed inclusion of multiple resource files with icons or cursors. Patch by Sergei Gorelkin modified by me to reduce memory usage. Bug #9459.
git-svn-id: trunk@8324 -
2007-08-28 20:54:32 +00:00
Jonas Maebe
5bc156efea * always demote type conversions which cannot represent part of the
source value to convert_l3, instead of only those with a destination
    type whose size is < source size (like Delphi) + test -> fixes
    toperator6 along with a host of wrong tordconst typeconversions in
    the compiler sources themselves (although most are harmless)

git-svn-id: trunk@8323 -
2007-08-28 19:38:40 +00:00
Jonas Maebe
0bfce99477 * fixed bug in ppc jumptable generation for case statements with
negative cases caused by wrong automatic type conversion from
    longint to unsigned tconstexprint (+ test for such jump tables)
  * fixed darwin/ppc64 jumptables in case of jmptablenorange

git-svn-id: trunk@8311 -
2007-08-26 11:15:14 +00:00
michael
95c712faa1 * Escaped some TeX special characters in documentation
git-svn-id: trunk@8305 -
2007-08-25 13:33:46 +00:00
Jonas Maebe
399201ad7d * removed rodata support for ppc64 again because it doesn't work on
linux/ppc64. Added explanation why it doesn't work and what's needed

git-svn-id: trunk@8304 -
2007-08-24 17:19:52 +00:00
Jonas Maebe
30bc89cfe5 * fixed dependency checking for source files in subdirectories relative
to the makefile location + regenerated all Makefiles
  * hopefully fixed fpmkunit dependencies

git-svn-id: trunk@8297 -
2007-08-22 07:04:23 +00:00
Jonas Maebe
2b91a9ef37 + jumptable support for darwin/ppc64
git-svn-id: trunk@8285 -
2007-08-14 17:32:24 +00:00
Jonas Maebe
eddc507a13 * disallow widechar sets (Delphi 7 compatible, and were handled wrongly
by FPC previously)
  * tbs/tb0474 now fails -> renamed to tbf/tb0201 (+ new test tbf/tb0202)

git-svn-id: trunk@8284 -
2007-08-14 14:27:59 +00:00
Jonas Maebe
eec25e454d * slightly optimized ppc jumptable code (one compare+jump replaced
by a subtraction)

git-svn-id: trunk@8283 -
2007-08-14 14:17:09 +00:00
Jonas Maebe
3a7ad5212d * removed some instructions from the list which considers r0 as 0
git-svn-id: trunk@8282 -
2007-08-14 14:15:35 +00:00
Jonas Maebe
1c71bb36a1 * also check for valid min/maxlabel range for jumptable in case
of cs_opt_size

git-svn-id: trunk@8281 -
2007-08-14 13:58:56 +00:00
Jonas Maebe
fc53d14e58 * also enable .rodata for ppc64
git-svn-id: trunk@8278 -
2007-08-13 15:02:39 +00:00
Jonas Maebe
d73e79f163 * fixed regression of webtbs/tw4254: if a constant (wide)string can't be
converted to a pchar at compile time, remove the cstring_to_pchar node
    because it expects a stringconstn in pass_generate_code

git-svn-id: trunk@8275 -
2007-08-13 09:13:07 +00:00
Jonas Maebe
815cd2b39d + support for widestring manager based widechar conversions
(widechar<->char, widechar<>*string), based on patch from
    Rimgaudas Laucius (mantis #7758)
  * no longer perform compile-time widechar/string->char/ansi/
    shortstring conversions if they would destroy information
    (they can't cope with widechars with ord>=128). This means
    that you can now properly constant widechars/widestrings
    in source code with a {$codepage } set without risking that
    the compiler will mangle everything afterwards
  * support ESysEINVAL return code from iconv (happens if last
    multibyte char is incomplete)
  * fixed writing of widechars (were converted to char -> lost
    information)

git-svn-id: trunk@8274 -
2007-08-12 20:01:08 +00:00
Jonas Maebe
c408d9bb1d * fixed regression of webtbs/tw2789 caused by r8270 (setting vs_read
without vsf_must_be_valid means that it's not really read, but
    only used by sizeof or so)

git-svn-id: trunk@8273 -
2007-08-12 19:52:57 +00:00
Jonas Maebe
a8191abd16 * fixed parsing of "rcl/rcr rm,imm" (mantis #9025)
git-svn-id: trunk@8272 -
2007-08-12 13:50:52 +00:00
Jonas Maebe
12791bf4f1 * avoid spurious uninitialised warnings about array elements used as
for-loop counters

git-svn-id: trunk@8270 -
2007-08-12 13:19:30 +00:00
Jonas Maebe
097c2db374 * make sure warnings/hints in set_varstate are always given at the
correct position

git-svn-id: trunk@8269 -
2007-08-12 13:18:39 +00:00