fpc/compiler
2025-01-11 15:35:58 +01:00
..
aarch64 * use a static data label for the case-label table on aarch64-win64 to avoid the linker discarding it 2024-11-22 17:57:02 +01:00
arm * tai_eabi_attribute -> tai_attribute so it can be used by other architectures 2024-12-30 15:56:24 +01:00
armgen * ARMv7A / A64: Constant writes to memory merged to larger forms where possible 2024-11-03 15:02:51 +00:00
avr
generic
html
i386 + zen5 architecture for completeness 2024-12-07 22:23:35 +01:00
i8086 * x86: New RET/lbl/RET optimisation 2024-10-27 08:17:10 +00:00
jvm * fix compiling binaries on JVM: the entries list contains pinitfinalentry values, not tused_unit 2025-01-11 15:35:58 +01:00
llvm
loongarch64
m68k
mips * MIPS64: make use of DMTC1 instruction 2024-10-18 21:53:26 +02:00
msg * missing Copyright year update 2025-01-11 10:45:24 +01:00
powerpc
powerpc64
ppcgen * MacOS Classic uses apparently very similiar mechanisms for the TOC as powerpc-aix 2025-01-03 17:38:36 +01:00
riscv + RiscV: make use of the fl* rd,symbol,rd pseudoinstruction 2025-01-11 14:22:01 +01:00
riscv32 Fix compilation of riscv32 compiler 2025-01-10 12:10:02 +00:00
riscv64 + RiscV: make use of the fneg.* instruction 2025-01-09 22:25:26 +01:00
sparc
sparc64
sparcgen
systems Do not add abi-call0 to linker options for esp8266 2025-01-07 18:18:20 +00:00
utils * store the current verbosity as part of the settings so that they're stored as part of a generic token stream as well 2024-12-31 18:32:17 +01:00
wasm32
x86 + zen5 architecture for completeness 2024-12-07 22:23:35 +01:00
x86_64 * typo fixed 2024-12-08 11:14:37 +01:00
xtensa
z80
.gitignore
aasmbase.pas
aasmcfi.pas
aasmcnst.pas
aasmdata.pas
aasmdef.pas
aasmsym.pas
aasmtai.pas + RiscV: make use of the fl* rd,symbol,rd pseudoinstruction 2025-01-11 14:22:01 +01:00
aggas.pas * write " as octal number as well in assembler output, it is more compatible 2025-01-03 17:38:37 +01:00
aopt.pas
aoptbase.pas * patch by lag programming: Code cleanup at function TAOptBase.RegInInstruction, resolves #40952 2024-10-15 22:51:39 +02:00
aoptda.pas
aoptobj.pas
aoptutils.pas
assemble.pas * tai_eabi_attribute -> tai_attribute so it can be used by other architectures 2024-12-30 15:56:24 +01:00
blockutl.pas
browcol.pas
catch.pas
ccharset.pas
cclasses.pas Outline freeing TFPList with disposing its items into TFPList.FreeAndNilDisposing. 2024-10-27 16:45:35 +00:00
cepiktimer.pas
cfidwarf.pas
cfileutl.pas Every compile gets actual current directory (fix for Textmode IDE) 2025-01-10 18:38:22 +00:00
cg64f32.pas
cgbase.pas
cgexcept.pas
cghlcpu.pas
cgobj.pas
cgutils.pas
cmsgs.pas + add method to TMessage to check whether a message is valid 2024-12-31 18:32:16 +01:00
comphook.pas
compiler.pas
compinnr.pas + random bits for quad support on RiscV 2025-01-06 15:21:18 +01:00
comprsrc.pas
comptty.pas
constexp.pas Simplify constexp.pas and fix certain edge cases. 2024-11-17 12:39:18 +00:00
COPYING.txt
cprofile.pas
crefs.pas
cresstr.pas
cscript.pas
cstreams.pas
ctask.pas
cutils.pas Remove unused cutils functions. 2024-11-04 22:05:03 +00:00
dbgbase.pas
dbgcodeview.pas
dbgdwarf.pas
dbgdwarfconst.pas
dbgstabs.pas
dbgstabx.pas
defcmp.pas * fix #41074: adjust conversion level of class/interface to pointer and class to interface conversions so that sub class to class conversions take precedence 2024-12-26 15:03:14 +01:00
defutil.pas + random bits for quad support on RiscV 2025-01-06 15:21:18 +01:00
dirparse.pas
dwarfbase.pas
elfbase.pas
entfile.pas
export.pas
expunix.pas
finput.pas
fmodule.pas * keep track of the current specialization state of the current module 2024-12-27 16:32:06 +01:00
fpcdefs.inc cpuNbitalu is not the correct type for fpc_atomic_cmp_xchg_alu on webassembly 2025-01-08 12:06:52 +01:00
fpchash.pas
fpcp.pas
fpkg.pas
fppu.pas
gendef.pas * partial fix #40934: don't remove the DEF file if cs_link_deffile is set (thus if the user explicitly wants the file) 2024-10-11 16:20:28 +02:00
globals.pas * store the current verbosity as part of the settings so that they're stored as part of a generic token stream as well 2024-12-31 18:32:17 +01:00
globstat.pas
globtype.pas + enable strength reduction for -O3, probably an oversight for years that it was not included in -O3 2024-10-19 11:00:24 +02:00
hlcg2ll.pas * MIPS64: make use of DMTC1 instruction 2024-10-18 21:53:26 +02:00
hlcgobj.pas * a_load_subsetreg_reg will no longer generate an AND instruction if it isn't necessary 2024-11-30 12:51:07 +00:00
htypechk.pas Remove unused cutils functions. 2024-11-04 22:05:03 +00:00
impdef.pas
import.pas
ldscript.pas
link.pas
macho.pas
machoutils.pas
Makefile First compiler Build 2024-09-29 16:56:18 +03:00
Makefile.fpc First compiler Build 2024-09-29 16:56:18 +03:00
MPWMake
nadd.pas * partly revert 8cd6606970, resolves #41052 2024-12-23 14:27:48 +01:00
nbas.pas * "no_exit_statement_in_block" replaced with "not has_child_of_type(..., [exitn])" 2024-10-18 18:26:48 +00:00
ncal.pas * fix #38122 in a more correct way than previously done: instead of adjusting the methodpointer node when it's a deref node adjust what value is stored in a temp if a call node is encountered: store the pointer value, not the pointed to value to avoid the reference getting lost 2025-01-04 10:31:26 +01:00
ncgadd.pas
ncgbas.pas
ncgcal.pas
ncgcnv.pas
ncgcon.pas
ncgflw.pas * get rid of the hack that tlabelnode inherits from tunarynode and stores a statement in left, resolves #40964 2024-10-26 16:11:24 +02:00
ncghlmat.pas
ncginl.pas cpuNbitalu is not the correct type for fpc_atomic_cmp_xchg_alu on webassembly 2025-01-08 12:06:52 +01:00
ncgld.pas
ncgmat.pas
ncgmem.pas
ncgnstfl.pas
ncgnstld.pas
ncgnstmm.pas
ncgobjc.pas
ncgopt.pas
ncgrtti.pas Extended RTTI: more Objective-C handling 2025-01-05 11:50:26 +01:00
ncgset.pas
ncgutil.pas
ncgvmt.pas
ncnv.pas
ncon.pas
nflw.pas + min/max optimization support for RiscV 2025-01-06 15:21:18 +01:00
ngenutil.pas Use TFPList.FreeAndNilDisposing in four more places. 2024-11-03 14:39:24 +00:00
ngtcon.pas Fixing bug where in const init no typecheck for symbol was performed 2024-10-09 19:48:53 +00:00
ninl.pas * cleanup merge artefacts 2025-01-05 11:07:22 +01:00
nld.pas Specialized fpc_copy_with_move_semantics for destructive copies. 2024-11-17 09:45:11 +00:00
nmat.pas
nmem.pas
nobj.pas
nobjc.pas
node.pas
nopt.pas
nset.pas * correctly calculate the number of labels of a c boolean in case statemnts, resolves #41025 2024-11-20 22:04:58 +01:00
nutils.pas * Fixed bug in "node_complexity" where a TLabelNode was put through an invalid typecast. 2024-12-09 19:06:13 +00:00
objcasm.pas
objcdef.pas
objcgutl.pas
objcutil.pas
ogbase.pas
ogcoff.pas
ogelf.pas
oglx.pas
ogmacho.pas
ogmap.pas
ognlm.pas
ogomf.pas
ogrel.pas
ogwasm.pas + added a missing 'br 1' instruction in the code, generated by 2024-10-31 22:55:17 +02:00
omfbase.pas
optbase.pas
optconstprop.pas * do_optconstpropagate and do_optdeadstoreelim now set their 2024-09-22 12:13:14 +00:00
optcse.pas * don't mess with boolean and/or operations in mixed short/full evaluated expressions, resolves #41012 2024-11-16 17:27:16 +01:00
optdead.pas
optdeadstore.pas * do_optconstpropagate and do_optdeadstoreelim now set their 2024-09-22 12:13:14 +00:00
optdfa.pas * properly take care of tempinitcode when calculating def./use. sums of tempcreate nodes 2024-11-25 20:33:54 +01:00
options.pas Remove one of two CPULLVM define macro 2024-12-30 21:25:43 +00:00
optloadmodifystore.pas
optloop.pas * set types of start value calculation correctly when doing strength reduction, resolves #41054 2024-12-09 22:30:40 +01:00
opttail.pas
optutils.pas * get rid of the hack that tlabelnode inherits from tunarynode and stores a statement in left, resolves #40964 2024-10-26 16:11:24 +02:00
optvirt.pas WPO: don't crash on TP-style objects with only abstract virtual methods 2025-01-01 15:23:06 +01:00
owar.pas
owbase.pas
owomflib.pas
parabase.pas
paramgr.pas
parser.pas Rename function to reset_all_default_types 2024-10-09 19:46:49 +00:00
pass_1.pas
pass_2.pas
pbase.pas
pcp.pas
pdecl.pas Postponing building of VMT until inheritance chain is specialized 2024-12-08 17:54:50 +00:00
pdecobj.pas * reset oo_is_forward object option for external classes after parsing the parent classes 2024-12-29 17:38:30 +01:00
pdecsub.pas * don't see illegal calling conventions for procedure variables, resolves #41041 2024-11-29 21:40:33 +01:00
pdecvar.pas * do not eat the semicolon after an absolute expression to a symbol, noted in #40978 2024-10-30 22:45:48 +01:00
pexports.pas * add procsyms from exports also to deffile if user explicitly asked for one 2024-10-11 16:20:28 +02:00
pexpr.pas * fix #41075: don't allow @<anonfunc> 2024-12-26 12:48:44 +01:00
pgentype.pas * keep track of the current generic def in the specialization state 2024-12-27 16:32:06 +01:00
pgenutil.pas * fix #40876: correctly check for generic constant parameters without concrete value 2025-01-02 13:24:46 +01:00
pinline.pas
pkgutil.pas
pmodules.pas * Attributes for methods. Fixes issue 41001 2024-11-08 11:11:26 +01:00
pp.lpi
pp.pas * don't use $MINSTACKSIZE and $MAXSTACKSIZE on non-Windows instead of disabling the warning 2024-12-31 21:44:23 +01:00
pparautl.pas
ppc68k.lpi
ppc8086.lpi
ppcaarch64.lpi
ppcarm.lpi
ppcavr.lpi
ppcjvm.lpi
ppcloongarch64.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 * store the current verbosity as part of the settings so that they're stored as part of a generic token stream as well 2024-12-31 18:32:17 +01:00
procdefutil.pas * if an outer capturer is required then that outer capturer must not be optimized into a register (fixes compilation with -Ooregvar enabled (e.g. in -O3)) 2025-01-05 13:19:31 +01:00
procinfo.pas
psabiehpi.pas
pstatmnt.pas * inline nodes can specify whether their result needs to be used 2024-12-12 22:05:15 +01:00
psub.pas Add a bound parameter to node_count(_weighted). 2024-11-30 20:04:34 +00:00
psystem.pas Switch from functions for the Atomic*-family to intrinsics 2024-12-12 22:05:15 +01:00
ptconst.pas
ptype.pas
raatt.pas
rabase.pas
rasm.pas
rautils.pas
README.txt
rescmn.pas
rgbase.pas
rgobj.pas
scandir.pas * fix typo in comment 2024-12-31 18:32:17 +01:00
scanner.pas * store the current verbosity as part of the settings so that they're stored as part of a generic token stream as well 2024-12-31 18:32:17 +01:00
switches.pas * reset the message state only inside flushpendingswitchesstate(), not during $POP itself 2024-12-31 18:32:17 +01:00
symbase.pas
symconst.pas Postponing building of VMT until inheritance chain is specialized 2024-12-08 17:54:50 +00:00
symcreat.pas * Allow to parse internal symbol names generated for generics. 2024-11-25 21:58:17 +01:00
symdef.pas * fix typo in comment 2025-01-02 13:24:46 +01:00
symsym.pas Optimize {$DEFINE x := y} and refactor tmacro.buftext. 2024-11-03 17:33:44 +00:00
symtable.pas * cosmetics 2024-12-21 19:48:33 +01:00
symtype.pas
symutil.pas
syscinfo.pas
systems.inc + as-macos for using as from Retro68 2025-01-01 23:13:15 +01:00
systems.pas clearing the bss section on startup 2024-11-09 09:27:27 +00:00
tgobj.pas
tokens.pas
triplet.pas
verbose.pas * ensure that only the newest message state is applied 2024-12-31 18:32:17 +01:00
version.pas
versioncmp.pas
wasmbase.pas
widestr.pas Remove conditionals that rely on not defined(FPC_HAS_CPSTRING). 2024-11-04 10:28:33 +00:00
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