From 134457fb8c5d6d9e85698d5b135004bf8eddf4b6 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 5 Apr 2015 21:25:03 +0000 Subject: [PATCH] + define types depending on the ALU register size of the CPU, e. g. for most 8 Bit CPUs this is different from Ptr(U)Int, and e.g. also for the far pointer memory models of i8086 git-svn-id: trunk@30451 - --- rtl/inc/systemh.inc | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/rtl/inc/systemh.inc b/rtl/inc/systemh.inc index 2b94aa618f..8a2fd25af0 100644 --- a/rtl/inc/systemh.inc +++ b/rtl/inc/systemh.inc @@ -399,6 +399,30 @@ Type ValUInt = Word; {$endif CPU16} +{$if defined(VER2) or defined(VER3_0)} +{$if defined(CPU16)} +{$define CPUINT16} +{$elseif defined(CPU32)} +{$define CPUINT32} +{$elseif defined(CPU64)} +{$define CPUINT64} +{$endif defined(CPU64)} +{$endif defined(VER2) or defined(VER3_0)} + +{$if defined(CPUINT8)} + ALUSInt = ShortInt; + ALUUInt = Byte; +{$elseif defined(CPUINT16)} + ALUSInt = ShortInt; + ALUUInt = Word; +{$elseif defined(CPUINT32)} + ALUSInt = Longint; + ALUUInt = DWord; +{$elseif defined(CPUINT64)} + ALUSInt = Int64; + ALUUInt = QWord; +{$endif defined(CPUINT64)} + { NativeInt and NativeUInt are Delphi compatibility types. Even though Delphi has IntPtr and UIntPtr, the Delphi documentation for NativeInt states that 'The size of NativeInt is equivalent to the size of the pointer on the @@ -694,7 +718,7 @@ var IsConsole : boolean = false; public name 'operatingsystem_isconsole'; NoErrMsg: Boolean platform = False; // For Delphi compatibility, not used in FPC. FirstDotAtFileNameStartIsExtension : Boolean = False; - + DefaultSystemCodePage, DefaultUnicodeCodePage, { the code page to use when sending paths/file names to OS file system API