Browse Source

+ added types sizesinttype and sizeuinttype, corresponding to the SizeInt and
SizeUInt types for the target platform

git-svn-id: trunk@34619 -

nickysn 8 years ago
parent
commit
35b2ffa872
2 changed files with 11 additions and 0 deletions
  1. 8 0
      compiler/psystem.pas
  2. 3 0
      compiler/symdef.pas

+ 8 - 0
compiler/psystem.pas

@@ -115,10 +115,14 @@ implementation
     procedure set_default_int_types;
     procedure set_default_int_types;
       begin
       begin
 {$ifdef cpu64bitaddr}
 {$ifdef cpu64bitaddr}
+        sizeuinttype:=u64inttype;
+        sizesinttype:=s64inttype;
         uinttype:=u64inttype;
         uinttype:=u64inttype;
         sinttype:=s64inttype;
         sinttype:=s64inttype;
 {$endif cpu64bitaddr}
 {$endif cpu64bitaddr}
 {$ifdef cpu32bitaddr}
 {$ifdef cpu32bitaddr}
+        sizeuinttype:=u32inttype;
+        sizesinttype:=s32inttype;
         uinttype:=u32inttype;
         uinttype:=u32inttype;
         sinttype:=s32inttype;
         sinttype:=s32inttype;
 {$endif cpu32bitaddr}
 {$endif cpu32bitaddr}
@@ -126,6 +130,10 @@ implementation
         uinttype:=u32inttype;
         uinttype:=u32inttype;
         sinttype:=s32inttype;
         sinttype:=s32inttype;
 {$endif cpu32bitalu}
 {$endif cpu32bitalu}
+{$ifdef cpu16bitaddr}
+        sizeuinttype:=u16inttype;
+        sizesinttype:=s16inttype;
+{$endif cpu16bitaddr}
 {$ifdef cpu16bitalu}
 {$ifdef cpu16bitalu}
         uinttype:=u16inttype;
         uinttype:=u16inttype;
         sinttype:=s16inttype;
         sinttype:=s16inttype;

+ 3 - 0
compiler/symdef.pas

@@ -1072,6 +1072,9 @@ interface
        { integer types corresponding to OS_SINT/OS_INT }
        { integer types corresponding to OS_SINT/OS_INT }
        ossinttype,
        ossinttype,
        osuinttype,
        osuinttype,
+       { integer types corresponding to SizeInt and SizeUInt for the target platform }
+       sizeuinttype,
+       sizesinttype,
        { unsigned and signed ord type with the same size as a pointer }
        { unsigned and signed ord type with the same size as a pointer }
        ptruinttype,
        ptruinttype,
        ptrsinttype,
        ptrsinttype,