Commit Graph

456 Commits

Author SHA1 Message Date
Jonas Maebe
1e227f78fe * factored out the check for whether we have to generate dotted function
names, and disabled them for ppc64 ELFv2
  * disabling those also disables the function descriptors, so use the
    _CALL_ELF compiler variable to check whether there is in fact a
    function descriptor

git-svn-id: trunk@30196 -
2015-03-14 18:35:25 +00:00
florian
78742c3c87 * use armv4 as default, FPC never generated valid armv3 code
git-svn-id: trunk@29794 -
2015-02-22 20:53:48 +00:00
florian
c34bffd56a * $SUBARCH => $FPCSUBARCH
git-svn-id: trunk@29316 -
2014-12-23 20:48:35 +00:00
nickysn
b193073e32 + support the $fpcmemorymodel macro in fpc.cfg
git-svn-id: trunk@29315 -
2014-12-23 18:55:57 +00:00
svenbarth
9f138fd659 Fix for Mantis #26022.
globals.pas:
  * enable type helpers by default for mode Delphi and DelphiUnicode

git-svn-id: trunk@29173 -
2014-11-28 16:39:12 +00:00
florian
03521f0413 + make $SUBARCH (cputypestr) and $FPCABI available to configuration files
git-svn-id: trunk@29124 -
2014-11-23 17:29:00 +00:00
Tomas Hajny
75c61150d9 * option -m made conditional (-dPREPROCWRITE) like its processing
git-svn-id: trunk@29098 -
2014-11-21 13:52:10 +00:00
florian
5c67fcc43f + change always floating point divisions into multiplications if they are a power of two,
this is an exact operation so it is always allowed
* change only divisions by normal numbers into multiplications

git-svn-id: trunk@29085 -
2014-11-16 20:47:38 +00:00
Tomas Hajny
3ee3542744 * boolean constant instead of IFDEFs for detection of microcontroller support
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
nickysn
1910177cf0 + added heapmax support to the $M directive on i8086-msdos. It is currently
only implemented in the near data memory models. The far data models support
  is still a TODO.

git-svn-id: trunk@28039 -
2014-06-23 20:17:17 +00:00
nickysn
d6ad2b1f8a + added support for mixing near and far procedures in the i8086 far code memory
models. The $F directive and the 'near' and 'far' procedure modifiers should
  now work as expected in the far code memory models (they are still ignored in
  the near code memory models). The compiler defaults to the {$F+} state,
  because {$F-} requires adding 'far' to a lot of procedures in the rtl,
  packages and tests.

git-svn-id: trunk@27590 -
2014-04-16 23:09:18 +00:00
florian
b2b26f84cf * partially merged the mips-embedded branch of Michael Ring:
- startup code/controller units are not merged yet
  - assembler call does not pass the needed CPU type yet

git-svn-id: trunk@27188 -
2014-03-19 21:25:38 +00:00
pierre
4441bbb9dc Add new global asmextraopt variable
git-svn-id: trunk@26537 -
2014-01-21 00:14:49 +00:00
pierre
1cec09f979 Add -Caoldwin32gnu ABI option to cope with 'ret $4' issues in old GNU mingw32 C compiler (version below 4.7)
git-svn-id: trunk@26536 -
2014-01-20 22:47:46 +00:00
paul
52d1cbc544 compiler:
+ add -FM command line option to pass directory for unicode binary files
  + enable dynamic loading of charset files (don't disable runtime charset files for the moment)

git-svn-id: trunk@26378 -
2014-01-04 15:44:18 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
florian
99eadb91b3 * run CheckAndWarn to get proper locations for warnings about uninitialized variables
* several fixes to liveness analysis
* get rid of old version defines
+ tests

git-svn-id: trunk@26159 -
2013-12-01 17:01:51 +00:00
nickysn
8fad859161 * the default packrecords setting changed to 1 on i8086 for Turbo Pascal 7
compatibility

git-svn-id: trunk@25718 -
2013-10-07 20:42:17 +00:00
florian
9cb5212378 * patch by Anton Rieckert: cpu_armv7em should default to thumb(2) code as well, resolves #25142
git-svn-id: trunk@25646 -
2013-10-05 12:37:06 +00:00
nickysn
826b4678f3 * moved UpdateAlignmentStr, UpdateOptimizerStr, UpdateWpoStr and UpdateDebugStr from unit globals to unit dirparse
git-svn-id: trunk@25634 -
2013-10-04 08:26:02 +00:00
nickysn
989c543ea2 * UpdateTargetSwitchStr moved from unit globals to unit options in order to
avoid the dependency of unit globals on unit symtable, which breaks the build
  of ppudump

git-svn-id: trunk@25596 -
2013-09-28 15:43:56 +00:00
nickysn
ac66f3ae1b + added new field 'define' to ttargetswitchinfo, which specifies a system macro
to be defined while the target switch is active
* the CLD target switch defines 'FPC_ENABLED_CLD' once again

git-svn-id: trunk@25594 -
2013-09-28 14:14:32 +00:00
nickysn
bd0585274e * tsettings.enablecld converted to a targetswitch ts_cld
git-svn-id: trunk@25592 -
2013-09-28 13:41:58 +00:00
nickysn
52fcc0a407 + added a new x86-specific compiler option 'enablecld', which controls whether
the compiler should emit a CLD before using the x86 string instructions.

git-svn-id: trunk@25590 -
2013-09-28 11:54:02 +00:00
nickysn
52a5ffc386 * use apptype to indicate that the target is a DOS .COM file, instead of introducing a new field in tsettings (as suggested by Sven)
git-svn-id: trunk@25544 -
2013-09-24 12:13:47 +00:00
nickysn
567cdf875b + added new i8086 compiler options -Wtexe and -Wtcom for specifying the MS-DOS
binary format (.exe or .com)
* the default format for i8086 tiny model binaries changed to .exe

git-svn-id: trunk@25528 -
2013-09-21 16:44:14 +00:00
paul
385fc9cb37 compiler: remove strange nowhere used define
git-svn-id: trunk@25450 -
2013-09-11 03:06:47 +00:00
Jonas Maebe
de56f909d5 * synchronized with trunk up to and including r25430
git-svn-id: branches/cpstrrtl@25431 -
2013-09-06 10:09:26 +00:00
Jeppe Johansen
9acfd929f5 Added ARMv6M to cpu types where the default instruction set is Thumb
git-svn-id: trunk@25402 -
2013-09-03 06:57:24 +00:00
florian
d4968e054b + arm: tsettings.instructionset
* the selected instruction set is now independent from the cpu type: e.g. armv7-a can perfectly execute thumb(2) code

git-svn-id: trunk@25370 -
2013-08-25 21:56:12 +00:00
florian
6e7edf1933 * make x86memorymodel i8086 only
git-svn-id: trunk@25369 -
2013-08-25 21:56:08 +00:00
Jonas Maebe
efa95bed66 * changes so the compiler can be compiled with a unicode RTL without warnings
git-svn-id: branches/cpstrrtl@25307 -
2013-08-19 22:47:07 +00:00
nickysn
b409d600ee + implemented the tiny memory model for i8086-msdos; we now produce working dos .com files as well
git-svn-id: trunk@24793 -
2013-06-02 23:02:10 +00:00
Károly Balogh
76d7527909 also return nil for the empty env vars in the generic implementation in GetEnvPChar
git-svn-id: trunk@24733 -
2013-06-01 17:40:34 +00:00
sergei
fe322f35d5 * MIPS: fixed passing CPU type specified with -CpXXX switch to assembler
- removed mips_cpu variable and cpu_mips_default CPU type.
  * globals.pas: default CPU type changed to MIPS2, this is what was passed to assembler before.

git-svn-id: trunk@24643 -
2013-05-30 15:02:40 +00:00
Jonas Maebe
1358618c36 * only display and allow ABIs that are actually supported by the current
compiler binary

git-svn-id: trunk@24475 -
2013-05-08 14:30:38 +00:00
florian
0e41df598e * merge i8086 branch by Nikolay Nikolov
git-svn-id: trunk@24324 -
2013-04-25 20:23:51 +00:00
Jonas Maebe
9023148bb1 * fixed compilation of JVM rtls after r24188 (there is no JMP_BUF type
on that platform)

git-svn-id: trunk@24259 -
2013-04-16 10:08:58 +00:00
nickysn
44ffc298d5 cpu_i8086 and system_i8086_msdos added to the systems.inc enums
git-svn-id: branches/i8086@23710 -
2013-03-07 22:38:35 +00:00
paul
f9277d2043 compiler: add comment for all application types
git-svn-id: trunk@23602 -
2013-02-13 02:05:07 +00:00
Jonas Maebe
227bb7d850 * made behaviour of -CT parameters consistent with other parameters: instead
of -CTnoTargetSwitch, now you can (and have to) use -CTTargetSwitch- to
    disable it

git-svn-id: trunk@23576 -
2013-02-05 23:09:41 +00:00
Jonas Maebe
4022c29500 * mark each target switch with whether it's global or not, so a compiler
directive can be added that enables changing the local ones

git-svn-id: trunk@23562 -
2013-02-02 15:22:13 +00:00
florian
db68214e88 + support setpeoptflags directive, resolves #23447
git-svn-id: trunk@23132 -
2012-12-10 19:17:25 +00:00
florian
69d96d9bf9 * modified patch by Mark Morgan Lloyd to pass cpu type to the assembler, resolves #23390
git-svn-id: trunk@23107 -
2012-12-03 21:54:37 +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
florian
1cb97f23e5 + cpuinfo unit for arm64
+ set basic types in the globals units for arm64

git-svn-id: trunk@22896 -
2012-10-31 22:03:56 +00:00
florian
f25f44605e - get rid of m_all, use a set instead for tokens, this allows to disable/enable tokens depending on the language mode
git-svn-id: trunk@22506 -
2012-09-30 21:03:35 +00:00
marco
e4c0132109 * workaround breakage due to fpgetenv deprecation in combination with
-Se.

git-svn-id: trunk@22368 -
2012-09-10 17:40:07 +00:00
pierre
d67d1abcba * Use field by field write of current_settings for replaytoken and remove packed attribute for tsettings type
git-svn-id: trunk@21594 -
2012-06-13 21:51:59 +00:00
pierre
a52699cf98 MIPS packed record are not working yet, so do not use them for TSEttings record
git-svn-id: trunk@21587 -
2012-06-12 22:55:37 +00:00