fpc/compiler
florian c6116258fd o patch by J. Gareth Moreton:
* adds an extra optimisation to "PostPeepholeOptMov" in compiler/x86/aoptx86.pas:
      If the instruction "MOV REG, -1" (Intel notation) is found, where REG is either
      a 32- or 64-bit register, it is changed to "OR REG, -1" instead.
      The effect is the same and takes exactly the same speed to execute, but the encoding is much smaller.
      As it cause false data dependencies, it is only applied in -Os mode

      For 16-bit registers, only AX is optimised this way because it has its own encoding for OR that takes fewer bytes.

git-svn-id: trunk@43579 -
2019-11-24 20:26:02 +00:00
..
aarch64 * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
arm + patch by J. Gareth Moreton: new method TAOptObj.CanDoJumpOpts and arm specific implementation 2019-11-20 22:12:27 +00:00
armgen Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
avr * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
generic Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
html
i386 * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
i8086 -- Zusammenführen von r43307 bis r43443 in ».«: 2019-11-10 16:44:34 +00:00
jvm * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
llvm * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
m68k * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
mips o patch by J. Gareth Moreton: 2019-11-20 22:12:26 +00:00
msg + add error messages for undefined symbols (both with a known object file and without) 2019-11-21 21:45:04 +00:00
powerpc * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
powerpc64 * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
ppcgen * compilation of x86 and PowerPC fixed 2019-10-09 19:26:59 +00:00
riscv Use correct macro to for 64-bit riscv CPU 2019-11-22 21:29:19 +00:00
riscv32 Use same entered_paren local variable as 64-bit counterpart and fix register names 2019-11-20 22:44:30 +00:00
riscv64 * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
sparc * Set ControllerSupport to false for sparc/sparc64 and x86_64 CPUs. 2019-07-04 15:24:49 +00:00
sparc64 * Set ControllerSupport to false for sparc/sparc64 and x86_64 CPUs. 2019-07-04 15:24:49 +00:00
sparcgen * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures 2019-11-10 16:11:40 +00:00
systems * patch by Alfred: remove superfluous linker script entry, resolves #36345 2019-11-24 12:16:29 +00:00
utils * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
x86 o patch by J. Gareth Moreton: 2019-11-24 20:26:02 +00:00
x86_64 * factored out TX86AsmOptimizer.OptPass1Cmp 2019-11-24 16:33:50 +00:00
aasmbase.pas + support for arm attributes 2019-10-09 17:45:40 +00:00
aasmcfi.pas
aasmcnst.pas - removed maxcrecordalign parameter/field from recordsymtables, as this value 2019-07-14 19:24:32 +00:00
aasmdata.pas * factored out checks whether a procdef's symbol needs to be global, and 2019-07-07 21:33:47 +00:00
aasmdef.pas * also generate indirect symbols for AB_PRIVATE_EXTERN symbols as these might be used from a unit in another package due to inlining 2019-11-21 21:44:12 +00:00
aasmsym.pas
aasmtai.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
aggas.pas * do not write section flags/progbits for .data, .rodata .data.norel as the compiler will ignore them anyways and warn about it 2019-11-09 18:28:30 +00:00
aopt.pas o overhaul-base.patch by J. Gareth Moreton, base for further patches 2019-08-17 16:14:22 +00:00
aoptbase.pas * optimize TAOptBase.SuperRegistersEqual 2019-10-30 20:07:27 +00:00
aoptda.pas
aoptobj.pas Patch by Gareth Moreton. 2019-11-22 09:10:32 +00:00
aoptutils.pas o overhaul-base.patch by J. Gareth Moreton, base for further patches 2019-08-17 16:14:22 +00:00
assemble.pas + support for arm attributes 2019-10-09 17:45:40 +00:00
blockutl.pas - remmoved doregister parameter from t*sym constructors, as the registration 2019-09-14 17:30:45 +00:00
browcol.pas
catch.pas
ccharset.pas Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
cclasses.pas * finally implement tdynamicarray.equal so that exact match comdat sections work as well 2019-10-05 09:42:49 +00:00
cfidwarf.pas * some runtime errors fixed, if compiled with -CrR 2019-07-21 12:25:55 +00:00
cfileutl.pas * fixed opt-in sysroot substitution again, renamed the three-argument version 2019-10-26 13:48:30 +00:00
cg64f32.pas
cgbase.pas + support for the gnu2 general-dynamic tls model on arm, use it instead of the gnu one as the gnu2 one can be relaxed (access optimizations by the linker) 2019-10-05 20:48:26 +00:00
cgexcept.pas * place exception handling code in the correct asmlist 2019-06-08 20:17:06 +00:00
cghlcpu.pas
cgobj.pas * symbols called by g_call might need to be imported from dynamic packages as well 2019-11-21 21:44:29 +00:00
cgutils.pas
cmsgs.pas
comphook.pas
compiler.pas
compinnr.pas + add support for the IsManagedType() intrinsics which reports for a type (or variable) whether it needs initialization/finalization 2019-11-06 23:04:52 +00:00
comprsrc.pas
constexp.pas
COPYING.txt
cpid.pas
crefs.pas
cresstr.pas - removed maxcrecordalign parameter/field from recordsymtables, as this value 2019-07-14 19:24:32 +00:00
cscript.pas
cstreams.pas * partial fix for Mantis #35346: more "inline" directives for TCStream and TCMemoryStream methods 2019-06-28 13:30:33 +00:00
cutils.pas * cutils.pas (size_2_align): Move to.. 2019-09-16 14:50:43 +00:00
cwindirs.pp
dbgbase.pas
dbgcodeview.pas
dbgdwarf.pas * fix for Mantis #35567: use the correct type for the size type of a dynamic array 2019-10-19 15:41:29 +00:00
dbgstabs.pas Use use_tag_types everywhere to get consistent results for 'Tt' versus 't' for stabs for string definitions 2019-06-09 20:59:06 +00:00
dbgstabx.pas Fix error in commit #42199 2019-06-10 13:55:59 +00:00
defcmp.pas * support unique copies of currencies which are handles by torddef, resolves #36013 2019-08-26 19:31:48 +00:00
defutil.pas * properly perform (or not) range/overflow checking when performing constant 2019-11-10 12:00:05 +00:00
dirparse.pas
dwarfbase.pas
elfbase.pas + support for arm attributes 2019-10-09 17:45:40 +00:00
entfile.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
export.pas
expunix.pas
finput.pas Commit of new debug feature implemented by J. Gareth Moreton 2019-06-22 14:08:47 +00:00
fmodule.pas * generate construction function for the attributes used in a unit using a more straight forward approach 2019-07-12 22:07:20 +00:00
fpccrc.pas
fpcdefs.inc * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
fpcp.pas
fpkg.pas
fppu.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
gendef.pas
globals.pas * cutils.pas (size_2_align): Move to.. 2019-09-16 14:50:43 +00:00
globstat.pas
globtype.pas * general-dynamic -> global-dynamic 2019-10-05 20:48:29 +00:00
hlcg2ll.pas * suppress warning for targets without MM registers 2019-06-11 20:03:47 +00:00
hlcgobj.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
htypechk.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
impdef.pas
import.pas
ldscript.pas
link.pas * use a process unique name for link.res, so multiple FPCs can be run in parallel in one directory 2019-08-11 15:58:36 +00:00
macho.pas Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
machoutils.pas Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
Makefile Regenerate all Makefile's after commit #43472 2019-11-15 14:47:02 +00:00
Makefile.fpc Remove ALLOW_WARNINGS=1 for m68k compiler 2019-11-05 10:37:19 +00:00
MPWMake
msgidx.inc * regenerate msg*.inc files after adding new error messages for undefined symbols 2019-11-21 21:45:08 +00:00
msgtxt.inc * regenerate msg*.inc files after adding new error messages for undefined symbols 2019-11-21 21:45:08 +00:00
nadd.pas + optimize integer expressions like 2*x*4; which were not found by the node simplifier yet 2019-11-24 20:21:33 +00:00
nbas.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
ncal.pas * do not optimize inline nodes which are part of call node which has an init and/or cleanup block, resolves #36323 2019-11-21 22:15:06 +00:00
ncgadd.pas * factored out the conditions under which add nodes need to perform 2019-08-03 12:19:50 +00:00
ncgbas.pas
ncgcal.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
ncgcnv.pas
ncgcon.pas
ncgflw.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
ncghlmat.pas
ncginl.pas
ncgld.pas * correctly check for the system unit 2019-11-21 21:44:36 +00:00
ncgmat.pas - Fix bug in 64bit softfloat double negation. 2019-07-07 11:32:27 +00:00
ncgmem.pas * building on powerpc and arm fixed 2019-06-16 21:43:46 +00:00
ncgnstfl.pas * fix potential crash with copied goto nodes on nestedparentfp platforms 2019-09-14 17:22:23 +00:00
ncgnstld.pas
ncgnstmm.pas
ncgobjc.pas
ncgopt.pas
ncgrtti.pas * use the size of the generated anonymous record instead of the manual tracked size so that any padding is picked up as well 2019-07-28 19:50:30 +00:00
ncgset.pas Avoid range check error for avr/i8086 CPU by changing local variable dist type to asizeuint 2019-08-19 20:22:22 +00:00
ncgutil.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
ncgvmt.pas + add "thunk" attribute for stubs/thunks and emit it for LLVM 2019-09-15 20:43:12 +00:00
ncnv.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
ncon.pas * properly perform (or not) range/overflow checking when performing constant 2019-11-10 12:00:05 +00:00
nflw.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
ngenutil.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
ngtcon.pas * properly perform (or not) range/overflow checking when performing constant 2019-11-10 12:00:05 +00:00
ninl.pas * properly perform (or not) range/overflow checking when performing constant 2019-11-10 12:00:05 +00:00
nld.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
nmat.pas * restored original behaviour of shl/shr constant evaluation outside 2019-11-22 21:12:00 +00:00
nmem.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
nobj.pas * the symbol of the interface wrapper function needs to be considered as referenced as well 2019-11-21 21:44:57 +00:00
nobjc.pas
node.pas * replaced tentryfile.get/putsmall/normalset() with a common tget/putset 2019-11-06 21:50:19 +00:00
nopt.pas
nset.pas * an incomplete case statement is not an error in ISO Pascal (mantis #35910) 2019-08-03 13:47:27 +00:00
nutils.pas Fix invalid typecast revealed by -CriotR by changing order of terms in boolean expression 2019-11-19 22:47:39 +00:00
objcasm.pas
objcdef.pas
objcgutl.pas - removed maxcrecordalign parameter/field from recordsymtables, as this value 2019-07-14 19:24:32 +00:00
objcutil.pas
ogbase.pas * use translateable error messages for undefined symbols and also report in which object file the symbol was first found 2019-11-21 21:45:11 +00:00
ogcoff.pas * change TObjData.sectiontype2options to a class function so that it can be called without an instance of TObjData 2019-10-19 15:41:33 +00:00
ogelf.pas + support for arm attributes 2019-10-09 17:45:40 +00:00
oglx.pas
ogmacho.pas * change TObjData.sectiontype2options to a class function so that it can be called without an instance of TObjData 2019-10-19 15:41:33 +00:00
ogmap.pas + add a Flush method to TExeMap which is useful when debugging internal errors or crashes where the exemap instance has not yet been destroyed 2019-11-02 12:36:26 +00:00
ognlm.pas
ogomf.pas * fixed i8086 compilation after r43265 2019-10-21 13:14:58 +00:00
omfbase.pas * compilation of x86 and PowerPC fixed 2019-10-09 19:26:59 +00:00
optbase.pas
optconstprop.pas
optcse.pas * cse adjusted 2019-11-16 14:07:59 +00:00
optdead.pas
optdeadstore.pas
optdfa.pas
options.pas Avoid warnings for m68k compiler 2019-11-05 10:00:48 +00:00
optloadmodifystore.pas
optloop.pas
opttail.pas
optutils.pas
optvirt.pas
owar.pas
owbase.pas
owomflib.pas
parabase.pas
paramgr.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
parser.pas
pass_1.pas * changed resulttype and firstpass processing from recursion into loop, based 2019-09-15 16:18:14 +00:00
pass_2.pas
pbase.pas * instead of declaring another type with a 'attribute' suffix, *search* for another type with a 'ATTRIBUTE' suffix (Delphi allows declaring both a TFoo and TFooAttribute in the same unit) 2019-07-12 22:05:18 +00:00
pcp.pas Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
pdecl.pas * register constant symbols 2019-11-21 21:44:26 +00:00
pdecobj.pas * get rid of the scanner message for attributes for real this time (sometimes I *really* hate Git -.-) 2019-07-13 09:37:44 +00:00
pdecsub.pas - remmoved doregister parameter from t*sym constructors, as the registration 2019-09-14 17:30:45 +00:00
pdecvar.pas - remmoved doregister parameter from t*sym constructors, as the registration 2019-09-14 17:30:45 +00:00
pexports.pas
pexpr.pas + add support for the IsManagedType() intrinsics which reports for a type (or variable) whether it needs initialization/finalization 2019-11-06 23:04:52 +00:00
pgentype.pas
pgenutil.pas * when specializing a routine all nested specializations must go to the para- or localsymtable as otherwise the symbol can't be found to be registered 2019-11-24 00:04:31 +00:00
pinline.pas
pkgutil.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
pmodules.pas * use a different name for the packages' entry point and use _DLLMainCRTStartup as an alias to avoid problems with the C-prefix 2019-11-21 21:45:18 +00:00
pp.lpi -- Rückwärtiges Zusammenführen von r39680 in ».«: 2019-08-11 16:31:48 +00:00
pp.pas * mention LLVM define 2019-09-14 17:31:11 +00:00
pparautl.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
ppc68k.lpi
ppc8086.lpi
ppcaarch64.lpi
ppcarm.lpi + makefiles use -Sew, so added to the project as well 2019-10-12 21:56:18 +00:00
ppcavr.lpi
ppcjvm.lpi
ppcmips.lpi
ppcmipsel.lpi
ppcppc64.lpi
ppcppc.lpi
ppcriscv32.lpi
ppcriscv64.lpi
ppcsparc64.lpi
ppcsparc.lpi
ppcx64.lpi * unneeded changes reverted 2019-11-10 16:41:53 +00:00
ppcx64llvm.lpi
ppheap.pas
ppu.pas * packed tabstractvarsym.addr_taken/different_scope fields into a set 2019-11-11 09:26:51 +00:00
procdefutil.pas
procinfo.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
psabiehpi.pas + support for arm attributes 2019-10-09 17:45:40 +00:00
pstatmnt.pas * properly perform (or not) range/overflow checking when performing constant 2019-11-10 12:00:05 +00:00
psub.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
psystem.pas + add support for the IsManagedType() intrinsics which reports for a type (or variable) whether it needs initialization/finalization 2019-11-06 23:04:52 +00:00
ptconst.pas * ensure that nothing assembly related is generated for generics when a typed constant (this also includes local variable initializations) are parsed 2019-11-21 21:44:16 +00:00
ptype.pas * give an error if an explicit enumeration valid exceeds the valid range, resolves #34633 2019-10-13 15:48:21 +00:00
raatt.pas + support for arm attributes 2019-10-09 17:45:40 +00:00
rabase.pas
rasm.pas
rautils.pas * support taking the address of labels defined in assembler blocks in the 2019-09-09 18:33:33 +00:00
README.txt
rescmn.pas
rgbase.pas somehow committing went wrong, second part of last commit: 2019-09-03 21:07:33 +00:00
rgobj.pas * do not join register deallocations/allocations as it makes no use and causes later on trouble in 2019-11-03 17:13:59 +00:00
scandir.pas * fixed opt-in sysroot substitution again, renamed the three-argument version 2019-10-26 13:48:30 +00:00
scanner.pas * fix for Mantis #36121: define FPC_ISO and FPC_EXTENDEDPASCAL for modes ISO and EXTENDEDPASCAL respectively 2019-10-03 12:34:36 +00:00
switches.pas
symbase.pas * also check for Nil symtables in tsymtable.includeoption 2019-11-24 00:04:27 +00:00
symconst.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
symcreat.pas * when creating the static field of a generic, insert it into the generic instead of the global symtable as it isn't really used anyway 2019-11-21 21:44:43 +00:00
symdef.pas * cleaned up safecall support: use a hidden localvarsym instead of result 2019-11-24 20:23:22 +00:00
symsym.pas * packed tabstractvarsym.addr_taken/different_scope fields into a set 2019-11-11 09:26:51 +00:00
symtable.pas * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined 2019-11-21 21:44:53 +00:00
symtype.pas
symutil.pas - remmoved doregister parameter from t*sym constructors, as the registration 2019-09-14 17:30:45 +00:00
syscinfo.pas
systems.inc * adapted 16 byte alignment handling on linux: it is now assumed that the callee tries to clear the stack, so in the caller, the stack is re-adjusted 2019-10-12 21:51:13 +00:00
systems.pas * adapted 16 byte alignment handling on linux: it is now assumed that the callee tries to clear the stack, so in the caller, the stack is re-adjusted 2019-10-12 21:51:13 +00:00
tgobj.pas
tokens.pas
verbose.pas
version.pas
widestr.pas
wpo.pas
wpobase.pas
wpoinfo.pas

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