summaryrefslogtreecommitdiff
path: root/rtl/sinclairql/si_prc.pp
diff options
context:
space:
mode:
authorkaroly <karoly@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-08 23:51:48 +0000
committerkaroly <karoly@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-08 23:51:48 +0000
commit73afcaee53644878899b37a574817807b38a8f0d (patch)
treeecf332bc4889075467b8ad66e8074abb1265efb5 /rtl/sinclairql/si_prc.pp
parent6253e8762dcd8c1d8b2808ced914937f16c344e8 (diff)
downloadfpc-73afcaee53644878899b37a574817807b38a8f0d.tar.gz
sinclairql: further tweaks to the startup code. enable optimizations. mark functions as noreturn to save a few bytes
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49144 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/sinclairql/si_prc.pp')
-rw-r--r--rtl/sinclairql/si_prc.pp13
1 files changed, 5 insertions, 8 deletions
diff --git a/rtl/sinclairql/si_prc.pp b/rtl/sinclairql/si_prc.pp
index 3a2b69d354..27c271ec10 100644
--- a/rtl/sinclairql/si_prc.pp
+++ b/rtl/sinclairql/si_prc.pp
@@ -32,11 +32,10 @@ var
pCmdLine : pchar; public name '__pCmdLine';
procedure PascalMain; external name 'PASCALMAIN';
-procedure PascalStart(commandLine: pword; channelData: pword); cdecl; forward;
+procedure PascalStart(commandLine: pword; channelData: pword); cdecl; noreturn; forward;
{ this function must be the first in this unit which contains code }
-{$OPTIMIZATION OFF}
-function _FPC_proc_start: longint; cdecl; assembler; nostackframe; public name '_start';
+procedure _FPC_proc_start; cdecl; assembler; nostackframe; noreturn; public name '_start';
asm
bra @start
dc.l $0
@@ -83,15 +82,15 @@ asm
pea (a7)
pea (a6,a5)
- jsr PascalStart
+ bra PascalStart
end;
-procedure _FPC_proc_halt(_ExitCode: longint); public name '_haltproc';
+procedure _FPC_proc_halt(_ExitCode: longint); noreturn; public name '_haltproc';
begin
mt_frjob(-1, _ExitCode);
end;
-procedure PascalStart(commandLine: pword; channelData: pword); cdecl;
+procedure PascalStart(commandLine: pword; channelData: pword); cdecl; noreturn;
begin
{ initialize .bss }
FillChar(bssstart,PtrUInt(@bssend)-PtrUInt(@bssstart),#0);
@@ -102,8 +101,6 @@ begin
pCmdLine:=@commandLine[1];
PascalMain;
-
- Halt; { this should never be reached }
end;