mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 12:18:30 +02:00
40 lines
892 B
ObjectPascal
40 lines
892 B
ObjectPascal
{ %skiptarget=android }
|
|
{ %cpu=i386 }
|
|
{ %OPT=-Cg- }
|
|
{ Source provided for Free Pascal Bug Report 2668 }
|
|
{ Submitted by "Marco" on 2003-09-06 }
|
|
{ e-mail: marco+bugs@freepascal.org }
|
|
|
|
{$ifdef fpc}{$MODE DELPHI} {$ASMMODE INTEL} {$endif}
|
|
|
|
type
|
|
TFloatingPointClass =
|
|
(
|
|
fpZero, // zero
|
|
fpNormal, // normal finite <> 0
|
|
fpDenormal, // denormalized finite
|
|
fpInfinite, // infinite
|
|
fpNaN, // not a number
|
|
fpInvalid // unsupported floating point format
|
|
);
|
|
|
|
const
|
|
FPClasses: array [0..5] of TFloatingPointClass =
|
|
(
|
|
fpInvalid,
|
|
fpNaN,
|
|
fpNormal,
|
|
fpInfinite,
|
|
fpZero,
|
|
fpDenormal
|
|
);
|
|
|
|
asm
|
|
MOV ECX,0
|
|
MOV EDX,0
|
|
MOVZX EAX, TFloatingPointClass(FPClasses[EDX])
|
|
MOVZX EAX, TFloatingPointClass([ECX].FPClasses[EDX])
|
|
LEA ECX,FPClasses
|
|
MOVZX EAX, TFloatingPointClass([ECX].1+2[EDX])
|
|
end.
|