From f3b9eb0296207c4cda687217a0701ef2e42fd177 Mon Sep 17 00:00:00 2001 From: Freeman Date: Sat, 16 Jan 2021 14:10:10 +0300 Subject: [PATCH] Less data section of SysInit and System units HelloGUI program compiled by Delphi 7 now is 4858 bytes long instead of 8196 bytes before. --- Lib/SysInit.pas | 9 ++++----- Lib/System.pas | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Lib/SysInit.pas b/Lib/SysInit.pas index 385ce3b..47c409f 100644 --- a/Lib/SysInit.pas +++ b/Lib/SysInit.pas @@ -1,7 +1,7 @@ (* KolibriOS RTL SysInit unit - Copyright (c) 2020 Delphi SDK for KolibriOS team + Copyright (c) 2020-2021 Delphi SDK for KolibriOS team *) unit SysInit; @@ -11,11 +11,10 @@ interface procedure _InitExe(InitTable: PPackageInfo); var - TLSIndex: Integer = -1; - TLSLast: Byte; + PtrToNil: Pointer; -const - PtrToNil: Pointer = nil; + TLSIndex: Integer; // = -1; + TLSLast: Byte; implementation diff --git a/Lib/System.pas b/Lib/System.pas index 2907996..0b38fe1 100644 --- a/Lib/System.pas +++ b/Lib/System.pas @@ -221,7 +221,7 @@ function SysGetMem(Size: Integer): Pointer; function SysReallocMem(P: Pointer; Size: Integer): Pointer; var - Default8087CW: Word = $1332; // for Extended type + Default8087CW: Word; function Get8087CW: Word; procedure Set8087CW(Value: Word); @@ -934,8 +934,8 @@ initialization asm // InitFPU - FNINIT - FLDCW Default8087CW + MOV AX, $1332 + CALL Set8087CW {$IFDEF KolibriOS} // HeapInit