Commit Graph

10614 Commits

Author SHA1 Message Date
florian
2d91fef4f1 + accept system.string, resolves #10489
git-svn-id: trunk@9727 -
2008-01-12 22:25:33 +00:00
Jonas Maebe
be2119b489 * simply discard overloaded routines which cannot accept a variant
when determining the optimal candidate for a single variant
    parameter, rather than giving an internal error (mantis #10623)

git-svn-id: trunk@9726 -
2008-01-12 19:01:49 +00:00
Jonas Maebe
70d94fecc1 * enable {$push}/{$pop} in all syntax modes instead of ony in macpas
(mantis #10351)

git-svn-id: trunk@9723 -
2008-01-12 16:47:46 +00:00
tom_at_work
4e60ceb237 * removed code which splits "unaligned" 8 byte stores/loads into two 4 bytes stores/loads on ppc64. The processor manuals and extensive testing showed that PPC970+ class processors have hardware assisted handling of unaligned memory accesses, which results in 8 byte memory accesses to be always faster than 4 byte ones
git-svn-id: trunk@9721 -
2008-01-12 13:47:55 +00:00
Jonas Maebe
cf295c8e88 * increased ppu version number because the ansi/widestring result patch
makes the generated code ABI-incompatible with code compiled with
    older compilers

git-svn-id: trunk@9719 -
2008-01-11 22:50:07 +00:00
Jonas Maebe
cdfb7c8f26 * patch from Sergei Gorelkin to return ansi/widestrings by reference
in an invisible parameter (Delphi compatible, faster/smaller code)

git-svn-id: trunk@9718 -
2008-01-11 22:36:50 +00:00
Jonas Maebe
e72fab1e43 * perform floating point type conversions directly in assignment nodes
when possible, as this can save a lot of useless memory traffic
    (and fpu<->sse conversions on x86)

git-svn-id: trunk@9716 -
2008-01-11 21:18:49 +00:00
Jonas Maebe
9772da7eeb * compare stripped copies of the compiler instead of the original
compiler binaries when determining whether cycle has finished
    on darwin, because when using Dwarf the linked binaries are
    always slightly different there (because the Dwarf info is kept
    in the object files and is referenced using a unique identifier,
    to be able to ascertain that you are using the correct object
    files and binary together when debugging)

git-svn-id: trunk@9715 -
2008-01-11 20:08:47 +00:00
Jonas Maebe
6e9b3bf345 * perform double->single-conversion-before-storing workaround for
fpu bug on some ppc's depending on the selected target cpu type
    rather than depending on whether we're compiling for 64 bit

git-svn-id: trunk@9685 -
2008-01-08 22:00:37 +00:00
Legolas
9dc6b3992f * Some cleaning on nds linker; new extension for intermediate files
git-svn-id: trunk@9672 -
2008-01-07 19:31:32 +00:00
Jonas Maebe
84159b3cbb * optimize away unnecessary implicit upcasts to int64 for subtractions
of u32bit values on 32 bit platforms (after the int64 values have 
    already been used for overload selection etc, i.e., semantically
    nothing changes)
  + test which checks that not too many typecasts are optimized away

git-svn-id: trunk@9664 -
2008-01-06 23:30:19 +00:00
Jonas Maebe
03e9f652fd * fixed range error in case node distance calculation
git-svn-id: trunk@9662 -
2008-01-06 23:18:12 +00:00
Jonas Maebe
482b83c3cb * typecheckpass before calling do_simplify, as the siplify methods
assume that the resultdefs are available

git-svn-id: trunk@9652 -
2008-01-06 15:30:04 +00:00
peter
bbae08d0ef * fix range check error when compiling with 2.2.x
git-svn-id: trunk@9650 -
2008-01-06 12:45:26 +00:00
Jonas Maebe
9ec3cc2022 * fixed sign of location.size for divmodn, 64 shlshrn and for muln
git-svn-id: trunk@9646 -
2008-01-05 21:35:42 +00:00
Jonas Maebe
e3d82f1953 * don't change the temp location of types which needs to be
initialised/finalised, because the init/final generation code
    happens after pass 2 using plain nodes and therefore needs the
    original locations intact

git-svn-id: trunk@9626 -
2008-01-04 20:51:09 +00:00
Jonas Maebe
08ccb30e3b * perform real "exactness" checking for open array parameters
git-svn-id: trunk@9624 -
2008-01-04 12:54:47 +00:00
Jonas Maebe
af2b4ee178 - reverted r9519 because it breaks tbs/tb0162 and test/tint644
git-svn-id: trunk@9622 -
2008-01-03 22:13:13 +00:00
Jonas Maebe
db6e60789b * only use ".set" directive when creating dwarf relsyms on darwin and
not for other relsyms, as older versions of the darwin assembler
    don't understand the ".set" directive (mantis #10541)

git-svn-id: trunk@9621 -
2008-01-03 12:47:31 +00:00
Jonas Maebe
7dac4e7e81 * fixed ppc compiler compilation with -dextdebug
git-svn-id: trunk@9620 -
2008-01-03 12:45:13 +00:00
michael
eddde27b0b It is of course apache 1.3, not 1.13
git-svn-id: trunk@9614 -
2008-01-02 13:18:05 +00:00
michael
7839c9e46b Fixed wrong path for apache defines
git-svn-id: trunk@9613 -
2008-01-02 10:55:45 +00:00
marco
38bbdb95ee * patch from KMS, resolves 10147
git-svn-id: trunk@9611 -
2008-01-02 09:43:55 +00:00
florian
6843833d60 * regenerated
git-svn-id: trunk@9606 -
2008-01-01 11:07:42 +00:00
florian
2dd91ca248 * updates from Karl-Michael Schindler
git-svn-id: trunk@9605 -
2008-01-01 11:03:55 +00:00
michael
130bac9c03 * Fixed bug #10511
git-svn-id: trunk@9594 -
2007-12-30 21:35:04 +00:00
michael
ee099500a1 * FPCAPACHE_1_13 or FPCAPACHE_2_0 define will determine what Apache version is taken
git-svn-id: trunk@9590 -
2007-12-30 20:46:27 +00:00
michael
b01e0d69d5 * FPCAPACHE_1_13 or FPCAPACHE_2_0 define will determine what Apache version is taken
git-svn-id: trunk@9589 -
2007-12-30 20:46:20 +00:00
michael
ac7f8dee39 * FPCAPACHE_1_13 or FPCAPACHE_2_0 define will determine what Apache version is taken
git-svn-id: trunk@9588 -
2007-12-30 20:42:32 +00:00
yury
e5f8426f61 * Prevent warning about automatic type conversion when using VAL with COMP type on x86.
git-svn-id: trunk@9540 -
2007-12-26 17:47:40 +00:00
yury
9bca56ac44 * Don't issue "Local variable is assigned but never used" warning for external variables.
git-svn-id: trunk@9538 -
2007-12-26 16:30:45 +00:00
Jonas Maebe
c05f18a1b0 * catch duplicate field declarations in a single class in Delphi mode
(mantis #10457)

git-svn-id: trunk@9534 -
2007-12-26 15:21:18 +00:00
Jonas Maebe
ca7650418d * fixed/added overflow checking in generic unarminusn code + test
+ added support for OP_NEG/OP_NOT in tcg64f386.a_op64_ref_reg (needed
    for the above)

git-svn-id: trunk@9528 -
2007-12-25 23:52:09 +00:00
Jonas Maebe
3d89822bc4 * free saved_standard_registers and saved_mm_registers in
done_register_allocators

git-svn-id: trunk@9527 -
2007-12-25 23:47:44 +00:00
Jonas Maebe
d740304b77 * don't call DoneDebugInfo twice in tmodule.reset
* call DoneDebugInfo in tmodule.destroy (fixes all remaining dwarf
    memory leaks)

git-svn-id: trunk@9526 -
2007-12-25 23:46:30 +00:00
Jonas Maebe
9a614617e4 * fixed some memory leaks
* transform directories to their dwarf format name while registering
    them so that e.g. "./" gets properly mapped to "." already at that
    point
  * fixed wrong (but harmless) typecast in self checking

git-svn-id: trunk@9525 -
2007-12-25 23:45:21 +00:00
Jonas Maebe
67431891e0 * fixed resulttype of unaryminusn for qwords on 32 bit platforms (was
qword, now is int64)
  * simplified currency checking in unaryminusn pass_typecheck

git-svn-id: trunk@9524 -
2007-12-25 23:43:07 +00:00
Jonas Maebe
8d9bfcaa7d * fixed memory corruption in trgobj.add_to_movelist on 64 bit platforms
git-svn-id: trunk@9523 -
2007-12-25 23:39:28 +00:00
peter
537319385b * support (expr[,expr]) recovery for postfixoperators
git-svn-id: trunk@9521 -
2007-12-23 20:58:28 +00:00
peter
505e4f7809 * don't give illegal expression for errorn statements. The error is already given
or can be ignored during a generic template parsing

git-svn-id: trunk@9520 -
2007-12-23 20:57:59 +00:00
peter
13ca601510 * use svalue to compare with -1
git-svn-id: trunk@9519 -
2007-12-23 20:44:02 +00:00
yury
6a4ee90cb0 * Inherit recordalignment by objects. Otherwise static instances of child objects are not aligned properly. Mantis #10454.
+ Test.

git-svn-id: trunk@9495 -
2007-12-21 15:35:32 +00:00
Jonas Maebe
0bf43d223b * fixed uses of custom-length string types in function/property
result types

git-svn-id: trunk@9486 -
2007-12-17 13:36:30 +00:00
Jonas Maebe
719c29cf86 + new cpo_openequalisexact parameter comparison option which
treats equal open arrays, open strings and arrays of const
    (implicitly also open) as exactly matching (since you
     cannot declare such types on their own, so they will
     never match exactly)
  * require that forward declared procedures match the
    implementation exactly for both the parameters (with
    the above modification) and result type (mantis
    #10425 and the related webtbf/tw10425a.pp)

git-svn-id: trunk@9484 -
2007-12-16 22:22:11 +00:00
Jonas Maebe
ada2c3ca35 * increased ppu version since the darwin name mangling change
breaks compatibility with previously compiled units

git-svn-id: trunk@9474 -
2007-12-16 11:46:57 +00:00
Jonas Maebe
2adb00ac45 * enabled operand size checking (don't know why it was disabled,
but enabling it lets the compiler catch the error in tbf/tb0037
    and causes no regressions)

git-svn-id: trunk@9465 -
2007-12-15 22:30:23 +00:00
Jonas Maebe
146b3d8bf3 * fixed location.size for length node and x86_64 mul node
git-svn-id: trunk@9464 -
2007-12-15 19:27:24 +00:00
Jonas Maebe
124c6c0c13 * always let mangled names start with an underscore on Mac OS X, because
otherwise the linker does not generate the necessary debug map
    information for global variables when using dwarf

git-svn-id: trunk@9447 -
2007-12-14 18:00:35 +00:00
florian
8f17101039 * allow application of as operator only to interfaces having a guid, resolves #6797
git-svn-id: trunk@9436 -
2007-12-12 21:07:47 +00:00
Jonas Maebe
0a53dddc99 * fixed vmt format type definition
git-svn-id: trunk@9429 -
2007-12-11 19:40:00 +00:00
peter
b5e417bd19 * increase the temp requirements for saving MM registers with the full
size of an OS_VECTOR so that we can do the alignment based on the offset
    after the allocation is done. Using the size is not possible because the
    temp alignment can be smaller than the OS_VECTOR requirement

git-svn-id: trunk@9428 -
2007-12-11 19:39:05 +00:00
Jonas Maebe
ead754c2c3 * write name of "self" as "this", so you can use plain field names inside
methods in gdb without having to write "self.fieldname" (self is also
    still recognised by gdb, that's built in)

git-svn-id: trunk@9427 -
2007-12-11 18:55:48 +00:00
Jonas Maebe
47d221ee7f * dsymutil under darwin "smart links" dwarf info -> make sure we
use the DW_TAG_typedef entries, because without them a type is
    only locally visible in the file where it is declared (see
    comments)

git-svn-id: trunk@9426 -
2007-12-11 13:10:39 +00:00
Jonas Maebe
f50d9cb9cb * finish the lineinfo table with a DW_LNE_set_address of the last
instruction of the function, like in the example in the dwarf2
    specifications appendix 3 and as done by gcc (expected by Apple's
    dsymutil)

git-svn-id: trunk@9425 -
2007-12-10 22:09:12 +00:00
Legolas
27eb735d24 * Resized stack value for NDS
* Changes to prt0:
  + Added argv support 
  * New function calls

git-svn-id: trunk@9424 -
2007-12-10 17:06:14 +00:00
Jonas Maebe
974c240266 * also use sse2 instructions to convert int to real on i386
for (types convertable to) longint
  * fixed expectloc for x86_64 int_to_real if result is in mmreg

git-svn-id: trunk@9423 -
2007-12-09 18:10:23 +00:00
Jonas Maebe
444ba107f8 * fixed location.size for divmodn (in particular the sign)
git-svn-id: trunk@9422 -
2007-12-09 18:06:44 +00:00
Jonas Maebe
91e0e5db17 * avoid some superfluous memory accesses when converting a double
precision/comp value in an fpu register to an sse value

git-svn-id: trunk@9420 -
2007-12-08 22:59:24 +00:00
Jonas Maebe
814e983c98 * optimize intvar*(-1) to -intvar
git-svn-id: trunk@9418 -
2007-12-08 16:41:28 +00:00
Jonas Maebe
24f8249f36 * flush pending local switch changes before evaluating ifopt
(mantis #10350)

git-svn-id: trunk@9413 -
2007-12-07 18:24:57 +00:00
Jonas Maebe
742ff35c48 + also optimize assignments from calls to by-reference "results":
o it's a by-reference parameter, but ignore that since it's
      guaranteed to be safe because of the escape analysis
    o it's wrapped in an absolute type conversion -> added
      actualtargetnode method to tnode which digs through that

git-svn-id: trunk@9412 -
2007-12-07 17:58:25 +00:00
Jonas Maebe
d46b433778 * move conversions of winlinke widestring, variant and records/arrays-
with-init-info assignments into helper calls from
    tassignmentnode.pass_typecheck to pass_1 so they can be optimised
    in more cases (patch from Sergei Gorelkin)

git-svn-id: trunk@9410 -
2007-12-07 15:52:12 +00:00
Jonas Maebe
f38e190892 * don't substitute the result variable of an inlined function with
a regable variable, because this result variable of the inlined
    function may not be regable + test (mantis #10371)

git-svn-id: trunk@9409 -
2007-12-07 13:29:16 +00:00
florian
57acf67659 + constant unicodestrings
git-svn-id: trunk@9385 -
2007-12-02 20:43:08 +00:00
peter
6b06d551a1 * don't fail on -Cg- for platforms that do not support PIC
git-svn-id: trunk@9383 -
2007-12-02 18:29:27 +00:00
florian
5c96c4a671 + first part of support for an unicodestring type
git-svn-id: trunk@9382 -
2007-12-02 16:39:13 +00:00
Jonas Maebe
154601b41d * don't handle dynamic arrays using fpc_copy_proc(), because it
takes the address of its parameters and a dynamic array can
    be in a register (e.g. as function result, mantis #10320)

git-svn-id: trunk@9381 -
2007-12-02 15:58:48 +00:00
Jonas Maebe
95f00eb633 * fixed x86_64 and non-darwin i386 GOT/GOTPCREL parsing after r9366
(I put that code in a separate method because it appeared in two
     places, but in one of the two places it was buggy and apparently
     never triggered, and I copied that part...)

git-svn-id: trunk@9379 -
2007-12-02 11:13:51 +00:00
sekelsenmat
38048fd073 Small fix for symbian arm target.
git-svn-id: trunk@9376 -
2007-12-02 08:27:18 +00:00
Jonas Maebe
5196db1ac3 * fixed low(set)/high(set) after previous changes + test
git-svn-id: trunk@9371 -
2007-12-01 17:16:33 +00:00
Jonas Maebe
527190a875 + relsymbol support for intel asm reader
git-svn-id: trunk@9368 -
2007-12-01 14:26:24 +00:00
Jonas Maebe
3f57d681e1 * check that not more than one relsymbol is used
git-svn-id: trunk@9367 -
2007-12-01 14:26:06 +00:00
Jonas Maebe
df2980f0c0 + relsym support
* give an error message when using @GOT in darwin/i386 assembler code
    (have to use a relsym instead)

git-svn-id: trunk@9366 -
2007-12-01 11:59:37 +00:00
Jonas Maebe
46e1bec6de * forgot to commit in previous revision
git-svn-id: trunk@9365 -
2007-12-01 11:53:50 +00:00
Jonas Maebe
18eb495d0f * give a regular error message instead of an internal error on x86
when using non-PIC references in assembler code when the compiler
    is configured to generate PIC code (on ppc, sparc and arm, no
    error message is given at all currently)

git-svn-id: trunk@9364 -
2007-12-01 11:28:15 +00:00
Jonas Maebe
feec2a74f2 * fixed crashes with length(pchar) and length(pwidechar) after
r9360-r9361

git-svn-id: trunk@9363 -
2007-12-01 10:38:22 +00:00
Jonas Maebe
1380a64b1e + simplify support for inline nodes (needed for inlining, because
otherwise you get internalerrors, e.g. when an assigned() expression
    becomes constant)
  * fixed length for constant strings in case of multi/single byte string
    conversions
  * fixed memory leak in constant evaluation of in_abs_long

git-svn-id: trunk@9361 -
2007-11-30 23:47:49 +00:00
Jonas Maebe
aaa484aa59 * removed goto's from tinlinenode.pass_typecheck and removed some other
old no longer needed code from it

git-svn-id: trunk@9360 -
2007-11-30 20:47:38 +00:00
Jonas Maebe
bbca8ee012 * perform 32x32 to 64 multiplication in two more situations (u8bit and
u16bit can be converted to s32bit without any problems)

git-svn-id: trunk@9357 -
2007-11-30 17:55:20 +00:00
Jonas Maebe
6c536dab3e * added several missing make_simple_ref() calls
* removed addr_pic again for darwin, as you have to explicitly code
    the relative address using a relsym instead of using an assembler
    directive like @GOT there

git-svn-id: trunk@9353 -
2007-11-29 22:06:14 +00:00
Jonas Maebe
5a7809394e * fixed addr_pic check (symbol-relsymbol is also always
position-independent)

git-svn-id: trunk@9352 -
2007-11-29 21:50:01 +00:00
peter
cbac667753 * check for eax,edx,ecx,ebx that support 8,16 bit registers in shortint add/sub peephole
and update register size of substructor

git-svn-id: trunk@9351 -
2007-11-29 21:16:32 +00:00
peter
dbba46c0e4 * set addr_pic
git-svn-id: trunk@9350 -
2007-11-29 21:15:22 +00:00
peter
f0e804beb7 * typecast fix
git-svn-id: trunk@9349 -
2007-11-29 21:15:08 +00:00
peter
95772c5cd3 * remove $ifdef extedbug for pic address check
git-svn-id: trunk@9348 -
2007-11-29 21:14:47 +00:00
Jonas Maebe
96180029b2 * perform 4 instead of 8 byte copies at a time if source or dest is
unaligned
  * use integer instead of floating point for 8 byte copies because the
    integer unit has lower latency

git-svn-id: trunk@9347 -
2007-11-29 17:18:52 +00:00
Jonas Maebe
bc545b077f - removed internalerror in case a subsetref value is loaded on a cpu
which requires proper alignment (they have to support unaligned accesses
    in their a_load_*_* routines)

git-svn-id: trunk@9346 -
2007-11-29 12:59:05 +00:00
Jonas Maebe
31764a0e3b + unaligned support in a_load_reg_ref and a_load_ref_reg for ppc64
(only needs it in case a 64 bit value is loaded from an address
     with alignment < 4 bytes)

git-svn-id: trunk@9345 -
2007-11-29 12:56:31 +00:00
yury
99a8012472 * Allow using constants in {$IF } directive in OBJFPC mode.
* Define FPC_OBJFPC_EXTENDED_IF to allow to test if this feature can be safely used.

git-svn-id: trunk@9342 -
2007-11-28 00:07:18 +00:00
yury
a477a3781a * Added support of HIGH() function in {$IF } preprocessor directive. Delphi 7 supports HIGH() there.
git-svn-id: trunk@9341 -
2007-11-27 23:58:53 +00:00
Jonas Maebe
2a767fc893 * fixed powerpc32 compilation after r9331
git-svn-id: trunk@9336 -
2007-11-26 11:14:07 +00:00
Jonas Maebe
26930be303 * fixed non-x86 compilation after r9333
git-svn-id: trunk@9335 -
2007-11-26 11:13:42 +00:00
florian
fb8bbd5ff0 + inline abs(<longint>) on x86
git-svn-id: trunk@9333 -
2007-11-25 18:54:40 +00:00
marco
1a34960b53 * asmscript stuff under if ldnoresponsfile. Fixes FreeBSD breakage
git-svn-id: trunk@9332 -
2007-11-25 18:08:08 +00:00
peter
59365a6db9 - garbage was being output sometimes instead of source lines when compiling with -al. This is because lastfileinfo and lastinfile were never initialized for MASM writer. This is true for TPPCMPWAssembler, too.
- long lines were not wrapped.
- constants of type ait_comp_64bit output incorrectly.
- at end of file, current segment was not closed.
patch from Sergei Gorelkin

git-svn-id: trunk@9331 -
2007-11-25 16:46:19 +00:00
peter
6058b2c247 * renamed t_times to executionweight and moved it to
code generation pass
  * include executionweight in the spilling decision

git-svn-id: trunk@9330 -
2007-11-25 16:38:05 +00:00
peter
fcb37c4fa4 * peephole added for non-longint:=non-longint+X
git-svn-id: trunk@9329 -
2007-11-25 14:32:59 +00:00
Jonas Maebe
0c06fddb8f * fixed compilation
git-svn-id: trunk@9328 -
2007-11-25 10:20:54 +00:00
sekelsenmat
8476d0af2c Adds symbian arm target.
git-svn-id: trunk@9327 -
2007-11-24 22:04:59 +00:00
Jonas Maebe
0ac6e82c1f * fixed handling of directories with spaces for LdSupportsNoResponseFile-
targets (a.o. darwin) in case no ppas.sh is generated (need to generate
    a temporary script in that case as well to use the IFS trick)
  * fixed exit code checking of ld when using IFS trick (have to check it
    before restoring IFS, otherwise we check the "error result" of this
    restoration, which will always be 0)

git-svn-id: trunk@9325 -
2007-11-24 18:06:01 +00:00
Jonas Maebe
d8d393e802 - no longer pass "-read_only_relocs suppress" to the darwin linker when
compiling shared libraries as we no longer generate relocations in
    read-only sections

git-svn-id: trunk@9323 -
2007-11-24 16:43:47 +00:00
florian
f6e9d133ab + x86_64 units for lazarus
git-svn-id: trunk@9321 -
2007-11-24 09:21:25 +00:00
Jonas Maebe
b4b069908f - removed some unnecessary cg. prefixes when calling tcg methods
from inside other tcg methods

git-svn-id: trunk@9315 -
2007-11-22 09:03:35 +00:00
Jonas Maebe
80b8494b5c * fixed wrong unaligned() changes
git-svn-id: trunk@9303 -
2007-11-20 12:15:47 +00:00
Jonas Maebe
3b4eba9f86 * fixed handling of unaligned in assignments
git-svn-id: trunk@9302 -
2007-11-20 11:59:15 +00:00
peter
cc77ccb52e * don't use readdata for getbyte/getword/getlongint
git-svn-id: trunk@9300 -
2007-11-19 22:52:58 +00:00
peter
241c65d5ec * optimize fixpath, findfile to not require temp ansistrings
* check for verbosity for V_Tried level messages, patches from Sergei Gorelkin

git-svn-id: trunk@9297 -
2007-11-19 22:24:52 +00:00
peter
cb24c78d4d * typecast to tenumreg before updating usedregs to prevent varset usage, patch from Sergei Gorelkin
git-svn-id: trunk@9296 -
2007-11-19 22:22:25 +00:00
peter
f704ee2d70 * remove duplicate temp allocation for register saving
* cleanup register saving code by using a procinfo flag if registers
    were saved on the stack

git-svn-id: trunk@9293 -
2007-11-18 22:10:10 +00:00
Jonas Maebe
543faa46ad * do not inline functions/procedures called with things like "nil^"
(that can be passed to a const-by-reference or var parameter,
     but leads to errors when inlining)

git-svn-id: trunk@9281 -
2007-11-18 14:29:19 +00:00
peter
05e44101e8 * make call by value stdcall for records and arrays delphi compatible
git-svn-id: trunk@9280 -
2007-11-18 12:53:55 +00:00
Jonas Maebe
9f04aad33e * prefer write({short,ansi,wide}string) over write(chararray) for
constant strings

git-svn-id: trunk@9279 -
2007-11-18 09:56:25 +00:00
Jonas Maebe
8f187bf6e2 * fixed r9243: that change should only be applied in case both the
parasym and the actual parameter  are a shortstring rather than
    when at least one isn't a shortstring

git-svn-id: trunk@9275 -
2007-11-17 19:58:19 +00:00
yury
4e3547c7bf * Improved warning "Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.":
- check for procedure and class pointers as well;
  - do not warn if typecasted pointer is passed as parameter or directly assigned to a variable. 

git-svn-id: trunk@9264 -
2007-11-16 13:52:19 +00:00
Jonas Maebe
c8f270c556 + darwin/x86_64 gprof support
git-svn-id: trunk@9252 -
2007-11-14 20:47:55 +00:00
Jonas Maebe
82cf80d4ca * added missing tcasenode.derefnode override to process all the
case-blocks and the else-block

git-svn-id: trunk@9251 -
2007-11-14 19:40:28 +00:00
Jonas Maebe
2e9db26750 * truncate constant shortstrings at the callee side if they are passed
to a value parameter with a shorter length, and if they would not be
    implicitly passed by reference (if they are passed by reference, then
    the callee will perform a shortstring assign which will do the length
    truncation). Fixes tarray3 on x86_64

git-svn-id: trunk@9243 -
2007-11-13 20:21:29 +00:00
Jonas Maebe
9f705776c9 * fixed disabling of inlining procedures/functions with nested
procedures/functions

git-svn-id: trunk@9232 -
2007-11-13 18:12:25 +00:00
florian
cfed70d698 * removed garbage at the end
git-svn-id: trunk@9207 -
2007-11-11 21:26:44 +00:00
florian
246ae7b446 o from Karl-Michael Schindler:
* brought german message file up-to-date

git-svn-id: trunk@9206 -
2007-11-11 21:24:55 +00:00
Jonas Maebe
157fc2a3e9 * use -x instead of -s for stripping executables on darwin (-s worked fine on 10.0,
was broken on 10.1, fixed in 10.2 and worked fine till 10.4, and has been
    deprecated/removed in 10.5; conversely, -x has worked all the time, although it
    results in slightly bigger binaries on platforms that also support -s)

git-svn-id: trunk@9204 -
2007-11-11 19:43:41 +00:00
Jonas Maebe
70c0c2ddd9 * all currently supported platforms require that single precision
parameters passed as C-style varargs are upgraded to double
    precision

git-svn-id: trunk@9201 -
2007-11-11 18:01:29 +00:00
florian
a5ccf16016 + disp. var. property setting, resolves #10133 and #9134
git-svn-id: trunk@9189 -
2007-11-11 14:14:05 +00:00
Jonas Maebe
defe46ef42 * added missing size suffixes for several sse2 opcodes
git-svn-id: trunk@9182 -
2007-11-10 19:57:01 +00:00
Jonas Maebe
c9ce918485 * regenerated for darwin/x86_64
git-svn-id: trunk@9181 -
2007-11-10 18:37:19 +00:00
Jonas Maebe
032352d98b + darwin/x86_64 support
git-svn-id: trunk@9180 -
2007-11-10 18:33:09 +00:00
florian
578c18a204 + support of <variant>.<id1>.<id2> ... resolves #9233 and partly #10133
git-svn-id: trunk@9172 -
2007-11-10 10:08:41 +00:00
florian
8075f99ce9 * define for armel fixed
git-svn-id: trunk@9164 -
2007-11-08 21:03:46 +00:00
peter
af9e8b489c * replace : with ; in AddPath
git-svn-id: trunk@9161 -
2007-11-08 08:24:07 +00:00
florian
29766e5d81 + first additions for the arm eabi
git-svn-id: trunk@9157 -
2007-11-07 20:48:32 +00:00
florian
8a2ab85bc2 + armel support with FPC_ARMEL define
+ armel linker script

git-svn-id: trunk@9156 -
2007-11-07 20:45:27 +00:00
florian
7a4c469eb2 * more generic definition of abi define
git-svn-id: trunk@9155 -
2007-11-07 20:44:33 +00:00
florian
ed75834533 + eabi and armeb abi constants
+ abi2str array

git-svn-id: trunk@9154 -
2007-11-07 20:43:31 +00:00
sekelsenmat
6569d491a1 Added symbian target to the compiler messages
git-svn-id: trunk@9149 -
2007-11-07 19:42:55 +00:00
Jonas Maebe
ed7511de58 * safeguard the nf_block_with_exit flag when simplifying blockn and
statementn + test

git-svn-id: trunk@9134 -
2007-11-04 18:33:07 +00:00
Károly Balogh
8674e35f45 * removed a_call_reg hack, not needed after peter's latest fix
git-svn-id: trunk@9130 -
2007-11-04 15:27:31 +00:00
peter
263b7abc6f * check register type also for registers in references so we are
not mixing addressregisters and intregisters on m68k

git-svn-id: trunk@9128 -
2007-11-04 14:24:36 +00:00
Károly Balogh
14f958682c + first attempt to implement a_call_reg
+ various other changes

git-svn-id: trunk@9127 -
2007-11-04 01:40:02 +00:00
florian
6ac5ed6a47 * store character constants converted to shortstrings unaligned
git-svn-id: trunk@9106 -
2007-11-03 16:07:18 +00:00
yury
40c3092b99 * Fixed compilation.
git-svn-id: trunk@9094 -
2007-11-03 09:51:45 +00:00
yury
13d948c07b * Fixed: import Address Table should contain the same data as Import Lookup Table.
* Perform import by name with index as hint, if both import name and import index are specified.
* Fixed import by ordinal when external linker is used.
* Fixed some warnings and notes.

git-svn-id: trunk@9083 -
2007-11-02 23:07:15 +00:00
florian
d9e0f078e1 * continued to play around with package support
git-svn-id: trunk@9075 -
2007-11-02 22:26:43 +00:00
florian
965bb41288 * fixed more rex placements
git-svn-id: trunk@9069 -
2007-11-02 21:30:43 +00:00
peter
676f477ddb * remove obsolete scripts
git-svn-id: trunk@9068 -
2007-11-02 21:21:56 +00:00
florian
4fed8c4ab5 + write aliasnames to ppu as well
+ ppudump updated
* ppu version increased

git-svn-id: trunk@9064 -
2007-11-02 20:50:01 +00:00
Jonas Maebe
e716ac6b6b * give ord->formaldef again a higher precedence than ord->floatdef
(last convert level that is added, needs a more structural
     solution)

git-svn-id: trunk@9057 -
2007-11-02 11:17:11 +00:00
florian
01fd678211 + basic parsing of package files
+ basic implementation of creation of packages

git-svn-id: trunk@9054 -
2007-11-01 23:20:28 +00:00
Károly Balogh
1536e9e65b + de-uglified the previous hack
+ made Amiga syscalls to save/restore the frame pointer (do we really need a frame pointer?)
 + some disabled debug comments (to asm source)
 + compiler is now able to generate some VERY basic, but working Amiga-m68k executables

git-svn-id: trunk@9051 -
2007-11-01 19:31:58 +00:00
Jonas Maebe
e621b30af8 * remove procedures with var/out parameters which are supposed to
be passed a constant expression from the overload candidates

git-svn-id: trunk@9050 -
2007-11-01 16:27:41 +00:00
Károly Balogh
12bcb539e6 + fix(?) stack return address with an ugly hack...
git-svn-id: trunk@9047 -
2007-11-01 16:04:16 +00:00
Károly Balogh
91abb3aeb9 + first (failed) attempt to have a working stackframe generation
git-svn-id: trunk@9040 -
2007-11-01 14:16:17 +00:00
Jonas Maebe
ad5ce1adf4 * fixed a_load_reg_ref: the store size has to depend on the tosize,
not on the fromsize (fixes webtbs/tw10072, and hopefully also
    resolves mantis #8121)

git-svn-id: trunk@9037 -
2007-11-01 13:31:23 +00:00
florian
5bdea6b5b3 * avoid generation of __stklen if not necessary
git-svn-id: trunk@9029 -
2007-11-01 10:28:49 +00:00
Károly Balogh
8562910185 + quick hack to have linker support for amiga/m68k (it produces some kind of binary at least)
git-svn-id: trunk@9024 -
2007-11-01 00:22:47 +00:00
florian
90af7ebf72 * use only windows exceptions for stack checking on win32/win64, resolves #9166
git-svn-id: trunk@9020 -
2007-10-31 23:19:48 +00:00
yury
22c1f6381d * Fixed cross CPU cycle after changes in rev. 8911.
git-svn-id: trunk@9018 -
2007-10-31 22:44:25 +00:00
Károly Balogh
b91c0756c4 + made m68k to compile system unit again
git-svn-id: trunk@9017 -
2007-10-31 22:33:00 +00:00
florian
e3a0f3d303 * updates from Ido Kanner
git-svn-id: trunk@9016 -
2007-10-31 19:55:37 +00:00
Jonas Maebe
82a0749970 * prefer non-matching orddef conversions to orddef-to-pointer conversions
(mantis #10002) and also to orddef-to-real conversions
    (delphi-compatible). More tests and fixes will follow later.

git-svn-id: trunk@9015 -
2007-10-31 17:20:37 +00:00
Jonas Maebe
df2ecd14f5 * fixed comparisons of orddefs with fourcharcodes in macpas mode + test
git-svn-id: trunk@9014 -
2007-10-31 15:11:13 +00:00
Jonas Maebe
68570e5471 * save/restore true/false label when secondpassing arrayconstructor
elements (mantis #10072)

git-svn-id: trunk@9013 -
2007-10-31 12:37:35 +00:00
peter
ee479f31a1 * remove duplciate m68k from ALLTARGETS
git-svn-id: trunk@8999 -
2007-10-30 07:15:48 +00:00
florian
7f4c387841 o new BeOS patch by Olivier Coursiere:
* correctly define the stack size for BeOS,
  + implement a minimum nl_langinfo function to correctly initialize WideString support
  + add fgl unit in the BeOS RTL makefile
  * SysOSAlloc now return nil when the system can not allocate the asked memory,
  * HAS_SYSOSFREE is no more defined with an empty implementation under BeOS. This was preventing FPC to reuse memory.
  + there is now a basic implementation of CheckPointer under BeOS.

git-svn-id: trunk@8994 -
2007-10-29 19:00:32 +00:00
Jonas Maebe
8d8ba9a583 * fixed pic reference loading for non-darwin i386 platforms after
r8657

git-svn-id: trunk@8993 -
2007-10-29 19:00:15 +00:00
peter
a0984505b2 * regenerated to fix fpc detection on non-i386
git-svn-id: trunk@8991 -
2007-10-29 16:34:18 +00:00
peter
324b1732ab * regenerated to update dependencies
git-svn-id: trunk@8988 -
2007-10-29 09:07:18 +00:00
florian
50cc61c8fd * ignore register list in pure assembler routines, resolves #9335
git-svn-id: trunk@8978 -
2007-10-28 20:41:19 +00:00
florian
c3475dddc0 * handle case ranges properly for unsigned types with a non-zero base, resolves #10009
git-svn-id: trunk@8974 -
2007-10-28 17:06:02 +00:00
florian
1e618b499d * fixes unaligned load_ref_reg on little endian arm
git-svn-id: trunk@8972 -
2007-10-28 15:30:50 +00:00
florian
0b83cb5761 * align locations where mm registers are stored to be preserved
git-svn-id: trunk@8970 -
2007-10-28 14:09:38 +00:00
florian
19b79468ad * store/load mmx registers properly
* sse registers can be stored/loaded aligned on x86-64

git-svn-id: trunk@8969 -
2007-10-28 14:08:57 +00:00
florian
82c7896d8d * more ins. dat issues popped up, did I mention I start to hate it :(?
git-svn-id: trunk@8968 -
2007-10-28 14:08:04 +00:00
florian
c1d62172fe * the saga continues, fixed previously broken assembler table entries
git-svn-id: trunk@8967 -
2007-10-28 13:01:58 +00:00
florian
9d88b1d9ef * x86-64 fixed
git-svn-id: trunk@8963 -
2007-10-28 08:45:48 +00:00
florian
f32831c44a * fixed assembling of fisttp of sse3 instruction set
+ sse3 optimized trunc() using fisttp
+ -Cfsse3 for x86-64

git-svn-id: trunk@8962 -
2007-10-27 20:50:46 +00:00
florian
46e1587395 * another bunch of assembler fixes, win64 builds again
git-svn-id: trunk@8957 -
2007-10-27 19:49:53 +00:00
florian
3cadba6010 + create target directory before starting ins. dat. creation
git-svn-id: trunk@8956 -
2007-10-27 19:40:01 +00:00
florian
00d6a03b2c + default code now preserves mm registers
* save|restore_standard_registers => save|restore_registers

git-svn-id: trunk@8954 -
2007-10-27 12:02:28 +00:00
florian
3a630340be * fixed m68k compilation and put it in fullcycle
git-svn-id: trunk@8953 -
2007-10-27 11:24:50 +00:00
florian
8f5a4cc514 * more, hopefully correct, x86-64 assembler fixes
git-svn-id: trunk@8952 -
2007-10-26 20:44:57 +00:00
Jonas Maebe
368cd52f97 * fixed bug in typed constant record parsing with variant records
in case a variant part other than the first is initialised (the
    index of the next symbol was not adjusted, causing incorrect error
    messages in case there are some alignment bits/bytes between the
    previous and next field)

git-svn-id: trunk@8948 -
2007-10-26 18:22:30 +00:00
Jonas Maebe
920a626c17 * mark darwin as case sensitive, because the dircache isn't always used
anymore (the dircache masks the effects of case-sensitive file
    systems on targets marked as case-aware)

git-svn-id: trunk@8946 -
2007-10-26 13:01:01 +00:00
Jonas Maebe
327c5935f0 * add all implicit units (system, objpas, variants, cmem, ...) using
their name in all lower case, so the compiler doesn't waste time
    searching for System.ppu/System.pas/System.pp/... on case-sensitive
    file systems

git-svn-id: trunk@8945 -
2007-10-26 12:36:38 +00:00
Jonas Maebe
71c314c550 * Only start caching a directory once more than 20 lookups have been
done in it, to avoid caching very large current directories (such as
    those of the testsuite) without reason. It would be better if that
    decision were based on a fraction of the total number of entries in
    each directory, but that information doesn not appear to be available
    in a cross-platform way

git-svn-id: trunk@8938 -
2007-10-25 20:30:04 +00:00
Jonas Maebe
81c5abfb72 * don't add target_info.unit_env to the unit search path
if it's not set/empty

git-svn-id: trunk@8931 -
2007-10-25 19:30:48 +00:00
peter
c8ed392469 * defstates doesn't affect any crc
git-svn-id: trunk@8927 -
2007-10-25 18:13:03 +00:00
florian
c5f492ef50 * fixed assembling of movq mem,xmmreg
git-svn-id: trunk@8923 -
2007-10-24 20:45:38 +00:00
peter
273bfffe5b * store defstates in ppu, this field keeps the info what
is generated for a def so it can be reused, e.g. dwarf debuginfo

git-svn-id: trunk@8920 -
2007-10-23 21:50:10 +00:00
peter
a724d80e81 * debuginfo initialized per unit
git-svn-id: trunk@8918 -
2007-10-23 18:19:17 +00:00
peter
e10c75ee6e * fix relative path writing
git-svn-id: trunk@8915 -
2007-10-23 17:38:54 +00:00
peter
a0ebdcf820 * enable regvar for -O2
git-svn-id: trunk@8910 -
2007-10-22 16:50:09 +00:00
peter
d74bd34a91 * fix 32bit truncation in type determination of constant operands
git-svn-id: trunk@8909 -
2007-10-22 16:36:41 +00:00
Jonas Maebe
0aba0acdf6 * fixed widechar to shortstring conversion after r8898 (webtbs/tw7758)
git-svn-id: trunk@8908 -
2007-10-21 22:58:17 +00:00
Jonas Maebe
12b4f034ea * only allow using array elements as for-loop counter variables
in TP mode

git-svn-id: trunk@8907 -
2007-10-21 22:39:49 +00:00
Jonas Maebe
d2279d55d6 * restored outputting the stabs for local variables and parameters
which was accidentally disabled in r8878
  * move "end of function" stab past all stabs for the function (except
    for the Darwin "size" stab), like gcc does

git-svn-id: trunk@8905 -
2007-10-21 21:19:48 +00:00
florian
1cb5d2a603 * some missing make_simple_ref calls added, resolves #8948
git-svn-id: trunk@8904 -
2007-10-21 20:19:04 +00:00
florian
c219b1f753 * fixed/enabled andl/addl/... xx,reg1 orl reg1,reg1 setxx/jxx/cmovxx optimization
git-svn-id: trunk@8902 -
2007-10-21 19:54:09 +00:00
florian
ae79ef2cb5 * don't range pointers converted to arrays, resolves #8191
git-svn-id: trunk@8900 -
2007-10-21 19:05:06 +00:00
florian
7878f0feb3 * made all fpc_*_to_shortstr helpers a procedure, resolves #8580
git-svn-id: trunk@8898 -
2007-10-21 17:33:18 +00:00
Jonas Maebe
35cb2b9c2b * fixed placement of "size" stab for Darwin
git-svn-id: trunk@8878 -
2007-10-21 11:39:52 +00:00