fpc/compiler
Jonas Maebe c6ba0bb6fb + support for targets that require by-reference value parameters to be
be copied on the caller instead of callee side
   o mark Darwin/Aarch64 as such a target (any AArch64 target will be like
     that normally, as its ABI specifies this behaviour)
   o don't mark by-reference value parameters on such targets as
     vo_has_local_copy, since a) they don't have one (the copy is on the
     caller side), and b) this ensures that all code handling such
     parameters automatically knows that they are still by reference
     after the init code has run
   o when making the copies on the caller side, don't increase the
     reference count for managed types except for variants, just like
     is done when making the copies on the callee side. This is because
     the reference count increasing code on the callee side only runs
     for non-assembler functions, and we cannot know 100% certain on the
     caller side whether the called function is assembler or not (e.g. in
     case of externally declared functions)
   o maybe over time we can reuse the Pascal code in
     tcallparanode.copy_value_by_ref_para to replace the equivalent code
     in hlcgobj and ncgutil also on the caller side for other targets

git-svn-id: trunk@29870 -
2015-02-23 22:50:20 +00:00
..
aarch64 + aarch64 math nodes implementation 2015-02-23 22:50:13 +00:00
alpha - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
arm * ARM assembler reader: don't check for postfixes beyond the length 2015-02-23 22:47:56 +00:00
avr - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
generic - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
html
i386 + cpu capability CPUX86_HAS_CMOV 2015-02-21 20:47:40 +00:00
i8086 + applied remaining patches of Torsten Grundke: adds gather instructions of avx2 2015-02-17 21:43:46 +00:00
ia64 - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
jvm - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
m68k m68k: some ideas for a future second_abs_long implementation. no functional changes. 2015-02-23 03:37:51 +00:00
mips - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
msg * update of german message files by Karl-Michael Schindler, resolves #27342 2015-02-01 16:24:23 +00:00
powerpc - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
powerpc64 - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ppcgen - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
sparc - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
systems + mips/mipsel libraries need PIC 2015-02-18 13:53:20 +00:00
utils + Darwin/AArch64 system identifier 2015-02-23 22:50:16 +00:00
vis - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
x86 * fixed i8086 compilation 2015-02-23 08:51:59 +00:00
x86_64 + cpu capability CPUX86_HAS_CMOV 2015-02-21 20:47:40 +00:00
aasmbase.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
aasmdata.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
aasmsym.pas
aasmtai.pas m68k: basic 68881 FPU register save/restore support. probably still needs some work here and there. 2015-02-07 22:13:07 +00:00
aggas.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
agjasmin.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
aopt.pas * honour -Oonopeephole 2014-03-11 23:18:58 +00:00
aoptbase.pas * simplified RegInInstruction() and fixed range errors 2013-11-06 10:46:22 +00:00
aoptcs.pas
aoptda.pas
aoptobj.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
asmutils.pas
assemble.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
blockutl.pas + support for calling a method via a block: we capture the method as a 2014-07-18 09:15:35 +00:00
browcol.pas Avoid infinite recursion on generic classes for IDE browser 2013-11-12 16:39:20 +00:00
bsdcompile
catch.pas
ccharset.pas
cclasses.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
cfidwarf.pas
cfileutl.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
cg64f32.pas + support overriding tdef/tsym methods with target-specific functionality: 2014-03-29 22:31:55 +00:00
cgbase.pas + GOT-related (Darwin) address modes 2015-02-23 22:49:10 +00:00
cghlcpu.pas + override g_save_registers() and g_restore_registers() with do-nothing versions 2013-11-10 21:33:38 +00:00
cgobj.pas * fixed register sizes in a_load_ref_reg_unaligned() 2015-02-23 22:47:50 +00:00
cgutils.pas + aarch64-specific treference fields 2015-02-23 22:49:13 +00:00
cmsgs.pas
comphook.pas
compiler.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
compinnr.inc - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
comprsrc.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
constexp.pas * make use of the noreturn directive for internalerror 2013-11-10 09:01:03 +00:00
COPYING.txt
cpid.pas
crefs.pas * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables 2013-12-01 17:02:08 +00:00
cresstr.pas compiler: remove RST writer 2014-01-19 04:40:41 +00:00
cstreams.pas * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables 2013-12-01 17:02:08 +00:00
cutils.pas
cwindirs.pp
dbgbase.pas * don't generate debug info for class fields in generic types 2014-06-10 19:05:10 +00:00
dbgdwarf.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
dbgstabs.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
dbgstabx.pas Do not consider ansi/wide/unicode strings as taggable for stabs 2014-04-22 22:32:14 +00:00
defcmp.pas + support for calling a method via a block: we capture the method as a 2014-07-18 09:15:35 +00:00
defutil.pas * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
dirparse.pas * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables 2013-12-01 17:02:08 +00:00
elfbase.pas
export.pas
expunix.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
finput.pas * return false, if tdosinputfile.fileopen cannot open a file for reading 2015-02-22 15:52:54 +00:00
fmodule.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
fpccrc.pas
fpcdefs.inc * m68k: Transform 32-bit div/mod nodes into helper calls during pass 1. This is consistent with the way other targets do it, and results in pretty much nicer code. 2014-06-28 13:28:01 +00:00
fppu.pas + commented directive for easier enabling 2015-02-23 22:11:26 +00:00
gendef.pas
globals.pas * use armv4 as default, FPC never generated valid armv3 code 2015-02-22 20:53:48 +00:00
globstat.pas
globtype.pas + optimization setting level4 2015-02-08 11:24:30 +00:00
hlcg2ll.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
hlcgobj.pas + support for targets that require by-reference value parameters to be 2015-02-23 22:50:20 +00:00
htypechk.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
impdef.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
import.pas
ldscript.pas
link.pas do not include outputexedir in linker resname. it causes the path to be double-included when cross-compiling with -st and -FE on Liunuxes. also, be consistent between linking on host and target. 2015-02-18 14:09:15 +00:00
macho.pas
machoutils.pas
Makefile * avoid mixed revision information 1:realrevision in revision.inc for fpcbuild checkout 2015-02-12 00:05:45 +00:00
Makefile.fpc * avoid mixed revision information 1:realrevision in revision.inc for fpcbuild checkout 2015-02-12 00:05:45 +00:00
MPWMake
msgidx.inc * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
msgtxt.inc * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
nadd.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
nbas.pas * remove statements with only a nothing node when they are the only children of a block 2015-02-04 21:19:40 +00:00
ncal.pas + support for targets that require by-reference value parameters to be 2015-02-23 22:50:20 +00:00
ncgadd.pas * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables 2013-12-01 17:02:08 +00:00
ncgbas.pas * 16-bit and 8-bit ALU fixes in tcgtempdeletenode.pass_generate_code 2013-12-23 14:09:28 +00:00
ncgcal.pas * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
ncgcnv.pas * give an internal error in second_int_to_bool() if left.expectloc was not 2015-01-30 19:31:31 +00:00
ncgcon.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ncgflw.pas * handle the result of FPC_CATCHES via the high level code generator (which makes it i8086 far pointer safe) 2014-04-02 14:25:19 +00:00
ncginl.pas * fixed length(ansistring/widestring/dynarray) in i8086 far data memory models 2014-04-27 02:26:35 +00:00
ncgld.pas * fixed assigning one float loc_reference to another of a different size if a 2015-02-23 22:47:47 +00:00
ncgmat.pas * fixed tcgshlshrnode.pass_generate_code for 64 bit targets 2015-01-30 19:31:15 +00:00
ncgmem.pas * factored out the check regarding whether the index of a vecn needs to be 2015-02-23 22:48:08 +00:00
ncgnstld.pas
ncgnstmm.pas
ncgobjc.pas
ncgopt.pas * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables 2013-12-01 17:02:08 +00:00
ncgrtti.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ncgset.pas + 8-bit ALU support in tcgcasenode.genlinearcmplist 2014-04-26 12:41:58 +00:00
ncgutil.pas + support for targets that require by-reference value parameters to be 2015-02-23 22:50:20 +00:00
ncgvmt.pas * changed tcallnode.fforcedprocname from shortstring into tsymstr, 2014-05-10 12:47:25 +00:00
ncnv.pas * check whether we are explicitly typecasting untypedpointer^ before other 2015-02-23 22:47:44 +00:00
ncon.pas + support overriding tdef/tsym methods with target-specific functionality: 2014-03-29 22:31:55 +00:00
nflw.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ngenutil.pas * align compiler generated constants according to constant aligment settings 2015-02-08 11:23:01 +00:00
ngtcon.pas * read array initializations in generic subroutines without fixed limits, resolves #25602 2015-02-01 17:09:00 +00:00
ninl.pas * add explicit check that argument of sizeof(x) is a simple load node (this 2015-02-23 22:47:35 +00:00
nld.pas + support overriding tdef/tsym methods with target-specific functionality: 2014-03-29 22:31:55 +00:00
nmat.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
nmem.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
nobj.pas * TVMTBuilder.intf_allocate_vtbls: fixed the Ioffset calculation in i8086 far 2014-05-03 17:05:50 +00:00
nobjc.pas
node.pas + nf_addr_taken: it marks nodes which address is taken 2014-02-07 20:40:42 +00:00
nopt.pas
nset.pas + support overriding tdef/tsym methods with target-specific functionality: 2014-03-29 22:31:55 +00:00
nstate.pas
nutils.pas * properly firstpass nodes when inc(...) is converted into ...:=...+x, resolves #27471 2015-02-17 21:14:45 +00:00
objcdef.pas + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension) 2014-07-18 09:15:22 +00:00
objcgutl.pas * changed some random data label names to match the label names outputted by 2013-12-31 00:28:46 +00:00
objcutil.pas + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension) 2014-07-18 09:15:22 +00:00
ogbase.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ogcoff.pas + Missing part of internal ARM assembler, Mantis #26588. I'm not setting it as default for arm-wince yet, because testing reveals several points in generic code that need adjustments. 2015-01-30 22:45:05 +00:00
ogelf.pas + ELF linker: support writing DT_PREINIT_ARRAY/DT_INIT_ARRAY/DT_FINI_ARRAY dynamic tags. Still misses a lot of sanity checks, and does not sort entries. 2015-01-26 20:34:16 +00:00
oglx.pas
ogmacho.pas
ogmap.pas
ognlm.pas
optbase.pas * run CheckAndWarn to get proper locations for warnings about uninitialized variables 2013-12-01 17:01:51 +00:00
optconstprop.pas * propagate constants into the header of a for loop 2013-12-31 13:16:09 +00:00
optcse.pas + apply cse to more inline nodes 2014-04-27 14:28:17 +00:00
optdead.pas * eliminate classes unit from the compiler by copying an array of string based 2014-03-30 12:03:10 +00:00
optdeadstore.pas * be more careful when removing dead stores 2013-12-28 20:19:42 +00:00
optdfa.pas * handle raise nodes in dfa on jvm, resolves #27416 2015-02-07 18:11:02 +00:00
options.pas * only prepend the sysroot path to -Fl paths if these paths are absolute; 2015-02-23 22:48:02 +00:00
optloop.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
opttail.pas + support overriding tdef/tsym methods with target-specific functionality: 2014-03-29 22:31:55 +00:00
optutils.pas * set successor node for load nodes as well, they can be generated when inlining 2013-12-28 20:19:38 +00:00
optvirt.pas * changed tcallnode.fforcedprocname from shortstring into tsymstr, 2014-05-10 12:47:25 +00:00
owar.pas
owbase.pas
parabase.pas
paramgr.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
parser.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
pass_1.pas * indention and new line fixes 2013-11-06 21:10:28 +00:00
pass_2.pas
pbase.pas Rework the way how "specialize" is handled. Instead of initializing the specialization of a full type declaration (including unit name and parent types) it is now considered part of the specialized type itself. This means that for example the following code: 2015-02-20 16:23:40 +00:00
pdecl.pas * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
pdecobj.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
pdecsub.pas Specialize the correct generic if it has the same name as another generic that is located at another place of the type hierarchy. 2015-02-20 16:28:44 +00:00
pdecvar.pas * check for read/write after a newly declared property (mantis #26011) 2014-06-15 10:59:47 +00:00
pexports.pas
pexpr.pas * fix compilation errors with -O2 due to dfa based warnings 2015-02-21 10:09:37 +00:00
pgenutil.pas Specialize the correct generic if it has the same name as another generic that is located at another place of the type hierarchy. 2015-02-20 16:28:44 +00:00
pinline.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
pmodules.pas * prevent new definitions being added to a global unit symtable after compilation of the implementation part started 2015-02-23 22:10:46 +00:00
pp.lpi + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension) 2014-07-18 09:15:22 +00:00
pp.pas
pparautl.pas + support for targets that require by-reference value parameters to be 2015-02-23 22:50:20 +00:00
ppc68k.lpi
ppc8086.lpi + generate the stack segment for i8086 far data memory models from within fpc 2014-05-27 23:29:50 +00:00
ppcaarch64.lpi
ppcarm.lpi
ppcavr.lpi
ppcjvm.lpi
ppcmips.lpi
ppcmipsel.lpi
ppcppc64.lpi
ppcppc.lpi
ppcsparc.lpi
ppheap.pas
ppu.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ppx86_64.lpi
procinfo.pas * Added virtual method tprocinfo.postprocess_code and moved target-specific processing from base class into target-specific descendant classes (ARM and AVR, other targets still to do). 2014-04-02 13:14:06 +00:00
pstatmnt.pas Rework the way how "specialize" is handled. Instead of initializing the specialization of a full type declaration (including unit name and parent types) it is now considered part of the specialized type itself. This means that for example the following code: 2015-02-20 16:23:40 +00:00
psub.pas * do not warn about internally generated parameters, resolves #25914 2015-02-06 20:44:24 +00:00
psystem.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ptconst.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
ptype.pas Rework the way how "specialize" is handled. Instead of initializing the specialization of a full type declaration (including unit name and parent types) it is now considered part of the specialized type itself. This means that for example the following code: 2015-02-20 16:23:40 +00:00
raatt.pas * support record fields with the same name as registers in subscripts in 2015-02-23 22:47:53 +00:00
rabase.pas
rasm.pas * Moved local label infrastructure into tasmreader, reduces number of global vars. Functionality is not changed. 2014-04-05 09:43:13 +00:00
rautils.pas * fix possible range check errors, resolves #27461 2015-02-17 21:14:47 +00:00
README.txt
regvars.pas
rescmn.pas
rgbase.pas
rgobj.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
scandir.pas + added error message in case the HUGEPOINTERNORMALIZATION directive is used 2014-07-04 17:16:58 +00:00
scanner.pas * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
script.pas * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables 2013-12-01 17:02:08 +00:00
switches.pas + added the $F switch to the turbo and macSwitchTable, as that takes precedence 2014-04-13 15:14:43 +00:00
symbase.pas * prevent new definitions being added to a global unit symtable after compilation of the implementation part started 2015-02-23 22:10:46 +00:00
symconst.pas * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
symcreat.pas + support for calling a method via a block: we capture the method as a 2014-07-18 09:15:35 +00:00
symdef.pas * fixed formatting 2015-02-23 22:48:05 +00:00
symnot.pas
symsym.pas * limit initialization to register variables which really need to be initialized 2015-01-27 21:51:29 +00:00
symtable.pas Avoid warning for function not set if noreturn modifier is used 2015-02-15 18:01:22 +00:00
symtype.pas * support for raising the visibility of inherited properties on the JVM 2014-06-12 11:08:44 +00:00
symutil.pas
systems.inc + Darwin/AArch64 system identifier 2015-02-23 22:50:16 +00:00
systems.pas + support for targets that require by-reference value parameters to be 2015-02-23 22:50:20 +00:00
tgobj.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
tokens.pas * synchronised with trunk till r29513 2015-01-21 23:28:34 +00:00
verbose.pas * make use of the noreturn directive for internalerror 2013-11-10 09:01:03 +00:00
version.pas - reverted partial commit of merge 2015-01-21 23:24:37 +00:00
widestr.pas * add support for Latin-2 character sets (ISO & IBM) 2014-03-27 22:48:13 +00:00
wpo.pas
wpobase.pas * changed tcallnode.fforcedprocname from shortstring into tsymstr, 2014-05-10 12:47:25 +00:00
wpoinfo.pas * call "message" rather than "cgmessage" when throwing fatal errors, because 2014-07-18 09:09:21 +00:00

This directory contains the sources of the Free Pascal Compiler

If you want to compile/modify the compiler, please read first the
programmers manual.

To recompile the compiler, you can use the batch files :
 + mppc386.bat    if you want to build a cross compiler from i386 to m68k
 + mppcsparc      if you want to build a cross compiler from i386 to SPARC
 
 or
Use the make utility as following
  
      make OS_TARGET="compiler OS target" \
      CPU_TARGET="compiler CPU target" \
      FPCCPUOPT="Optimization level" \
      PP="compiler used to compile FPC" \
      COMPILER_OPTIONS="Options passed to compiler" \
      
      
If an option is omitted, then target CPU/OS will be same as current CPU/OS
 
Possibles targets are : linux go32v2 win32 os2 freebsd beos netbsd amiga haiku
atari sunos qnx netware openbsd wdosx palmos macos macosx emx
   
Possible compiler switches (* marks a currently required switch):
  -----------------------------------------------------------------
  GDB*                support of the GNU Debugger
  I386                generate a compiler for the Intel i386+
  x86_64              generate a compiler for the AMD x86-64 architecture
  M68K                generate a compiler for the M68000
  SPARC               generate a compiler for SPARC
  POWERPC             generate a compiler for the PowerPC
  VIS                 generate a compile for the VIS
  DEBUG               version with debug code is generated
  EXTDEBUG            some extra debug code is executed
  SUPPORT_MMX         only i386: releases the compiler switch
                      MMX which allows the compiler to generate
                      MMX instructions
  EXTERN_MSG          Don't compile the msgfiles in the compiler, always
                      use external messagefiles, default for TP
  NOAG386INT          no Intel Assembler output
  NOAG386NSM          no NASM output
  NOAG386BIN          leaves out the binary writer, default for TP
  NORA386DIR          No direct i386 assembler reader
  TEST_GENERIC        Test Generic version of code generator
                      (uses generic RTL calls)
  -----------------------------------------------------------------
  cpuflags            The target processor has status flags (on by default)
  cpufpemu            The target compiler will also support emitting software
                       floating point operations
  cpu64bitaddr        The targets use a 64-bit address space (pointers and
                       the default integer type are 64 bit)
  cpu64bitalu         The target cpu has 64-bit registers available (unless
                       cpu64bitaddr is also defined, pointers and default
                       integer type remain 32 bit, but the cpu can perform
                       64 bit calculations directly without needing helpers)
  -----------------------------------------------------------------

  Required switches for a i386 compiler be compiled by Free Pascal Compiler:
  GDB;I386

to build a compiler to SPARC target using a Win32/i386 you just use :
      make CPU_TARGET=SPARC