Commit Graph

11897 Commits

Author SHA1 Message Date
pierre
23ff1e0681 * fix error in cfidwarf rev 16062 for non-windows systems
git-svn-id: trunk@16067 -
2010-09-30 07:41:19 +00:00
Jonas Maebe
8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and
later: the same as i386/darwin, except
      a) uses the non-fragile Objective-C ABI/runtime
      b) does not require stubs for direct calls/jumps (not required for
         i386/darwin under 10.6 and later either, but still generated
         there for backwards compatibility)
      c) only the same packages are enabled as for ARM/Darwin
      d) MacOSAll is compiled specifically for the iPhoneSimulator SDK
    This target also defines the symbol "darwin" apart from the target
    name "iphonesim" for source code compatibility reasons.

git-svn-id: trunk@16065 -
2010-09-29 21:56:47 +00:00
pierre
fa4b4906e6 * ogcoff.pas: Add support for RELOC_SECREL32.
* cfidwarf.pas: Fix CIE pointer inside dwarf-FDE entry which must be
    a section relative offset.

git-svn-id: trunk@16062 -
2010-09-29 12:58:21 +00:00
Jonas Maebe
bd0567563c * don't crash in {$x-} mode if a call cannot be resolved due to an error
in the expression (mantis #17455)

git-svn-id: trunk@16061 -
2010-09-29 12:11:22 +00:00
pierre
19e037dde7 * Try to improve directory handling of program
git-svn-id: trunk@16057 -
2010-09-28 10:21:51 +00:00
pierre
7c04d8d13b From patch submitted by Willibald Krenn in Bug Report 17500.
* assemble.pas (TInternalAssembler.WriteStab): Use RELOC_ABSOLUTE32 for
   32-bit stab entry.
 * ogcoff.pas: Add check for correct generated reloc section size.
 * systems/t_win.pas: Use 0x400000 image base for x86_64 programs using
   stabs debug information format.

git-svn-id: trunk@16056 -
2010-09-28 10:06:54 +00:00
florian
7199ac4ad7 + apply cse on load parent frame pointer nodes
git-svn-id: trunk@16055 -
2010-09-27 20:54:34 +00:00
Jonas Maebe
e6c09430cb * fixed inverted condition in r16052 that could cause superfluous parameter
copies (and missing parameter copies, although that was less likely)

git-svn-id: trunk@16053 -
2010-09-27 14:23:08 +00:00
Jonas Maebe
6094cb79dc * fixed internalerrors on non-use_fixed_stack platforms after r16050:
stack parameters can also be split over multiple locations

git-svn-id: trunk@16052 -
2010-09-27 09:52:47 +00:00
Jonas Maebe
92901a0619 - removed unused local variable after r16050
git-svn-id: trunk@16051 -
2010-09-27 09:51:40 +00:00
Jonas Maebe
f13f6627c4 * moved use_fixed_stack from cgutils to a method in paramgr so it can
be used outside the code generator
  * renamed tabstractprocdef.requiredargarea into callerargareasize,
    and also added calleeargareasize field; added init_paraloc_info(side)
    method to init the parameter locations and init those size fields and
    replaced all "if not procdef.has_paraloc_info then ..." blocks with
    procdef.init_paraloc_info(callersize)"
  * moved detection of stack tainting parameters from psub to
    symdef/tabstractprocdef
  + added tcallparanode.contains_stack_tainting_call(), which detects
    whether a parameter contains a call that makes use of stack paramters
  * record for each parameter whether or not any following parameter
    contains a call with stack parameters; if not, in case the current
    parameter itself is a stack parameter immediately place it in its
    final location also for use_fixed_stack platforms rather than
    first putting it in a temporary location (part of mantis #17442)
  * on use_fixed_stack platforms, always first evaluate parameters
    containing a stack tainting call, since those force any preceding
    stack parameters of the current call to be stored in a temp location
    and copied to the final location afterwards

git-svn-id: trunk@16050 -
2010-09-26 21:24:14 +00:00
Jonas Maebe
92a53a9cf1 * moved initialisation of overridesclasshelper "out" parameter to correct
place (was in a nested procedure instead of in the main one, fix for
    r16035)

git-svn-id: trunk@16039 -
2010-09-24 23:48:14 +00:00
Jonas Maebe
1633341906 * treat methods added via an objccategory to an objcclass in exactly the
same way as regular methods as far as overriding is concerned ("override"
    is now allowed, and even required, to override them in a descendent class;
    and similarly, "reintroduce" must be used if a category wants to replace
    a method in a child class if that method was  added by another category in
    a parent class)
  * print the name of owning objcclass/category of the original method in case
    override/reintroduce is missing for objc methods, since this is no longer
    always the parent class

git-svn-id: trunk@16035 -
2010-09-22 21:26:58 +00:00
Jonas Maebe
f4756b8cc1 * enabled node cse with -O2 for ppc32
* enabled tail recursion with -O2 for ppc64

git-svn-id: trunk@16021 -
2010-09-19 23:27:01 +00:00
Jonas Maebe
1c9fed7ae3 * resolve anonymous external objcclass definitions to the real type also when
a) defining a child class
     b) checking for type conversion compatibility

git-svn-id: trunk@16013 -
2010-09-19 16:05:32 +00:00
florian
3041bbab27 * fixes overflowing internalerror number
git-svn-id: trunk@15998 -
2010-09-16 20:46:11 +00:00
florian
b147f5b716 * don't do tail recursion optimization on method calls having an explicit self pointer, resolves #17402
git-svn-id: trunk@15997 -
2010-09-16 20:45:46 +00:00
joost
b938ea0f2a * For cdecl functions the funcret is not popped by the caller when it is passed
as a para. But in case of the safecall convention, the funcret is always
   returned as para and from the c point-of-view this is a normal para. So it has
   to be popped normally. This was done by correcting the pop_size in 
   ti386callnode.pop_parasize but it's better to do this directly in 
   tcgcallnode.pass_generate_code.

git-svn-id: trunk@15994 -
2010-09-15 20:18:36 +00:00
joost
3ee0e6fd2d * Added comments to explain the tf_safecall_clearstack and tf_safecall_exceptions target flags
git-svn-id: trunk@15993 -
2010-09-15 20:00:03 +00:00
Jonas Maebe
07e47171d2 * don't perform temp substitution of an entire array when assigning only the
first array element (related to mantis #13948 and #17413)

git-svn-id: trunk@15992 -
2010-09-15 15:03:32 +00:00
Jonas Maebe
ac8add7cf9 * don't perform temp substitution for variables whose address has been taken
or that are accessible outside the current block (mantis #17413)

git-svn-id: trunk@15990 -
2010-09-15 12:06:21 +00:00
Jonas Maebe
7f489635da * disabled maybe_call_procvar() again for macpas mode, because it breaks
CodeWarrior compatibility in a more prominent way than failure to
    compile webtbs/tw17379a.pp (-> added %knowncompileerror)

git-svn-id: trunk@15976 -
2010-09-13 20:14:27 +00:00
Jonas Maebe
f0114a8d4e - removed unused variable after r15918
git-svn-id: trunk@15972 -
2010-09-12 16:05:03 +00:00
Jonas Maebe
c43fda1fe1 * enabled maybe_call_procvar() also for macpas mode (calls procvars that
don't have any parameters in most expressions, rather than using them
    as the procvar itself) -> replaced procvar<>nil with assigned(procvar)
    in test/tmacprocvar.pp to keep it compiling (otherwise it now called
    the procvar); necessary in combination with the next fix to compile
    webtbs/tw17379a.pp
  * automatically disambiguate the use of the function name when used as a
    parameter in macpas mode (if the formal parameter type is a procvar
    type then interpret it as the current function definition, otherwise
    as the current function result) (mantis #17379)

git-svn-id: trunk@15971 -
2010-09-12 16:03:00 +00:00
florian
f13eff22b0 + added generic stellaris support as provided by #17365
git-svn-id: trunk@15957 -
2010-09-09 09:02:14 +00:00
Jonas Maebe
f302fcdc98 + TSubRegisterSet definition forgotten to commit in r15952
* fixed compilation on non-x86 platforms after r15952

git-svn-id: trunk@15956 -
2010-09-09 08:48:02 +00:00
paul
4718c88f8d compiler: compare enumerator operator "current" return type with the loop variable while searching for enumerator
git-svn-id: trunk@15953 -
2010-09-09 08:22:13 +00:00
Jonas Maebe
22b4860dd7 * getregisterinline() can be used to replace multiple size variants
of the same register (or of a register and its aliases) -> make
    sure that all relevant constraints are applied to it as well
    (mantis #16980)

git-svn-id: trunk@15952 -
2010-09-08 21:13:02 +00:00
Jonas Maebe
a311607ca6 * do not convert the second argument of inc/dec(ptrtype,value) into a
pointer, because that will force "value" to become unsigned, which
    result in errors in case of negative 64bit constants in case they
    are multiplied by the size of the pointed type in ncginl (the
    tconstexprint type operators have to handle positive and
    negative numbers differently) (mantis #17342)

git-svn-id: trunk@15951 -
2010-09-08 15:33:43 +00:00
pierre
973c23e12c * Fix for win64 GNU AS bug
git-svn-id: trunk@15939 -
2010-09-02 23:41:02 +00:00
pierre
cd0329a15e * fix target options for GNU ld
git-svn-id: trunk@15938 -
2010-09-02 06:59:01 +00:00
pierre
9518188c4d * Also use CMP -i218 for win64 target
git-svn-id: trunk@15934 -
2010-09-01 11:43:28 +00:00
pierre
0083fc3e3d * Avoid overflow error
git-svn-id: trunk@15922 -
2010-08-30 12:48:54 +00:00
Jonas Maebe
7ba5eaf272 * fixed copy/paste error in the test, and the compiler bug that was
triggered by it (make sure that records with indexed array fields
    are never kept in registers), mantis #17283

git-svn-id: trunk@15921 -
2010-08-30 11:27:14 +00:00
Jonas Maebe
80086184d3 * mark values typecasted to regular array types and indexed as non-regable,
so that they aren't forced into a temporary location when passed to a
    var parameter later on (mantis #17283)

git-svn-id: trunk@15918 -
2010-08-29 17:19:58 +00:00
joost
65ab1e820b * Safecall on linux/i386 now behaves like cdecl plus hidden exception support.
* Adapted tests because safecall on linux/i386 now does not include high() 
   support anymore

git-svn-id: trunk@15913 -
2010-08-27 19:07:22 +00:00
pierre
c03fa8e79d + Add warning if @GOTPCREL will not be honored
git-svn-id: trunk@15911 -
2010-08-26 15:51:36 +00:00
florian
0c9298a1be * update of German error message file by Karl-Michael Schindler, resolves #17256
git-svn-id: trunk@15904 -
2010-08-25 15:52:56 +00:00
Jonas Maebe
821d0c5d26 * use fact that a method belongs to an objectsymtable to determine that
it is a method (_class is also set for nested procedures of methods),
    resolves problem reported in
    http://lists.freepascal.org/lists/fpc-pascal/2010-August/026259.html

git-svn-id: trunk@15898 -
2010-08-24 20:30:18 +00:00
pierre
74a4b4cafc * Suppress warnings
git-svn-id: trunk@15896 -
2010-08-24 15:30:36 +00:00
Jonas Maebe
5ca1bd2a32 * if the unit of a procedure call is explicitly specified, limit the search
for (overloaded) procsyms to that unit (mantis #17220)

git-svn-id: trunk@15887 -
2010-08-23 20:51:40 +00:00
florian
3a07adf27e * reduce redundant temporary interfaces variables, resolves #14092
git-svn-id: trunk@15880 -
2010-08-23 11:56:17 +00:00
florian
700f687692 * nested open array constructors are not allowed, resolves #17213
git-svn-id: trunk@15876 -
2010-08-22 20:13:27 +00:00
florian
deef8dfa33 * better error message in case of self-referencing generics specialization, resolves #17181
git-svn-id: trunk@15850 -
2010-08-19 08:00:57 +00:00
pierre
11654d5f8c * nflw.pas: Add lnf_simplify_processing loopflag value.
* nutils.pas: Adapt dosimplify to handle loop nodes so that the condition
  is simplified before any of the possible alternatives to avoid compilation
  failures as was appearing for a while on 64-bit compiler if DEBUG=1 was used.

git-svn-id: trunk@15848 -
2010-08-18 16:08:30 +00:00
Jonas Maebe
cc2f4138a3 * make it clear that the unit_u_source_modified is about source files that
are newer than the ones used to create the ppu file, rather than that
    the source file itself is necessarily newer than the ppu file (the
    time stamp of the ppu file is used to check whether the main source file
    has been changed, but for include files the time stamps are recorded in
    the ppu file)

git-svn-id: trunk@15843 -
2010-08-18 14:13:24 +00:00
Jonas Maebe
304a8f4db7 * only insert the current list of pc-relative data if it's not empty,
solves the problem whereby an empty list could sometimes be inserted
    after a jump table load (in case the jump table was larger than the
    maximally allowed offset, and if there was a skipinstr between the
    previous instruction and the jump table load) (mantis #17164)

git-svn-id: trunk@15831 -
2010-08-16 20:17:07 +00:00
Jonas Maebe
97f9157a7a * convert LOC_FLAGS/LOC_JUMP to cbool value in bool_to_bool conversion,
otherwise it stays 0/1 instead of becoming 0/-1 (mantis #17180)

git-svn-id: trunk@15830 -
2010-08-16 17:54:39 +00:00
Jonas Maebe
eb2581946c o adapted to current ppu format:
* support enumsyms stored as part of the enumdef (r15051)
    * removed po_local and added po_delphi_nested_cc (r15694)
    * renamed pi_has_goto to pi_has_label (r15712)

git-svn-id: trunk@15798 -
2010-08-13 13:24:28 +00:00
pierre
8e8a573707 * commit 15780 reverted
git-svn-id: trunk@15784 -
2010-08-11 21:45:55 +00:00