Commit Graph

645 Commits

Author SHA1 Message Date
Jonas Maebe
39e31337f1 * documented -CTthumbinterworking parameter
git-svn-id: trunk@23577 -
2013-02-05 23:09:48 +00:00
florian
3ca7a5ff8e - remove switch -Wx for arm thumb interworking, one should use -CTHUMBTINTERWORKING=ON instead
git-svn-id: trunk@23572 -
2013-02-04 21:46:27 +00:00
florian
cbf7eaaffc * copyright year updated
git-svn-id: trunk@23571 -
2013-02-04 21:33:23 +00:00
florian
d0cbcd419e * update of the German compiler message file by Karl-Michael Schindler, resolves #23728
git-svn-id: trunk@23535 -
2013-01-29 18:34:12 +00:00
sergei
d762ef9e78 + PECOFF targets: support more than 65535 relocations per object section, resolves #23752. DJCOFF targets: give a fatal error, since this object file format does not support extended relocations.
git-svn-id: trunk@23521 -
2013-01-26 16:15:59 +00:00
florian
7184306a4c + option -Wx to generate thumb interworking safe code on arm
git-svn-id: trunk@23463 -
2013-01-20 15:26:59 +00:00
paul
1b8369dd99 compiler: don't allow parameterless constructors
git-svn-id: trunk@23436 -
2013-01-18 01:24:04 +00:00
paul
3a3c10a474 compiler: don't allow constants, methods, class members and properties for local or anonymous records (fixes bug #0023000)
git-svn-id: trunk@23421 -
2013-01-17 09:05:59 +00:00
florian
fce9e953b4 + nested exit support
git-svn-id: trunk@23309 -
2013-01-04 19:09:04 +00:00
Jonas Maebe
6ac8b4fbdf * give a proper error when an mmx/fpu/sse register is used inside a memory
reference (mantis #23441)

git-svn-id: trunk@23152 -
2012-12-15 22:47:16 +00:00
florian
db68214e88 + support setpeoptflags directive, resolves #23447
git-svn-id: trunk@23132 -
2012-12-10 19:17:25 +00:00
Jonas Maebe
2dac1c445a - disabled Stabs support on 64 bit targets (mantis #23365)
* show a warning if an unsupported debug format is selected

git-svn-id: trunk@23056 -
2012-11-24 13:15:58 +00:00
florian
f6109d7c65 * improved error reporting by printing the type being found in with expressions
git-svn-id: trunk@23019 -
2012-11-18 17:09:36 +00:00
Jonas Maebe
cb41d6355c * clarified -Cb explanation (mantis #23308)
git-svn-id: trunk@22982 -
2012-11-12 10:34:00 +00:00
Jonas Maebe
4aa05f5133 + support for automatically generating setters/getters for properties on the
JVM target, since Java bytecode itself has no support for properties and
    hence exposing properties to external Java code can only be done through
    getters/setters. Use the new parameters to do so:
      -CTautogetterprefix=XXX
      -CTautosetterprefix=YYY
    The getter/setter will get the same visibility as the property. If a
    getter/setter with the same naming convention was already specified for a
    property and this getter/setter is declared in the same class as the
    property, then the visibility of this existing getter/setter is
    modified and no new routine is generated.

    Newly generated getters/setters are virtual methods, because that is
    the only way in Java bytecode to allow redefining these getters/setters
    in child classes. However, that also means that using these switches can
    change the behvaviour of code, since normally the used property definition
    is only determined by the declared type of its associated class instance,
    and not by the actual instance type. The compiler will therefore warn when
    such an automatically generated getter/setter is overridden by another
    automatically generated getter/setter in a child class.

git-svn-id: trunk@22959 -
2012-11-08 20:18:08 +00:00
joost
55d03b775e * Within the LaTeX help-text, underscores have to be escaped.
git-svn-id: trunk@22920 -
2012-11-03 17:07:59 +00:00
svenbarth
8a631e9ba8 msg/errore.msg:
added "NativeNT" to target list for i386

git-svn-id: trunk@22882 -
2012-10-30 13:30:53 +00:00
florian
a499a30ca9 * fixes to avx support by Torsten Grundke
git-svn-id: trunk@22773 -
2012-10-19 16:45:53 +00:00
pierre
01c8ac4b3e Fix wrong arg number in pareser_e_nostackframe_with_locals
git-svn-id: trunk@22687 -
2012-10-17 10:52:12 +00:00
pierre
be5839e44a Add warning/error message about possible problems with nostackframe modifier
git-svn-id: trunk@22677 -
2012-10-16 22:42:28 +00:00
florian
283ff05127 * merged avx support in inline assembler developed by Torsten Grundke
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
Jonas Maebe
81b50af768 * fixed typo (overring -> overriding)
git-svn-id: trunk@22564 -
2012-10-06 16:22:31 +00:00
Jonas Maebe
eeda54b7eb * fixed copy-paste error in -O4 description
git-svn-id: trunk@22253 -
2012-08-26 21:04:40 +00:00
Jonas Maebe
4d0e4e1b56 * treat "[var + rip]" in intel assembler mode as addr_pic_no_got on x86-64
(mantis #22665)
  + support "[var wrt ..gotpcrel]" nasm/yasm syntax in intel assembler mode
    for GOT-relative accesses on x86-64, + give an error when trying to do
    this on win64 (it doesn't have a GOT)
  * moved code that give a warning when using GOT-relative accesses to
    static data on x86-64 from the AT&T reader to rax86 so it's also
    active for the Intel assembler reader
  + added warning when not using GOT-relative accesses (but plain
    RIP-relative instead) to global data on non-Win64 x86-64

git-svn-id: trunk@22243 -
2012-08-25 15:12:49 +00:00
Jonas Maebe
288d1ec74a * support referencing "result" in nostackframe pure assembler routines if
the result location is a simple location (a single register/reference)
    (mantis #22490)
  * print an error when accessing "result" in a nostack pure assembler routine
    if the result location is not simple

git-svn-id: trunk@22166 -
2012-08-21 19:51:40 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
florian
fb7f25f410 * removed wrong -N switch (switch is not used) description
git-svn-id: trunk@22037 -
2012-08-08 17:02:05 +00:00
Jonas Maebe
aad3ce960a * give an error when trying to give a parameter of a non-simple type a
default value (mantis #22343)
  * give an error when specifying an invalid default value (e.g. a
    floating point number for a longint parameter)

git-svn-id: trunk@22021 -
2012-08-06 20:13:20 +00:00
sergei
684bf4fba2 + Reject object types without VMT as arguments of typeof(). Without this check, an undefined reference to VMT is generated which fails at the linking stage.
git-svn-id: trunk@21923 -
2012-07-17 05:46:55 +00:00
Jonas Maebe
c2be657671 * give an error instead of a note on the JVM target when overriding a
method by one with a lower visibility, because calling the overriding
    method results in a java.lang.AbstractMethodError in that case

git-svn-id: trunk@21839 -
2012-07-10 09:20:11 +00:00
Jonas Maebe
b0462d27cc * by default, no longer initialize enumeration fields of classes/objects
with the enum instance corresponding to ordinal 0 in JVM constructors,
    because a virtual method called by a parent constructor may already
    have assigned a different value (see tests/test/jvm/tenum2.pp). This
    will result in null pointer exceptions when using such fields without
    first explicitly assigning a value to them though.

    The old behaviour can be restored with the new -CTenumfieldinit command
    line parameter

git-svn-id: trunk@21736 -
2012-06-29 21:24:35 +00:00
Jonas Maebe
9f0fb9cf10 - removed "<<<<<<< HEAD" leftover from a conflicting merge
git-svn-id: trunk@21409 -
2012-05-28 12:08:14 +00:00
florian
6c8eed21c4 + implement auto inlining (-Ooautoinline)
+ implement trashing of local variables if subroutine is inlined
* fix some errors releated to interproc. gotos and inlining
+ node_count function
* inline cannot be used with iochecking and safecall calling conventions
* track inherited usage
* don't inline if inherited is used

git-svn-id: trunk@21335 -
2012-05-19 13:30:02 +00:00
Jonas Maebe
958600e74b * by default disable the warning about interfaces raising a particular
method's visibility, because this is common practice in Object-Pascal.
    It can be re-enabled with {$warn INTF_RAISE_VISIBILITY on} (mainly
    useful when trying to keep code compatible with the JVM target)

git-svn-id: trunk@21329 -
2012-05-19 10:19:49 +00:00
paul
d79eee8ed1 compiler: write a warning if unit should be compiled with built-in system codepage for ansistring constants but this codepage is not known by the compiler
git-svn-id: trunk@21269 -
2012-05-10 01:24:18 +00:00
Jonas Maebe
64f3ba3299 * clarified description of -Xd, it is not always required for
cross-compiling (mantis #21963)

git-svn-id: trunk@21248 -
2012-05-06 15:44:52 +00:00
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00
Jonas Maebe
3380b58695 * when we get near the limit of the maximum number of TOC entries that can
be generated for a single object file on AIX, automatically switch to
    an indirection scheme that uses much less TOC entries, but is slower to
    access global variables
  * manually merged infrastructure for target-specific code generation
    switches from JVM branch (-CTxxx switches)
  * -CTsmalltoc switch for AIX that forces the indirection scheme for TOC
    entries from the start in case the automatic one does not conserve
    a sufficient amount (or in case you bump up against the global TOC
    entries limit during linking)

git-svn-id: trunk@20963 -
2012-04-21 20:17:46 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
7aa3b99fb5 + -CN/{$CHECKLOWADDRLOADS+/-} switch to enable explicit checks for accesses
to low addresses in case the target cpu/OS does not support this (enabled
    for reads on AIX/PPC because on AIX the first 16KB are readable)

git-svn-id: trunk@20832 -
2012-04-11 18:05:50 +00:00
Tomas Hajny
b11a2b169a * fixed inconsistent license files references
git-svn-id: trunk@20763 -
2012-04-08 20:00:45 +00:00
Tomas Hajny
a5a7c2aa3e * directions for reporting bugs are different from those for asking questions nowadays
git-svn-id: trunk@20747 -
2012-04-07 16:43:15 +00:00
Tomas Hajny
20ebbefc2b * e-mail address for reporting bugs is not valid since long time ago
git-svn-id: trunk@20746 -
2012-04-07 16:31:08 +00:00
Tomas Hajny
b12c38984b * fpc binary supported options made localizable and not shown separately from those handled by ppc* any longer
git-svn-id: trunk@20694 -
2012-04-02 22:11:21 +00:00
Jonas Maebe
6ba8dc7146 + support for the ARM hard float EABI on Linux (patch by Peter Green):
o new eabihf (hard float) abi
   o vfpv3_d16 variant of VFP (default variant used by EABI assemblers: VFPv3
     with only 16 double registers instead of 32) and pass it to GNU as
   o make the odd numbered single precision floating point VFP registers
     available for explicit allocation for use by the calling convention
  * fixed copy/paste error in stdname of S30 register
  -> use -dFPC_ARMHF to create an ARM eabi hard float compiler
  (mantis #21554)

git-svn-id: trunk@20660 -
2012-03-29 20:50:09 +00:00
svenbarth
c9ca2a6c0c Correct messages that should not have been changed (merge during update gone wrong). Resolves Mantis #21553
git-svn-id: trunk@20631 -
2012-03-25 19:33:26 +00:00
svenbarth
bd19a16be9 Add support for Default() intrinsic. For now this is only (fully) supported
in code and not in constants. In the case of primitive types constant nodes
are used while complex types like arrays, records and objects use a local
variable which is initialized to zero once at the entry of the method (the
variable is reused if Default() is used for the same type multiple times in
the same method). For this a new compilerproc was added which uses FillChar
to initialize the given memory area to zero.
This fixes Mantis #9420.

+ psystem.pas: Added Default symbol to system unit
+ htypechk.pas: Added function "is_valid_for_default" which checks recursively
                whether the given type can be used with Default at all. 
                Forbidden types are files, helpers, ObjC and C++ types. This
                check is used for records, arrays and objects only if the mode
                is a non-Delphi one, as Delphi ignores these types on lower
                levels.
+ msg/errore.msg: Added error message for unsupported types for Default()
+ symconst.pas: Added a new enum value vo_is_default_var which is used for the
                local variables utilized by Default() so their initalization
                and finalization can be avoided.
+ pexpr.pas: Add handling of Default() intrinsic to "statement_syssym"
+ ninl.pas: Extended tinlinenode by a method which returns the correct node for
            a Default() and used that method in handle_typecheck.
* ncgutil.pas: Check for new flag "vo_is_default_var" when initializing and
               finalizing local variables.
* ppu.pas: increase PPU version
+ psub.pas: 
  * Added a new routine which zeros defaultvars of a symtable.
  * Use this routine inside "initializevars".
  * Also use this routine to initialize the staticsymtable of the unit/program.
* Adjusted ppudump, because of the new enum value.
+ Added implementation of fpc_zeromem to system unit.
+ Added tests for Default()

git-svn-id: trunk@20629 -
2012-03-25 16:02:27 +00:00
florian
f4af507321 * inline is only a hint to the compiler which might be ignored so throw only a hint and not a warning if subroutine cannot be inlined
git-svn-id: trunk@20626 -
2012-03-25 14:19:45 +00:00
florian
0a118768c0 * updated copyright message to 2012
git-svn-id: trunk@20605 -
2012-03-23 18:38:05 +00:00
Jonas Maebe
3589f90cf8 * also show the valid bounds in most cases when signalling a range check
warning/error while evaluating constants (mantis #21299)

git-svn-id: trunk@20507 -
2012-03-10 21:53:36 +00:00