fpc/compiler
2025-02-09 10:41:39 +01:00
..
aarch64 * apply OptPass1Data to UDIV/SDIV as well 2025-02-09 10:41:39 +01:00
arm + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
armgen * ARMv7A / A64: Constant writes to memory merged to larger forms where possible 2024-11-03 15:02:51 +00:00
avr + avrsim6 controller type 2024-09-14 16:00:35 +02:00
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 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
llvm + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
loongarch64 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
m68k * handle adress registers properly in tcg64f68k.a_op64_reg_ref 2024-07-19 20:00:21 +02:00
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 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
riscv + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
riscv32 + RiscV: support ZMMUL extension 2025-01-26 14:43:57 +01:00
riscv64 * properly write RV32E/RV64E architecture tags 2025-01-28 22:38:59 +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 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
x86 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
x86_64 * change some getglobaldatalabel into getlocaldatalabel to simplify code if pic is used 2025-01-13 22:34:31 +01:00
xtensa + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
z80
.gitignore
aasmbase.pas
aasmcfi.pas
aasmcnst.pas + emit a size directive for the internal dynarray const label. This fixes 2024-09-01 22:29:34 +03:00
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 + add optimizer units (empty for now) for the WebAssembly target 2024-09-21 14:50:16 +03:00
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 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
cgobj.pas + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
cgutils.pas
cmsgs.pas Check that index value is not below lower bound in TMessage.Valid method 2025-01-13 13:17:55 +00:00
comphook.pas
compiler.pas
compinnr.pas + random bits for quad support on RiscV 2025-01-06 15:21:18 +01:00
comprsrc.pas * Allow to process .fmx files just as .lfm/.dfm files 2025-02-07 16:12:05 +01:00
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 Change CompareChar uses inside compiler/RTL to CompareByte. 2025-02-07 20:51:50 +03:00
dbgbase.pas
dbgcodeview.pas
dbgdwarf.pas * WebAssembly debug info: make wasmtime happy by not emitting line info end 2024-09-15 11:15:17 +03:00
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 - disallow enabling regvars for WebAssembly, because it's not supported, yet 2024-08-25 19:58:05 +03:00
dwarfbase.pas
elfbase.pas
entfile.pas Fix compilation with -dDEBUG_PPU 2024-08-16 15:08:19 +00:00
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 * make UpdateFnv64 closer to the original algorithm as proposed by Gareth 2024-09-15 21:49:02 +02:00
fpcp.pas
fpkg.pas
fppu.pas Rename conditional: INTFPPU => DEBUG_GENERATE_INTERFACE_PPU 2024-08-16 15:33:12 +00:00
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 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
hlcgobj.pas + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01: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 * generic second_addordinal can handle swapped nodes 2024-08-18 22:03:22 +02:00
ncgbas.pas
ncgcal.pas
ncgcnv.pas
ncgcon.pas * change some getglobaldatalabel into getlocaldatalabel to simplify code if pic is used 2025-01-13 22:34:31 +01:00
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 + function node_not_zero and make use of it 2025-02-08 20:07:20 +01:00
ncgld.pas * revert check for boolean type when handling LOC_FLAG in tcgassignmentnode.pass_generate_code. This makes pas boolean the default, 2024-09-16 22:48:18 +02:00
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 * use proper value for Fnv64 initialization 2024-09-14 13:54:54 +02:00
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 * don't cast the succeeded node succn to a tcallparanode (it's usually a tloadnode or something similar instead) 2025-01-13 22:23:11 +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 + extend node_not_zero to take range types into account 2025-02-09 10:26:10 +01:00
objcasm.pas
objcdef.pas
objcgutl.pas
objcutil.pas
ogbase.pas Immediately set the capacity 2024-07-08 20:17:11 +00:00
ogcoff.pas Handle cross-endian case inside TCoffObjData.writereloc method 2024-09-16 18:58:40 +00:00
ogelf.pas Immediately set the capacity 2024-07-08 20:17:11 +00:00
oglx.pas
ogmacho.pas
ogmap.pas
ognlm.pas
ogomf.pas
ogrel.pas
ogwasm.pas + WebAssembly internal linker: rewrite the fpc_wasm_invoke_helper function in the linker, so that it becomes functional 2025-01-25 08:22:44 +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 * update project file 2024-07-11 22:12:38 +02:00
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 + add optimizer units (empty for now) for the WebAssembly target 2024-09-21 14:50:16 +03:00
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 * fix #40979: don't recurse further into the nested hierarchy for code generation if the function is generic 2025-01-14 20:38:37 +01: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 * fixed the WebAssembly inline asm call instruction with the internal assembler writer 2024-07-20 21:53:24 +03:00
README.txt
rescmn.pas + initial compiler support for WebAssembly resources. Requires WebAssembly 2024-06-25 03:07:55 +03:00
rgbase.pas
rgobj.pas
scandir.pas * properly read +/- for the warn directive, resolves #41105 2025-02-01 21:39:49 +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 * properly unlink unused type symbols from their defs to avoid 2024-09-20 22:49:08 +02:00
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 + added extra values to TWasmNameSubsectionType from the extended name section 2024-09-19 06:35:49 +03:00
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