|
@@ -84,8 +84,6 @@ unit softfpu;
|
|
|
}
|
|
|
{$Q-}
|
|
|
{$goto on}
|
|
|
-{$macro on}
|
|
|
-{$define compilerproc:=stdcall }
|
|
|
|
|
|
interface
|
|
|
{$endif not(defined(fpc_softfpu_interface)) and not(defined(fpc_softfpu_implementation))}
|
|
@@ -193,7 +191,7 @@ the corresponding value `b', and 0 otherwise. The comparison is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_lt(a: float64;b: float64): flag; compilerproc;
|
|
|
+Function float64_lt(a: float64;b: float64): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns 1 if the double-precision floating-point value `a' is less than
|
|
@@ -202,7 +200,7 @@ is performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_le(a: float64;b: float64): flag; compilerproc;
|
|
|
+Function float64_le(a: float64;b: float64): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns 1 if the double-precision floating-point value `a' is equal to
|
|
@@ -210,7 +208,7 @@ the corresponding value `b', and 0 otherwise. The comparison is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_eq(a: float64;b: float64): flag; compilerproc;
|
|
|
+Function float64_eq(a: float64;b: float64): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the square root of the double-precision floating-point value `a'.
|
|
@@ -218,7 +216,7 @@ The operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-function float64_sqrt( a: float64 ): float64; compilerproc;
|
|
|
+function float64_sqrt( a: float64 ): float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the remainder of the double-precision floating-point value `a'
|
|
@@ -226,7 +224,7 @@ with respect to the corresponding value `b'. The operation is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_rem(a: float64; b : float64) : float64; compilerproc;
|
|
|
+Function float64_rem(a: float64; b : float64) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of dividing the double-precision floating-point value `a'
|
|
@@ -234,7 +232,7 @@ by the corresponding value `b'. The operation is performed according to the
|
|
|
IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_div(a: float64; b : float64) : float64; compilerproc;
|
|
|
+Function float64_div(a: float64; b : float64) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of multiplying the double-precision floating-point values
|
|
@@ -242,7 +240,7 @@ Returns the result of multiplying the double-precision floating-point values
|
|
|
for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_mul( a: float64; b:float64) : float64; compilerproc;
|
|
|
+Function float64_mul( a: float64; b:float64) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of subtracting the double-precision floating-point values
|
|
@@ -250,7 +248,7 @@ Returns the result of subtracting the double-precision floating-point values
|
|
|
for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_sub(a: float64; b : float64) : float64; compilerproc;
|
|
|
+Function float64_sub(a: float64; b : float64) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of adding the double-precision floating-point values `a'
|
|
@@ -258,7 +256,7 @@ and `b'. The operation is performed according to the IEC/IEEE Standard for
|
|
|
Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_add( a: float64; b : float64) : float64; compilerproc;
|
|
|
+Function float64_add( a: float64; b : float64) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Rounds the double-precision floating-point value `a' to an integer,
|
|
@@ -267,7 +265,7 @@ operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_round_to_int(a: float64) : float64; compilerproc;
|
|
|
+Function float64_round_to_int(a: float64) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the double-precision floating-point value
|
|
@@ -276,7 +274,7 @@ performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_to_float32(a: float64) : float32rec; compilerproc;
|
|
|
+Function float64_to_float32(a: float64) : float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the double-precision floating-point value
|
|
@@ -288,7 +286,7 @@ the conversion overflows, the largest integer with the same sign as `a' is
|
|
|
returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_to_int32_round_to_zero(a: float64 ): int32; compilerproc;
|
|
|
+Function float64_to_int32_round_to_zero(a: float64 ): int32; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the double-precision floating-point value
|
|
@@ -300,7 +298,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
|
|
|
largest integer with the same sign as `a' is returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_to_int32(a: float64): int32; compilerproc;
|
|
|
+Function float64_to_int32(a: float64): int32; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns 1 if the single-precision floating-point value `a' is less than
|
|
@@ -308,7 +306,7 @@ the corresponding value `b', and 0 otherwise. The comparison is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_lt( a:float32rec ; b : float32rec): flag; compilerproc;
|
|
|
+Function float32_lt( a:float32rec ; b : float32rec): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns 1 if the single-precision floating-point value `a' is less than
|
|
@@ -317,7 +315,7 @@ is performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_le( a: float32rec; b : float32rec ):flag; compilerproc;
|
|
|
+Function float32_le( a: float32rec; b : float32rec ):flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns 1 if the single-precision floating-point value `a' is equal to
|
|
@@ -325,7 +323,7 @@ the corresponding value `b', and 0 otherwise. The comparison is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_eq( a:float32rec; b:float32rec): flag; compilerproc;
|
|
|
+Function float32_eq( a:float32rec; b:float32rec): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the square root of the single-precision floating-point value `a'.
|
|
@@ -333,7 +331,7 @@ The operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_sqrt(a: float32rec ): float32rec; compilerproc;
|
|
|
+Function float32_sqrt(a: float32rec ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the remainder of the single-precision floating-point value `a'
|
|
@@ -341,7 +339,7 @@ with respect to the corresponding value `b'. The operation is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_rem(a: float32rec; b: float32rec ):float32rec; compilerproc;
|
|
|
+Function float32_rem(a: float32rec; b: float32rec ):float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of dividing the single-precision floating-point value `a'
|
|
@@ -349,7 +347,7 @@ by the corresponding value `b'. The operation is performed according to the
|
|
|
IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_div(a: float32rec;b: float32rec ): float32rec; compilerproc;
|
|
|
+Function float32_div(a: float32rec;b: float32rec ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of multiplying the single-precision floating-point values
|
|
@@ -357,7 +355,7 @@ Returns the result of multiplying the single-precision floating-point values
|
|
|
for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_mul(a: float32rec; b: float32rec ) : float32rec; compilerproc;
|
|
|
+Function float32_mul(a: float32rec; b: float32rec ) : float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of subtracting the single-precision floating-point values
|
|
@@ -365,7 +363,7 @@ Returns the result of subtracting the single-precision floating-point values
|
|
|
for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_sub( a: float32rec ; b:float32rec ): float32rec; compilerproc;
|
|
|
+Function float32_sub( a: float32rec ; b:float32rec ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of adding the single-precision floating-point values `a'
|
|
@@ -373,7 +371,7 @@ and `b'. The operation is performed according to the IEC/IEEE Standard for
|
|
|
Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_add( a: float32rec; b:float32rec ): float32rec; compilerproc;
|
|
|
+Function float32_add( a: float32rec; b:float32rec ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Rounds the single-precision floating-point value `a' to an integer,
|
|
@@ -382,7 +380,7 @@ operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_round_to_int( a: float32rec): float32rec; compilerproc;
|
|
|
+Function float32_round_to_int( a: float32rec): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the single-precision floating-point value
|
|
@@ -391,7 +389,7 @@ performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_to_float64( a : float32rec) : Float64; compilerproc;
|
|
|
+Function float32_to_float64( a : float32rec) : Float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the single-precision floating-point value
|
|
@@ -403,7 +401,7 @@ the conversion overflows, the largest integer with the same sign as `a' is
|
|
|
returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_to_int32_round_to_zero( a: Float32rec ): int32; compilerproc;
|
|
|
+Function float32_to_int32_round_to_zero( a: Float32rec ): int32; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the single-precision floating-point value
|
|
@@ -415,7 +413,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
|
|
|
largest integer with the same sign as `a' is returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_to_int32( a : float32rec) : int32; compilerproc;
|
|
|
+Function float32_to_int32( a : float32rec) : int32; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the 32-bit two's complement integer `a' to
|
|
@@ -423,7 +421,7 @@ the double-precision floating-point format. The conversion is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function int32_to_float64( a: int32) : float64; compilerproc;
|
|
|
+Function int32_to_float64( a: int32) : float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
{*
|
|
|
-------------------------------------------------------------------------------
|
|
|
Returns the result of converting the 32-bit two's complement integer `a' to
|
|
@@ -431,23 +429,23 @@ the single-precision floating-point format. The conversion is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function int32_to_float32( a: int32): float32rec; compilerproc;
|
|
|
+Function int32_to_float32( a: int32): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
|
|
|
{*----------------------------------------------------------------------------
|
|
|
| Returns the result of converting the 64-bit two's complement integer `a'
|
|
|
| to the double-precision floating-point format. The conversion is performed
|
|
|
| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
*----------------------------------------------------------------------------*}
|
|
|
-Function int64_to_float64( a: int64 ): float64; compilerproc;
|
|
|
-Function qword_to_float64( a: qword ): float64; compilerproc;
|
|
|
+Function int64_to_float64( a: int64 ): float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
+Function qword_to_float64( a: qword ): float64; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
|
|
|
{*----------------------------------------------------------------------------
|
|
|
| Returns the result of converting the 64-bit two's complement integer `a'
|
|
|
| to the single-precision floating-point format. The conversion is performed
|
|
|
| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
*----------------------------------------------------------------------------*}
|
|
|
-Function int64_to_float32( a: int64 ): float32rec; compilerproc;
|
|
|
-Function qword_to_float32( a: qword ): float32rec; compilerproc;
|
|
|
+Function int64_to_float32( a: int64 ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
+Function qword_to_float32( a: qword ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
|
|
|
// +++
|
|
|
function float32_to_int64( a: float32 ): int64;
|
|
@@ -3015,7 +3013,7 @@ the single-precision floating-point format. The conversion is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function int32_to_float32( a: int32): float32rec; compilerproc;
|
|
|
+Function int32_to_float32( a: int32): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
zSign : Flag;
|
|
|
Begin
|
|
@@ -3045,7 +3043,7 @@ the double-precision floating-point format. The conversion is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function int32_to_float64( a: int32) : float64;{$ifdef fpc} [public,Alias:'INT32_TO_FLOAT64'];compilerproc;{$endif}
|
|
|
+Function int32_to_float64( a: int32) : float64;{$ifdef FPC_IN_SYSTEM} [public,Alias:'INT32_TO_FLOAT64'];compilerproc;{$endif}
|
|
|
var
|
|
|
zSign : flag;
|
|
|
absA : bits32;
|
|
@@ -3154,7 +3152,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
|
|
|
largest integer with the same sign as `a' is returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_to_int32( a : float32rec) : int32;compilerproc;
|
|
|
+Function float32_to_int32( a : float32rec) : int32;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign: flag;
|
|
|
aExp, shiftCount: int16;
|
|
@@ -3241,7 +3239,7 @@ the conversion overflows, the largest integer with the same sign as `a' is
|
|
|
returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_to_int32_round_to_zero( a: Float32rec ): int32;compilerproc;
|
|
|
+Function float32_to_int32_round_to_zero( a: Float32rec ): int32;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign : flag;
|
|
|
aExp, shiftCount : int16;
|
|
@@ -3376,7 +3374,7 @@ performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_to_float64( a : float32rec) : Float64;compilerproc;
|
|
|
+Function float32_to_float64( a : float32rec) : Float64;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign : flag;
|
|
|
aExp : int16;
|
|
@@ -3515,7 +3513,7 @@ operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_round_to_int( a: float32rec): float32rec;compilerproc;
|
|
|
+Function float32_round_to_int( a: float32rec): float32rec;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign: flag;
|
|
|
aExp: int16;
|
|
@@ -3813,7 +3811,7 @@ and `b'. The operation is performed according to the IEC/IEEE Standard for
|
|
|
Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_add( a: float32rec; b:float32rec ): float32rec; compilerproc;
|
|
|
+Function float32_add( a: float32rec; b:float32rec ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign, bSign: Flag;
|
|
|
Begin
|
|
@@ -3836,7 +3834,7 @@ Returns the result of subtracting the single-precision floating-point values
|
|
|
for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_sub( a: float32rec ; b:float32rec ): float32rec;compilerproc;
|
|
|
+Function float32_sub( a: float32rec ; b:float32rec ): float32rec;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -3859,7 +3857,7 @@ Returns the result of multiplying the single-precision floating-point values
|
|
|
for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_mul(a: float32rec; b: float32rec ) : float32rec; compilerproc;
|
|
|
+Function float32_mul(a: float32rec; b: float32rec ) : float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
|
|
|
Var
|
|
|
aSign, bSign, zSign: flag;
|
|
@@ -3943,7 +3941,7 @@ by the corresponding value `b'. The operation is performed according to the
|
|
|
IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_div(a: float32rec;b: float32rec ): float32rec; compilerproc;
|
|
|
+Function float32_div(a: float32rec;b: float32rec ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign, bSign, zSign: flag;
|
|
|
aExp, bExp, zExp: int16;
|
|
@@ -4043,7 +4041,7 @@ with respect to the corresponding value `b'. The operation is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_rem(a: float32rec; b: float32rec ):float32rec; compilerproc;
|
|
|
+Function float32_rem(a: float32rec; b: float32rec ):float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign, zSign: flag;
|
|
|
aExp, bExp, expDiff: int16;
|
|
@@ -4161,7 +4159,7 @@ The operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_sqrt(a: float32rec ): float32rec;compilerproc;
|
|
|
+Function float32_sqrt(a: float32rec ): float32rec;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign : flag;
|
|
|
aExp, zExp : int16;
|
|
@@ -4244,7 +4242,7 @@ the corresponding value `b', and 0 otherwise. The comparison is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_eq( a:float32rec; b:float32rec): flag; compilerproc;
|
|
|
+Function float32_eq( a:float32rec; b:float32rec): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Begin
|
|
|
if ((( extractFloat32Exp( a.float32 ) = $FF ) AND (extractFloat32Frac( a.float32 )<>0))
|
|
|
OR ( ( extractFloat32Exp( b.float32 ) = $FF ) AND (extractFloat32Frac( b.float32 )<>0) )
|
|
@@ -4268,7 +4266,7 @@ is performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_le( a: float32rec; b : float32rec ):flag;compilerproc;
|
|
|
+Function float32_le( a: float32rec; b : float32rec ):flag;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -4299,7 +4297,7 @@ the corresponding value `b', and 0 otherwise. The comparison is performed
|
|
|
according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float32_lt( a:float32rec ; b : float32rec): flag; compilerproc;
|
|
|
+Function float32_lt( a:float32rec ; b : float32rec): flag; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -4422,7 +4420,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
|
|
|
largest integer with the same sign as `a' is returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_to_int32(a: float64): int32;{$ifdef fpc} [public,Alias:'FLOAT64_TO_INT32'];compilerproc;{$endif}
|
|
|
+Function float64_to_int32(a: float64): int32;{$ifdef FPC_IN_SYSTEM} [public,Alias:'FLOAT64_TO_INT32'];compilerproc;{$endif}
|
|
|
var
|
|
|
aSign: flag;
|
|
|
aExp, shiftCount: int16;
|
|
@@ -4519,7 +4517,7 @@ returned.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_to_int32_round_to_zero(a: float64 ): int32;
|
|
|
-{$ifdef fpc} [public,Alias:'FLOAT64_TO_INT32_ROUND_TO_ZERO'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM} [public,Alias:'FLOAT64_TO_INT32_ROUND_TO_ZERO'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign: flag;
|
|
|
aExp, shiftCount: int16;
|
|
@@ -4681,7 +4679,7 @@ performed according to the IEC/IEEE Standard for Binary Floating-Point
|
|
|
Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-Function float64_to_float32(a: float64 ): float32rec;compilerproc;
|
|
|
+Function float64_to_float32(a: float64 ): float32rec;{$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
Var
|
|
|
aSign: flag;
|
|
|
aExp: int16;
|
|
@@ -4758,7 +4756,7 @@ operation is performed according to the IEC/IEEE Standard for Binary
|
|
|
Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
-function float64_round_to_int(a: float64) : Float64;{$ifdef fpc} [public,Alias:'FLOAT64_ROUND_TO_INT'];compilerproc;{$endif}
|
|
|
+function float64_round_to_int(a: float64) : Float64;{$ifdef FPC_IN_SYSTEM} [public,Alias:'FLOAT64_ROUND_TO_INT'];compilerproc;{$endif}
|
|
|
|
|
|
Var
|
|
|
aSign: flag;
|
|
@@ -5122,7 +5120,7 @@ Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_add( a: float64; b : float64) : Float64;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_ADD'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_ADD'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -5146,7 +5144,7 @@ for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_sub(a: float64; b : float64) : Float64;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_SUB'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_SUB'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -5170,7 +5168,7 @@ for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_mul( a: float64; b:float64) : Float64;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_MUL'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_MUL'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, bSign, zSign: flag;
|
|
|
aExp, bExp, zExp: int16;
|
|
@@ -5259,7 +5257,7 @@ IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_div(a: float64; b : float64) : Float64;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_DIV'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_DIV'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, bSign, zSign: flag;
|
|
|
aExp, bExp, zExp: int16;
|
|
@@ -5375,7 +5373,7 @@ according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_rem(a: float64; b : float64) : float64;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_REM'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_REM'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, zSign: flag;
|
|
|
aExp, bExp, expDiff: int16;
|
|
@@ -5514,7 +5512,7 @@ Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
function float64_sqrt( a: float64 ): float64;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_SQRT'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_SQRT'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign: flag;
|
|
|
aExp, zExp: int16;
|
|
@@ -5609,7 +5607,7 @@ according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_eq(a: float64; b: float64): flag;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_EQ'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_EQ'];compilerproc;{$endif}
|
|
|
Begin
|
|
|
if
|
|
|
(
|
|
@@ -5649,7 +5647,7 @@ Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_le(a: float64;b: float64): flag;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_LE'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_LE'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -5697,7 +5695,7 @@ according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
-------------------------------------------------------------------------------
|
|
|
*}
|
|
|
Function float64_lt(a: float64;b: float64): flag;
|
|
|
-{$ifdef fpc}[public,Alias:'FLOAT64_LT'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'FLOAT64_LT'];compilerproc;{$endif}
|
|
|
Var
|
|
|
aSign, bSign: flag;
|
|
|
Begin
|
|
@@ -5880,7 +5878,7 @@ End;
|
|
|
| to the single-precision floating-point format. The conversion is performed
|
|
|
| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
*----------------------------------------------------------------------------*}
|
|
|
-function int64_to_float32( a: int64 ): float32rec; compilerproc;
|
|
|
+function int64_to_float32( a: int64 ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
var
|
|
|
zSign : flag;
|
|
|
absA : uint64;
|
|
@@ -5921,7 +5919,7 @@ End;
|
|
|
| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
| Unisgned version.
|
|
|
*----------------------------------------------------------------------------*}
|
|
|
-function qword_to_float32( a: qword ): float32rec; compilerproc;
|
|
|
+function qword_to_float32( a: qword ): float32rec; {$ifdef FPC_IN_SYSTEM}compilerproc;{$endif FPC_IN_SYSTEM}
|
|
|
var
|
|
|
absA : uint64;
|
|
|
shiftCount: int8;
|
|
@@ -5955,7 +5953,7 @@ End;
|
|
|
| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
*----------------------------------------------------------------------------*}
|
|
|
function qword_to_float64( a: qword ): float64;
|
|
|
-{$ifdef fpc}[public,Alias:'QWORD_TO_FLOAT64'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'QWORD_TO_FLOAT64'];compilerproc;{$endif}
|
|
|
var
|
|
|
shiftCount: int8;
|
|
|
Begin
|
|
@@ -5986,7 +5984,7 @@ End;
|
|
|
| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
|
|
|
*----------------------------------------------------------------------------*}
|
|
|
function int64_to_float64( a: int64 ): float64;
|
|
|
-{$ifdef fpc}[public,Alias:'INT64_TO_FLOAT64'];compilerproc;{$endif}
|
|
|
+{$ifdef FPC_IN_SYSTEM}[public,Alias:'INT64_TO_FLOAT64'];compilerproc;{$endif}
|
|
|
Begin
|
|
|
if ( a = 0 ) then
|
|
|
result := packFloat64( 0, 0, 0 )
|