* small m68k-linux fixes

git-svn-id: trunk@5427 -
This commit is contained in:
florian 2006-11-19 21:51:20 +00:00
parent f2fc9b39e1
commit 0d38bda5c4
3 changed files with 157 additions and 16 deletions
.gitattributes
compiler
rtl/linux/m68k

1
.gitattributes vendored
View File

@ -373,6 +373,7 @@ compiler/ppc.cfg -text
compiler/ppc.conf -text
compiler/ppc.dof -text
compiler/ppc.dpr -text
compiler/ppc68k.lpi svneol=native#text/plain
compiler/ppcarm.lpi svneol=native#text/plain
compiler/ppcgen/aasmcpu.pas svneol=native#text/plain
compiler/ppcgen/cgppc.pas svneol=native#text/plain

79
compiler/ppc68k.lpi Normal file
View File

@ -0,0 +1,79 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<Version Value="5"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<Title Value="pp"/>
</General>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="2">
<Unit0>
<Filename Value="pp.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="pp"/>
</Unit0>
<Unit1>
<Filename Value="m68k/aasmcpu.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="aasmcpu"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Target>
<Filename Value="m68k/pp"/>
</Target>
<SearchPaths>
<IncludeFiles Value="m68k/"/>
<OtherUnitFiles Value="m68k/;systems/"/>
<UnitOutputDirectory Value="m68k/lazbuild"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<D2Extensions Value="False"/>
<CStyleOperator Value="False"/>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
</Debugging>
</Linking>
<Other>
<Verbosity>
<ShowWarn Value="False"/>
<ShowNotes Value="False"/>
<ShowHints Value="False"/>
</Verbosity>
<ConfigFile>
<StopAfterErrCount Value="50"/>
</ConfigFile>
<CustomOptions Value="-dm68k
"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>

View File

@ -1,26 +1,87 @@
#
# This file is part of the Free Pascal run time library.
# Copyright (c) 1999-2004 by Michael Van Canneyt, Peter Vreman,
# & Daniel Mantione, members of the Free Pascal development team.
#
# See the file COPYING.FPC, included in this distribution,
# for details about the copyright.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY;without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#**********************************************************************}
#
# Linux ELF startup code for Free Pascal
#
# The code in this file is the default startup code, it is used unless
# libc is linked in, profiling is enabled or you are compiling a shared
# library.
#
/*
%a1 Contains a function pointer to be registered with `atexit'.
This is how the dynamic linker arranges to have DT_FINI
functions called for shared libraries that have been loaded
before this code runs.
%sp The stack contains the arguments and environment:
0(%sp) argc
4(%sp) argv[0]
...
(4*argc)(%sp) NULL
(4*(argc+1))(%sp) envp[0]
...
NULL
*/
.text
.globl _start
.type _start,@function
_start:
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
sub.l %fp, %fp
/* Extract the arguments as encoded on the stack and set up the
arguments for `main': argc, argv. envp will be determined
later in __libc_start_main. */
move.l 8(%sp), %d0
move.l %d0, operatingsystem_parameter_envp
move.l 4(%sp), %d0
move.l %d0, operatingsystem_parameter_argv
move.l (%sp), %d0
move.l %d0, operatingsystem_parameter_argc
jbsr PASCALMAIN
illegal /* Crash if somehow `exit' does return. */
.file "prt0.as"
.text
.globl __entry
__entry:
movel sp@(8),d0
movel d0,U_SYSLINUX_ENVP
movel sp@(4),d0
movel d0,U_SYSLINUX_ARGV
movel sp@,d0
movel d0,U_SYSLINUX_ARGC
jsr PASCALMAIN
.globl _haltproc
.globl _haltproc
.type _haltproc,@function
_haltproc:
moveq #1,d0
movel U_SYSLINUX_EXITCODE,d1
trap #0
bras _haltproc
move.l #1,%d0
move.l operatingsystem_result,%d1
trap #0
bras _haltproc
.bss
.type operatingsystem_parameters,@object
.size operatingsystem_parameters,12
operatingsystem_parameters:
.skip 3*4
.data
.align 4
.globl ___fpc_brk_addr
___fpc_brk_addr:
.long 0
.global operatingsystem_parameter_envp
.global operatingsystem_parameter_argc
.global operatingsystem_parameter_argv
.set operatingsystem_parameter_envp,operatingsystem_parameters+0
.set operatingsystem_parameter_argc,operatingsystem_parameters+4
.set operatingsystem_parameter_argv,operatingsystem_parameters+8