fpc/compiler
2021-08-13 13:53:40 +03:00
..
aarch64 + stack pages need to be touched on aarch64-win64 as well 2021-06-24 20:02:26 +00:00
arm * ARM: fix for Merge Add/Sub optimization 2021-06-21 21:36:32 +00:00
armgen * improved AndUtxh2And optimization 2021-06-05 21:14:30 +00:00
avr * revert last commit, avr4 has no call/jmp 2021-07-18 21:47:22 +00:00
generic
html
i386 * patch by J. Gareth Moreton: x86: Minor bitwise optimisations, resolves #39299 2021-07-16 21:47:36 +00:00
i8086 * CMOV does not read the second operand 2021-07-04 20:46:28 +00:00
jvm * the new constant string arraydefs are also implicit pointers types for JVM 2021-02-27 19:30:37 +00:00
llvm Fix compilation for x86_64 llvm variant 2021-06-05 06:47:46 +00:00
m68k m68k: D2 is considered volatile on macosclassic 2021-04-29 22:06:26 +00:00
mips Also avoid invalid typecast for RegLoadedWithNewValue method for mips, sparcgen and xtensa 2021-04-12 08:57:23 +00:00
msg * throw an error if esp/rsp are used as index register 2021-06-27 21:21:19 +00:00
powerpc + common assembler optimizer base class for powerpc and powerpc64 2021-04-11 17:30:20 +00:00
powerpc64 + common assembler optimizer base class for powerpc and powerpc64 2021-04-11 17:30:20 +00:00
ppcgen + common assembler optimizer base class for powerpc and powerpc64 2021-04-11 17:30:20 +00:00
riscv Fix check that third parameter of ADDI hp1 instruction is a constant 2021-06-02 19:58:38 +00:00
riscv32 Add A_CALL to the list of instructions considered as a calljmp, even though it is a pseudo-instruction, fixes a long list of -O3 and -O4 testsuite failures 2021-06-02 20:00:28 +00:00
riscv64 Add A_CALL to the list of instructions considered as a calljmp, even though it is a pseudo-instruction, fixes a long list of -O3 and -O4 testsuite failures 2021-06-02 20:00:28 +00:00
sparc * arm: taicpu uses set instead of boolean to store instruction states 2021-02-14 15:51:48 +00:00
sparc64
sparcgen Also avoid invalid typecast for RegLoadedWithNewValue method for mips, sparcgen and xtensa 2021-04-12 08:57:23 +00:00
systems * patch by Alfred to use new linker names for Android NDK >=22, resolves #38987 2021-06-12 20:45:15 +00:00
utils * set EXEEXT to .wasm for the WASI target in fpcmake 2021-06-24 00:16:00 +00:00
wasm32 * fixed WASI dll imports that are declared in a different unit 2021-06-23 20:36:52 +00:00
x86 * patch by J. Gareth Moreton: AND/CMP optimisation, resolves #39287 2021-08-11 23:01:30 +02:00
x86_64 * patch by J. Gareth Moreton: x86: Minor bitwise optimisations, resolves #39299 2021-07-16 21:47:36 +00:00
xtensa * Xtensa: optimize constant multiplications 2021-07-18 21:40:43 +00:00
z80
aasmbase.pas
aasmcfi.pas
aasmcnst.pas * synchronized with trunk 2021-03-01 13:21:24 +00:00
aasmdata.pas
aasmdef.pas
aasmsym.pas
aasmtai.pas Add .force_thumb pseudo-directive support forarm reader 2021-04-26 21:14:27 +00:00
aggas.pas + patch by J. Gareth Moreton: New label debugging feature, resolves #38980 2021-06-10 20:26:17 +00:00
aopt.pas * do not remove register deallocations/allocation pairs if the register is written 2021-04-06 19:16:17 +00:00
aoptbase.pas
aoptda.pas
aoptobj.pas * patch by J. Gareth Moreton to fix faulty conditional jump logic, resolves #38985 2021-07-03 21:05:27 +00:00
aoptutils.pas * patch by J. Gareth Moreton: x86 JccMovJmpMov2MovSetcc improvement, resolves #38761 2021-05-26 21:03:56 +00:00
assemble.pas + initial support for ARMv2 2021-05-09 20:42:31 +00:00
blockutl.pas
browcol.pas
catch.pas
ccharset.pas
cclasses.pas * prevent a range check error in TFPList.IndexOfItem when searching backwards in 2021-05-28 21:59:57 +00:00
cepiktimer.pas
cfidwarf.pas * don't generate high-level CFI statements when the selected assembler 2021-04-08 19:50:27 +00:00
cfileutl.pas
cg64f32.pas
cgbase.pas - clean up 2021-05-24 09:26:44 +00:00
cgexcept.pas * fix LLVM after r48828 2021-02-27 22:07:58 +00:00
cghlcpu.pas
cgobj.pas
cgutils.pas * patch by J. Gareth Moreton: Additional SETcc optimisations, resolves #38767 2021-05-21 20:36:15 +00:00
cmsgs.pas
comphook.pas
compiler.pas
compinnr.pas + implemented memory.grow and memory.size intrinsics and implemented SysOSAlloc 2021-01-21 23:13:49 +00:00
comprsrc.pas
comptty.pas + enable colored output on darwin, resolves #38693 2021-04-01 16:32:52 +00:00
constexp.pas - obsolete defines removed 2021-04-11 18:18:30 +00:00
COPYING.txt * updated FSF address (mantis #30198, patch by Paul Gevers) 2016-10-02 12:56:59 +00:00
cprofile.pas
crefs.pas
cresstr.pas
cscript.pas Add fForceUseForwardSlash to TLinkRes class, used for vlink linker on hosts using backslashes 2021-04-17 22:17:46 +00:00
cstreams.pas
cutils.pas - obsolete defines removed 2021-04-11 18:18:30 +00:00
dbgbase.pas
dbgcodeview.pas * Fixed value of the LF_PAD13 enum element. 2021-01-24 14:29:39 +00:00
dbgdwarf.pas * Dwarf: write variant fields only if the require features are present, resolves #38651 2021-03-22 18:11:41 +00:00
dbgstabs.pas Second trial to fix commit 48688 2021-02-17 09:46:37 +00:00
dbgstabx.pas
defcmp.pas
defutil.pas * the new constant string arraydefs are also implicit pointers types for JVM 2021-02-27 19:30:37 +00:00
dirparse.pas
dwarfbase.pas
elfbase.pas
entfile.pas * synchronized with trunk 2021-03-08 00:52:43 +00:00
export.pas
expunix.pas
finput.pas
fmodule.pas - removed the (deflist[i] is tdef) check from the tmodule destructor, since 2021-06-01 15:36:01 +00:00
fpccrc.pas
fpcdefs.inc * more fixes for VASM for ARM 2021-05-23 19:46:40 +00:00
fpcp.pas
fpkg.pas
fppu.pas * further fix for Mants #26760: applied patch by Ondrej Pokorny to fix recompilation of units referenced with an "in" clause if no file extension is provided 2021-07-15 21:52:27 +00:00
gendef.pas
globals.pas m68k: sinclair ql now requires vlink 0.16h or newer. 2021-04-29 22:23:58 +00:00
globstat.pas
globtype.pas + modified patch by Christo Crause: if the target support, the switch -Xu can be used to generate the executable as an uf2 file 2021-01-24 14:21:03 +00:00
hlcg2ll.pas
hlcgobj.pas * It is still needed to release the temp allocated for the result of an assembler function if the result is not referenced. This fixes some EXTDEBUG warnings. 2021-08-06 21:43:10 +03:00
htypechk.pas Avoid invalid typecast error when using -CR option 2021-03-15 13:25:59 +00:00
impdef.pas
import.pas
ldscript.pas
link.pas - removed unused leftovers from old t_bsd code 2021-03-24 14:33:13 +00:00
macho.pas
machoutils.pas
Makefile * set EXEEXT to .wasm for the WASI target in fpcmake 2021-06-24 00:16:00 +00:00
Makefile.fpc Fix message about unsupported OS_TARGET for LLVM 2021-05-03 16:10:59 +00:00
MPWMake Remove unused, obsolete -dBROWSERLOG option 2021-04-22 15:26:15 +00:00
msgidx.inc * throw an error if esp/rsp are used as index register 2021-06-27 21:21:19 +00:00
msgtxt.inc * throw an error if esp/rsp are used as index register 2021-06-27 21:21:19 +00:00
nadd.pas * optimize tests for a single bit "(a and one_bit_mask_const) = <> one_bit_mask_const" into "(a and one_bit_mask_const) <> = 0" to enable further CPU specific optimizations. 2021-08-09 18:38:58 +03:00
nbas.pas * patch by J. Gareth Moreton: Nothing (NOP) node optimisation, resolves #38194 2021-03-25 21:51:52 +00:00
ncal.pas * fix writing of the method and parameter names for the Variant call description 2021-06-05 17:43:49 +00:00
ncgadd.pas
ncgbas.pas
ncgcal.pas
ncgcnv.pas
ncgcon.pas
ncgflw.pas * synchronized with trunk 2021-03-01 13:21:24 +00:00
ncghlmat.pas
ncginl.pas * do not omit location_force_reg on second operand of sar/ro* if 2021-03-01 20:21:42 +00:00
ncgld.pas * do not swap left/right code generation for assignment nodes if 2021-03-31 20:53:18 +00:00
ncgmat.pas
ncgmem.pas + insert hlcg.g_ptrtypecast_reg calls in tcgvecnode.update_reference_reg_mul and update_reference_reg_packed 2021-01-24 02:46:31 +00:00
ncgnstfl.pas
ncgnstld.pas
ncgnstmm.pas
ncgobjc.pas
ncgopt.pas
ncgrtti.pas
ncgset.pas
ncgutil.pas
ncgvmt.pas * properly mangle interface wrapper names to avoid duplicate label errors, resolves #38385 2021-01-24 21:32:27 +00:00
ncnv.pas * moved warning about suspicious comp assignment to type check pass, catches also 2021-04-21 19:51:22 +00:00
ncon.pas * string constants have a size of 0, resolves #38504 2021-02-21 18:46:00 +00:00
nflw.pas Destroy tfornode class loopiteration field if assigned 2021-05-03 16:04:19 +00:00
ngenutil.pas
ngtcon.pas * attempt to fix bitpacked records with qwords in them (tw36156) when cross-compiling to big endian targets from x86. essentially the x86 shifting workarounds in the code already weren't covering all corner cases. 2021-02-21 23:00:41 +00:00
ninl.pas * fix for Mantis #38642: for enumerations with jumps Delphi behaves as follows: 2021-03-27 09:35:07 +00:00
nld.pas * Before r35961 (back in 2017) some simple assignment optimizations, such as "x:=x+y" to "inc(x,y)", were performed when -O2 in tassignmentnode.simplify. In r35961 these optimizations were moved to a separate pass which is enabled only when -O3 by cs_opt_use_load_modify_store. This separate pass can benefit from other optimization. But worse code is generated with -O2 since then. 2021-08-13 13:53:40 +03:00
nmat.pas + apply excess precision also to unary minus nodes 2021-02-28 10:52:11 +00:00
nmem.pas * removed accidently committed printnode 2021-01-31 13:19:55 +00:00
nobj.pas
nobjc.pas
node.pas
nopt.pas
nset.pas * synchronized with trunk 2021-03-01 13:21:24 +00:00
nutils.pas + optimize (a and b) or (c and not(b)) into c xor ((c xor a) and b) 2021-02-28 18:20:46 +00:00
objcasm.pas
objcdef.pas
objcgutl.pas
objcutil.pas
ogbase.pas
ogcoff.pas Set string length before calling move to avoid problems with global data analysis on systems using C library 2021-04-27 14:52:22 +00:00
ogelf.pas Fix gotpcrel relocation for TESTQ x86_64 instruction 2021-04-23 21:52:24 +00:00
oglx.pas
ogmacho.pas
ogmap.pas
ognlm.pas
ogomf.pas * Removed/ifdefed the assigned and unused variables. 2021-01-24 13:58:17 +00:00
ogrel.pas * patch by Marģers to unify internal error numbers, resolves #37888 2020-10-13 19:59:01 +00:00
omfbase.pas
optbase.pas
optconstprop.pas
optcse.pas
optdead.pas
optdeadstore.pas * fixes to deadstore optimization 2021-04-03 21:28:09 +00:00
optdfa.pas
options.pas * use smaller alignment when generating thumb code 2021-06-15 19:52:07 +00:00
optloadmodifystore.pas * Before r35961 (back in 2017) some simple assignment optimizations, such as "x:=x+y" to "inc(x,y)", were performed when -O2 in tassignmentnode.simplify. In r35961 these optimizations were moved to a separate pass which is enabled only when -O3 by cs_opt_use_load_modify_store. This separate pass can benefit from other optimization. But worse code is generated with -O2 since then. 2021-08-13 13:53:40 +03:00
optloop.pas * Removed/ifdefed lots of unused variables. 2021-01-24 12:24:01 +00:00
opttail.pas
optutils.pas * explicitly reset successor if noreturn is set 2021-06-06 20:33:09 +00:00
optvirt.pas
owar.pas
owbase.pas
owomflib.pas
parabase.pas
paramgr.pas Add explicit zeroing of trttiparaloc record to avoid hash calculation issues 2021-05-06 08:02:34 +00:00
parser.pas * initialize current_settings as early as possible so cs_debugswitch is set correctly if needed 2021-02-14 21:25:01 +00:00
pass_1.pas Make sure nf_usercode_entry get transferred inside firstpass procedure 2021-04-27 14:20:09 +00:00
pass_2.pas
pbase.pas
pcp.pas Systematically include fpcdefs.inc at sart of all units used by compiler 2019-07-03 13:35:05 +00:00
pdecl.pas
pdecobj.pas
pdecsub.pas * fix for Mantis #38771: the owner of the procdef might be Nil in case of a specialization (that virtual can't be used on generics is caught later on) 2021-04-18 14:01:09 +00:00
pdecvar.pas * set self to nil in current_module.deflist for registered defs in the 2021-05-30 21:27:57 +00:00
pexports.pas
pexpr.pas * remove mhs_exceptions in might_have_sideeffects call for C operators: it improves code 2021-07-19 20:55:41 +00:00
pgentype.pas
pgenutil.pas * allow char constant to be used for const string parameters in generic specializations, resolves #39030 2021-06-28 20:35:33 +00:00
pinline.pas
pkgutil.pas
pmodules.pas * set self to nil in current_module.deflist for registered defs in the 2021-05-30 21:27:57 +00:00
pp.lpi
pp.pas
pparautl.pas * set self to nil in current_module.deflist for registered defs in the 2021-05-30 21:27:57 +00:00
ppc68k.lpi
ppc8086.lpi
ppcaarch64.lpi
ppcarm.lpi
ppcavr.lpi
ppcjvm.lpi
ppcmips64el.lpi
ppcmips.lpi
ppcmipsel.lpi
ppcppc64.lpi
ppcppc64le.lpi
ppcppc.lpi
ppcriscv32.lpi
ppcriscv64.lpi
ppcsparc64.lpi
ppcsparc.lpi
ppcwasm32.lpi
ppcx64.lpi
ppcx64llvm.lpi
ppcxtensa.lpi
ppcz80.lpi
ppheap.pas
ppu.pas Return -1 if size of file is smaller tham header size in tppufile.readheader method 2021-06-04 21:15:46 +00:00
procdefutil.pas
procinfo.pas
psabiehpi.pas * fix LLVM after r48828 2021-02-27 22:07:58 +00:00
pstatmnt.pas * synchronized with trunk 2021-03-01 13:21:24 +00:00
psub.pas * synchronized with trunk 2021-03-01 13:21:24 +00:00
psystem.pas
ptconst.pas
ptype.pas
raatt.pas * allow also 8 byte string constants in assembler, resolves #28640 2021-03-27 17:13:14 +00:00
rabase.pas
rasm.pas
rautils.pas * more helpful message if an unknown field is accessed in the assembler reader, resolves #38475 2021-02-11 20:51:53 +00:00
README.txt
rescmn.pas
rgbase.pas
rgobj.pas * avoid overflow during register allocation 2021-04-28 18:32:48 +00:00
scandir.pas * Removed/ifdefed lots of unused variables. 2021-01-24 12:24:01 +00:00
scanner.pas * decrease macro nesting counter early when expanding empty macro 2021-04-25 19:49:26 +00:00
switches.pas
symbase.pas
symconst.pas - removed the discardresult proc directive 2021-03-20 01:22:43 +00:00
symcreat.pas
symdef.pas * improvements to the prevention of dangling pointers in tmodule.deflist, 2021-06-01 15:02:26 +00:00
symsym.pas * support arbitrary record regvars on AArch64: it has fairly complete support 2021-05-01 13:58:10 +00:00
symtable.pas
symtype.pas * improvements to the prevention of dangling pointers in tmodule.deflist, 2021-06-01 15:02:26 +00:00
symutil.pas
syscinfo.pas
systems.inc + ARM: basic vasm support 2021-05-08 20:48:59 +00:00
systems.pas sinclairql: enable weak linking support for the Sinclair QL 2021-05-14 14:49:14 +00:00
tgobj.pas
tokens.pas - removed the discardresult proc directive 2021-03-20 01:22:43 +00:00
triplet.pas
verbose.pas - obsolete defines removed 2021-04-11 18:18:30 +00:00
version.pas Fix duplicate source_cpu_string after last patch, by using cpuwasm32 instead of wasm32 conditional 2021-06-01 08:22:44 +00:00
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