From 69b8e3ad4443a01beec223eceaa30a900d6fa641 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 13 Jun 2001 18:32:05 +0000 Subject: [PATCH] * big endian updates (merged) --- rtl/inc/real2str.inc | 27 +++++++++++++++++++++++---- rtl/inc/system.inc | 11 ++++++++++- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/rtl/inc/real2str.inc b/rtl/inc/real2str.inc index f92dfdbd32..06680514d8 100644 --- a/rtl/inc/real2str.inc +++ b/rtl/inc/real2str.inc @@ -225,7 +225,7 @@ begin if len=-32767 then len:=maxlen; { determine sign. before precision, needs 2 less calls to abs() } -{$ifndef big_endian} +{$ifndef endian_big} {$ifdef SUPPORT_EXTENDED} { extended, format (MSB): 1 Sign bit, 15 bit exponent, 64 bit mantissa } sign := (TSplitExtended(d).w and $8000) <> 0; @@ -250,9 +250,25 @@ begin {$endif SUPPORT_SINGLE} {$endif SUPPORT_DOUBLE} {$endif SUPPORT_EXTENDED} -{$else big_endian} +{$else endian_big} +{$ifdef SUPPORT_EXTENDED} {$error sign/NaN/Inf not yet supported for big endian CPU's in str_real} -{$endif big_endian} +{$else SUPPORT_EXTENDED} +{$ifdef SUPPORT_DOUBLE} + { double, format (MSB): 1 Sign bit, 11 bit exponent, 52 bit mantissa } + {$error sign/NaN/Inf not yet supported for big endian CPU's in str_real} +{$else SUPPORT_DOUBLE} +{$ifdef SUPPORT_SINGLE} + { single, format (MSB): 1 Sign bit, 8 bit exponent, 23 bit mantissa } + sign := ((TSplitSingle(d).bytes[0] and $80)) <> 0; + expMaximal := ((TSplitSingle(d).words[0] shr 7) and $ff) = 255; + mantZero := (TSplitSingle(d).cards[0] and $7fffff = 0); +{$else SUPPORT_SINGLE} + {$error No big endian floating type supported yet in real2str} +{$endif SUPPORT_SINGLE} +{$endif SUPPORT_DOUBLE} +{$endif SUPPORT_EXTENDED} +{$endif endian} if expMaximal then if mantZero then if sign then @@ -403,7 +419,10 @@ end; { $Log$ - Revision 1.3 2001-04-23 18:25:45 peter + Revision 1.4 2001-06-13 18:32:05 peter + * big endian updates (merged) + + Revision 1.3 2001/04/23 18:25:45 peter * m68k updates Revision 1.2 2000/07/13 11:33:45 michael diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index a4a2c4e4b8..9f01cf6bf8 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -81,12 +81,18 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile]; ****************************************************************************} {$IFDEF I386} + {$IFNDEF ENDIAN_LITTLE} + {$DEFINE ENDIAN_LITTLE} + {$ENDIF} {$IFDEF M68K} {$Error Can't determine processor type !} {$ENDIF} {$I i386.inc} { Case dependent, don't change } {$ELSE} {$IFDEF M68K} + {$IFNDEF ENDIAN_BIG} + {$DEFINE ENDIAN_BIG} + {$ENDIF} {$I m68k.inc} { Case dependent, don't change } {$ELSE} {$Error Can't determine processor type !} @@ -650,7 +656,10 @@ end; { $Log$ - Revision 1.14 2001-06-03 15:15:58 peter + Revision 1.15 2001-06-13 18:32:05 peter + * big endian updates (merged) + + Revision 1.14 2001/06/03 15:15:58 peter * lib_exit added Revision 1.13 2001/05/09 19:57:07 peter