diff --git a/compiler/alpha/cpubase.pas b/compiler/alpha/cpubase.pas index 1136e1d7de..aafbc252e6 100644 --- a/compiler/alpha/cpubase.pas +++ b/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; diff --git a/compiler/arm/cpubase.pas b/compiler/arm/cpubase.pas index ae2a1b7583..8ae08832cc 100644 --- a/compiler/arm/cpubase.pas +++ b/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, } diff --git a/compiler/avr/cpubase.pas b/compiler/avr/cpubase.pas index 41df2b598a..2b02b97751 100644 --- a/compiler/avr/cpubase.pas +++ b/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, } diff --git a/compiler/i386/cpubase.inc b/compiler/i386/cpubase.inc index cadf3e29e2..56713656db 100644 --- a/compiler/i386/cpubase.inc +++ b/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, } diff --git a/compiler/ia64/cpubase.pas b/compiler/ia64/cpubase.pas index 0590be4ec5..3b8c65868d 100644 --- a/compiler/ia64/cpubase.pas +++ b/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, } diff --git a/compiler/jvm/cpubase.pas b/compiler/jvm/cpubase.pas index fa3ae5d470..57e6c46298 100644 --- a/compiler/jvm/cpubase.pas +++ b/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} diff --git a/compiler/m68k/cpubase.pas b/compiler/m68k/cpubase.pas index e7de4b692a..42979a5dc5 100644 --- a/compiler/m68k/cpubase.pas +++ b/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, } diff --git a/compiler/mips/cpubase.pas b/compiler/mips/cpubase.pas index 7926019946..29c73d8f35 100644 --- a/compiler/mips/cpubase.pas +++ b/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, } diff --git a/compiler/powerpc/cpubase.pas b/compiler/powerpc/cpubase.pas index d8a679b116..4420ada0ed 100644 --- a/compiler/powerpc/cpubase.pas +++ b/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, } diff --git a/compiler/powerpc64/cpubase.pas b/compiler/powerpc64/cpubase.pas index 1b749d6a4c..57cea3cbf4 100644 --- a/compiler/powerpc64/cpubase.pas +++ b/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, } diff --git a/compiler/psystem.pas b/compiler/psystem.pas index 52fb433719..6d86b4ba06 100644 --- a/compiler/psystem.pas +++ b/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; diff --git a/compiler/sparc/cpubase.pas b/compiler/sparc/cpubase.pas index 0e658ed74b..d07eeebbf0 100644 --- a/compiler/sparc/cpubase.pas +++ b/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, } diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 82788b07d4..058539590f 100644 --- a/compiler/symdef.pas +++ b/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, diff --git a/compiler/vis/cpubase.pas b/compiler/vis/cpubase.pas index a701cf006a..b7eeb85aca 100644 --- a/compiler/vis/cpubase.pas +++ b/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; diff --git a/compiler/x86_64/cpubase.inc b/compiler/x86_64/cpubase.inc index 5ad43262b3..41c706bd57 100644 --- a/compiler/x86_64/cpubase.inc +++ b/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, }