瀏覽代碼

+ ossinttype/osuinttype defs that correspond to OS_SINT/OS_INT for use in
the high level code generator

git-svn-id: trunk@21279 -

Jonas Maebe 13 年之前
父節點
當前提交
85a3fd3357

+ 2 - 1
compiler/alpha/cpubase.pas

@@ -120,7 +120,8 @@ unit cpubase;
 
        { Defines the default address size for a processor, }
        OS_ADDR = OS_64;
-       { the natural int size for a processor,             }
+       { the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
        OS_INT = OS_64;
        { the maximum float size for a processor,           }
        OS_FLOAT = OS_F80;

+ 2 - 1
compiler/arm/cpubase.pas

@@ -251,7 +251,8 @@ unit cpubase;
 
       { Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      { the natural int size for a processor,             }
+      { the natural int size for a processor,
+        has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
       { the maximum float size for a processor,           }

+ 2 - 1
compiler/avr/cpubase.pas

@@ -210,7 +210,8 @@ unit cpubase;
 
       { Defines the default address size for a processor, }
       OS_ADDR = OS_16;
-      { the natural int size for a processor,             }
+      { the natural int size for a processor,
+        has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_16;
       OS_SINT = OS_S16;
       { the maximum float size for a processor,           }

+ 2 - 1
compiler/i386/cpubase.inc

@@ -70,7 +70,8 @@
 
       {# Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
       {# the maximum float size for a processor,           }

+ 2 - 1
compiler/ia64/cpubase.pas

@@ -111,7 +111,8 @@ Const
 
       { Defines the default address size for a processor, }
       OS_ADDR = OS_64;
-      { the natural int size for a processor,             }
+      { the natural int size for a processor,
+        has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_64;
       OS_SINT = OS_S64;
       { the maximum float size for a processor,           }

+ 4 - 2
compiler/jvm/cpubase.pas

@@ -182,7 +182,8 @@ uses
         -- fake for JVM, only influences default width of
            arithmetic calculations }
       OS_ADDR = OS_64;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_64;
       OS_SINT = OS_S64;
 {$else}
@@ -190,7 +191,8 @@ uses
         -- fake for JVM, only influences default width of
            arithmetic calculations }
       OS_ADDR = OS_32;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
 {$endif}

+ 2 - 1
compiler/m68k/cpubase.pas

@@ -218,7 +218,8 @@ unit cpubase;
 
       {# Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
       {# the maximum float size for a processor,           }

+ 2 - 1
compiler/mips/cpubase.pas

@@ -168,7 +168,8 @@ unit cpubase;
 
       { Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      { the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
       { the maximum float size for a processor,           }

+ 2 - 1
compiler/powerpc/cpubase.pas

@@ -262,7 +262,8 @@ uses
 
       {# Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
       {# the maximum float size for a processor,           }

+ 3 - 2
compiler/powerpc64/cpubase.pas

@@ -270,9 +270,10 @@ const
                             Default generic sizes
   *****************************************************************************}
 
-        {# Defines the default address size for a processor, }
+  {# Defines the default address size for a processor, }
   OS_ADDR = OS_64;
-  {# the natural int size for a processor,             }
+  {# the natural int size for a processor,
+     has to match osuinttype/ossinttype as initialized in psystem }
   OS_INT = OS_64;
   OS_SINT = OS_S64;
   {# the maximum float size for a processor,           }

+ 8 - 0
compiler/psystem.pas

@@ -136,6 +136,14 @@ implementation
         uinttype:=u8inttype;
         sinttype:=s8inttype;
 {$endif cpu8bitalu}
+
+{$ifndef avr}
+        osuinttype:=uinttype;
+        ossinttype:=sinttype;
+{$else avr}
+        osuinttype:=u16inttype;
+        ossinttype:=s16inttype;
+{$endif avr}
       end;
 
     procedure create_intern_types;

+ 2 - 1
compiler/sparc/cpubase.pas

@@ -181,7 +181,8 @@ uses
 
       {# Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       OS_SINT = OS_S32;
       {# the maximum float size for a processor,           }

+ 3 - 0
compiler/symdef.pas

@@ -833,6 +833,9 @@ interface
        { default integer type s32inttype on 32 bit systems, s64bittype on 64 bit systems }
        sinttype,
        uinttype,
+       { integer types corresponding to OS_SINT/OS_INT }
+       ossinttype,
+       osuinttype,
        { unsigned and signed ord type with the same size as a pointer }
        ptruinttype,
        ptrsinttype,

+ 2 - 1
compiler/vis/cpubase.pas

@@ -409,7 +409,8 @@ uses
 
       {# Defines the default address size for a processor, }
       OS_ADDR = OS_32;
-      {# the natural int size for a processor,             }
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_32;
       {# the maximum float size for a processor,           }
       OS_FLOAT = OS_F64;

+ 2 - 1
compiler/x86_64/cpubase.inc

@@ -69,7 +69,8 @@ const
 
       { Defines the default address size for a processor, }
       OS_ADDR = OS_64;
-      { the natural int size for a processor,             }
+      { the natural int size for a processor,
+        has to match osuinttype/ossinttype as initialized in psystem }
       OS_INT = OS_64;
       OS_SINT = OS_S64;
       { the maximum float size for a processor,           }