Commit Graph

410 Commits

Author SHA1 Message Date
nickysn
fd9f3a43ce + added cpu_sys_z80 to the tsystemcpu enum. Name is not cpu_z80, because that
conflicts with tcputype.

git-svn-id: branches/z80@44393 -
2020-03-29 14:25:53 +00:00
nickysn
c35b3d8eee * synchronized the tsystemcpu enum with trunk
git-svn-id: branches/z80@44392 -
2020-03-29 14:14:22 +00:00
florian
fc4a8c0daa * more z80 support for the compiler
git-svn-id: branches/z80@35678 -
2017-03-28 20:21:03 +00:00
pierre
9fc17dc9e9 Fix FreeBSD cycle starting for release compiler after FPSysCtl interface change
git-svn-id: trunk@35575 -
2017-03-13 21:33:09 +00:00
Károly Balogh
319a397ae8 webassembly: reserve a system id and cpu id slot for the platform
git-svn-id: trunk@35497 -
2017-03-01 15:15:58 +00:00
marcus
ccf6504584 systems_aros, and systems_amigalike as collection for target defines
git-svn-id: trunk@35261 -
2017-01-08 11:34:27 +00:00
Károly Balogh
ab5b9982ee aros: enabled internal sysinit for i386-aros
git-svn-id: trunk@35238 -
2017-01-05 00:25:10 +00:00
Károly Balogh
8760ff96e1 atari: new pascal startup code, reworked build, also ParamStr/ParamCount works now
git-svn-id: trunk@35201 -
2016-12-27 08:14:34 +00:00
Károly Balogh
788c622307 amiga: pascal startup code for 68k and buildrtl refactor
git-svn-id: trunk@35068 -
2016-12-04 18:21:24 +00:00
Károly Balogh
f3e33a9dde morphos: new pascal-written internal startup code. also refactored the rtl build process for morphos
git-svn-id: trunk@35054 -
2016-12-04 00:15:41 +00:00
pierre
88f9d18a88 Enable checkpointer support for all linux systems
git-svn-id: trunk@34552 -
2016-09-21 13:20:13 +00:00
svenbarth
2808be3e20 + add and use sysinit unit for Win64 (only one since we don't support cygwin and gprof there)
* switch Win64 to indirect entry information

git-svn-id: trunk@34307 -
2016-08-13 19:10:27 +00:00
nickysn
20d2c74d8e + added system_i8086_embedded to the systems_embedded set
git-svn-id: trunk@34004 -
2016-06-18 00:00:18 +00:00
svenbarth
638339812e i386-win32 also has indirect entry information, so enable this in the compiler and disable the corresponding define in system.pp
git-svn-id: trunk@33985 -
2016-06-14 12:25:21 +00:00
svenbarth
f406867100 Merged revision(s) 31929-31931,32547 from branches/svenbarth/packages:
Switch Mac OS X to indirect entry information.

compiler/systems/t_bsd.pas, TLinkerBSD:
  + implement InitSysInitUnitName
compiler/system.pas:
  * systems_internal_sysinit: add Darwin systems
compiler/hlcgobj.pas, thlcgobj:
  * gen_proc_symbol_end: for Darwin systems don't directly call PascalMain for libraries, but FPC_LIBMAIN instead
rtl/darwin:
  + add sysinit.pas unit which contains the executable and library entry points for Darwin
rtl/darwin/Makefile.fpc:
  * add sysinit unit
rtl/bsd/sysosh.inc:
  + add a Darwin specific TPlatformEntryInformation (could probably be used for all Unix systems...)
rtl/bsd/system.pp:
  * define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin systems once we're no longer bootstrapping with 2.6.x
  + add EntryInformation variable (this could maybe moved to system.inc...)
  + add new procedure SysEntry that is called from the entrypoint and which sets up necessary information required by other parts of the RTL
  * the old FPC_SYSTEMMAIN is still in place for bootstrapping
rtl/inc/systemh.inc, TEntryInformation:
  * PascalMain is cdecl on non-Windows systems (ToDo: really?)
rtl/inc/system.inc:
  * initialstklen is provided by the indirect entry information, so no external here
........
Fix bootstrapping.

rtl/darwin/sysinit.pas:
  * enable the code only when no longer bootstrapping with 2.6.x
........
Fix bootstrapping.

rtl/objpas/objpas.pp:
  * define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin only while not bootstrapping with 2.6.x
........
rtl/darwin/sysinit.pas:
  * reference PASCALMAIN correctly (I wonder how this even worked previously :/ )

git-svn-id: trunk@33949 -
2016-06-11 20:29:51 +00:00
Jonas Maebe
a59fc7c165 - disable attempts to generate debug info when using llvm for now
git-svn-id: trunk@33939 -
2016-06-09 22:00:02 +00:00
nickysn
c78f406d99 + implemented proper stack checking for the i8086
git-svn-id: trunk@33787 -
2016-05-24 23:57:47 +00:00
Károly Balogh
9d2258e4d9 * increase length of asmbin string from 8 chars to 16. this is needed to support standard vasm binary names on PPC and (soon) m68k
git-svn-id: trunk@33550 -
2016-04-23 15:51:26 +00:00
Jonas Maebe
61356a08e6 * fixed default target for a ppc64 -> ppc32 cross-compiler
git-svn-id: trunk@33536 -
2016-04-20 22:17:05 +00:00
svenbarth
123ef01a7a Forgot to commit this...
systems.pas:
  + add new constant systems_indirect_var_imports to denote all targets that /require/ indirect references for cross-unit variables accesses

git-svn-id: trunk@33284 -
2016-03-18 22:41:51 +00:00
pierre
f9011289b5 * Fix default OS target for i386 and sparc processor on solaris OS
git-svn-id: trunk@33010 -
2016-01-27 15:32:55 +00:00
svenbarth
e9d8fadb58 Merged revision(s) 28237 from branches/svenbarth/packages:
Add a new target flag which determines whether the target supports dynamic packages or not.

systems.pas:
  + new flag tf_supports_packages
pmodules.pas, proc_package:
  * error out when flag tf_supports_packages is not set for the current target
msg/errore.msg:
  + error message for when tf_supports_packages is missing and a package file is compiled
........

git-svn-id: trunk@32978 -
2016-01-22 15:35:41 +00:00
Jonas Maebe
9437d0e4d8 * Linux/AArch64 must also copy value parameters passed by reference on the
caller side, as this is an AArch64 ABI requirement (unrelated to Darwin).
    Fixes webtbs/tw3523 compiled with optimisations on Linux/AArch64

git-svn-id: trunk@32102 -
2015-10-20 12:58:53 +00:00
nickysn
3e2248f41a + implemented exporting of functions for the win16 target
git-svn-id: trunk@31842 -
2015-09-27 00:48:35 +00:00
Jonas Maebe
7c594b0288 + added support for using Clang as an assembler, and make it the default
for all non-ppc(32/64) Darwin platforms
   o pass the macosx-version-min/iphoneos-version-min to clang as an assembler,
     so that it properly sets this information starting with Xcode 7 (solves
     errors when targeting the iOS simulator, and warnings about object files
     being compiled for a different OS X version when targeting (Mac) OS X)
   o the old assembler is still selectable via -Aas-darwin (required with
     Xcode 3.1.x and older)
   o since the first Xcode version that shipped with Clang is Xcode 3.2, which
     is available for Mac OS X 10.6, most users should not encounter any issues
     with the new default (in fact, it fixes some tests for x86 because Clang
     supports some instructions that "as" doesn't). Clang does not support
     Stabs however, so -gs does require the use of -Aas-darwin

git-svn-id: trunk@31830 -
2015-09-25 18:31:54 +00:00
nickysn
bdfd23cc2e + new target switch "FarProcsPushOddBP", which causes the i8086 compiler to push
odd values of BP if the procedure is far. Enabled this by default for Win16.

git-svn-id: trunk@31569 -
2015-09-07 19:05:18 +00:00
nickysn
1b84fbee57 + add win16 to systems_all_windows; this enables the win32-like mangling of the
dll internal symbols names on win16 as well

git-svn-id: trunk@31537 -
2015-09-05 20:06:59 +00:00
Jonas Maebe
3f9f498e0d - removed leftover alpha, ia64 and vis code
git-svn-id: trunk@31446 -
2015-08-28 22:31:29 +00:00
Jonas Maebe
8628d50aba + Linux/AArch64 compiler support (patch by Edmund Grimley Evans)
git-svn-id: trunk@30893 -
2015-05-22 09:25:05 +00:00
Jonas Maebe
201121d7c9 * synchronised with trunk till r30345
git-svn-id: branches/hlcgllvm@30349 -
2015-03-28 12:28:15 +00:00
nickysn
85cb180d80 * prepend "+" to each file name to be added to the library by wlib. This
indicates an "add" command, instead of "replace".

git-svn-id: trunk@30287 -
2015-03-23 01:19:19 +00:00
nickysn
069fa51445 * use separate input and output files when invoking wlib to create a static
library. This resolves a problem with parallel building of a i8086 cross
  compiler, due to a race condition in wlib, when running several instances of
  wlib in the same directory. The problem is in the way wlib creates a temp file
  in the current directory using non-atomic operations and with a high
  probability of a name collision. Using separate input and output files avoids
  this temp file creation by wlib.

git-svn-id: trunk@30277 -
2015-03-22 17:42:19 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jonas Maebe
3ab62dcfed * switched Linux/PowerPC64 to Pascal startup code so that we can used ifdefs
to detect whether we're compiling for ELFv1/SYSV or ELFv2

git-svn-id: trunk@30210 -
2015-03-14 18:36:08 +00:00
Jonas Maebe
165aaea8a4 * made a separate abi entry for powerpc_darwin, as it's not exactly the same
as the AIX abi (especially on ppc64)
   o replaced (for now) all checks for the AIX abi with a check for either the
     AIX or Darwin abi
   o changed the ABI of Darwin/ppc, Darwin/ppc64 and Mac OS/ppc to
     abi_powerpc_darwin

git-svn-id: trunk@30202 -
2015-03-14 18:35:44 +00:00
Jonas Maebe
0e76a84e04 + "ELFv2" abi identifier for ppc64
git-svn-id: trunk@30192 -
2015-03-14 18:35:13 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
79a06b1514 + iphonesim/x86_64 target (64 bit iOS simulator)
git-svn-id: trunk@29970 -
2015-02-23 22:56:09 +00:00
Jonas Maebe
d51c87e77b * add Darwin/AArch64 to systems_darwin
git-svn-id: trunk@29904 -
2015-02-23 22:52:07 +00:00
Jonas Maebe
bee9c4185b + default target for AArch64
git-svn-id: trunk@29896 -
2015-02-23 22:51:41 +00:00
Jonas Maebe
8c89f7ee8f * AArch64 also uses the non-fragile Objective-C ABI
git-svn-id: trunk@29893 -
2015-02-23 22:51:31 +00:00
Jonas Maebe
b5643f2a27 + aarch64 cpu identifier
git-svn-id: trunk@29876 -
2015-02-23 22:50:38 +00:00
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
Jonas Maebe
edef6b2a0a + AArch64 Darwin abi declaration
git-svn-id: trunk@29861 -
2015-02-23 22:49:52 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
Jonas Maebe
e97f31541e - reverted partial commit of merge
git-svn-id: branches/blocks@29515 -
2015-01-21 23:24:37 +00:00
Jonas Maebe
a76bbf363d * synchronised with trunk r29513
git-svn-id: branches/blocks@29514 -
2015-01-21 23:18:29 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
Jonas Maebe
b36e244e34 * allocate datastructures with new() instead of getmem() so that they get
initialised if necessary (such as the targetinfo since the llvmdatalayout
    field is an ansistring)

git-svn-id: branches/hlcgllvm@28472 -
2014-08-19 20:22:00 +00:00
Jonas Maebe
bd09b88a5b + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
o blocks are implemented as a variation of procedure variables
   o declaration of a block variable: "test: procedure(c: char) is block;"
     (C equivalent: (void)(^test)(char c) )
   o the compiler automatically converts procedures/functions whose address
     is passed to a block parameter or assigned to a block variable into
     a "block". This consists of
    1) generating a block descriptor (containing the size of the "block
       literal" (see below) and the signature of the invocation function
       encoded as an Objective-C selector)
    2) generating a wrapper function around the original funcion (with C
       calling convention), that has an extra first hidden parameter
       (marked as vo_is_parentfp in the compiler) whose type is a pointer
       to the describing "block literal"
    3) generating the "block literal", which contains a pointer to an
       external variable indicating whether this block captures context or
       not, some flags (see compiler/blockutl.get_block_literal_flags for
       info), a pointer to the wrapper function and a pointer to the
       descriptor. In the future, it will also contain captured variables.
   o right now, only global procedures/functions can be converted to blocks
     (because they don't require state capturing). The next steps are (Object
     Pascal) methods (not Objective-C methods, because Objective-C method
     procvars don't exist) and finally nested functions
   o on Mac OS X, the functionality will only work on Mac OS X 10.7 and later,
     because we have to use the so-called "ABI.2010.3.16" to ensure that
     our blocks aren't called as variadic functions by the runtime (which
     came out after the Mac OS X 10.6 release)
   o while the currently implemented functionality does not require any
     library support at all, there's no use enabling it on other platforms
     because unless it has been confirmed to work with a blocks runtime,
     there's no point in using blocks (they're just somewhat bulky procvars
     right now). Enabling it on other platforms (in combination with the
     GNUStep Objective-C run time), should simply be a matter of adding
     the right {$linklib xxx} statement to rtl/inc/blockrtl.pp file, adding
     that file to Makefile.fpc for that platform and adding that platform
     to the compiler/systems.systems_blocks_supported set

git-svn-id: branches/blocks@28232 -
2014-07-18 09:15:22 +00:00