mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 12:49:45 +02:00
test extended
This commit is contained in:
parent
795a06b4f2
commit
8c94e449ae
@ -11,8 +11,16 @@
|
|||||||
The ATT read
|
The ATT read
|
||||||
fdiv %st,%st(1)
|
fdiv %st,%st(1)
|
||||||
as
|
as
|
||||||
st(1):=st/st(1) }
|
st(1):=st/st(1)
|
||||||
|
Should be tested with
|
||||||
|
different output styles :
|
||||||
|
for go32v2
|
||||||
|
-Aas -Acoff and -Anasmcoff
|
||||||
|
for win32
|
||||||
|
-Aas -Apecoff and -Anasmwin32
|
||||||
|
for linux
|
||||||
|
-Aas and -Anasmelf
|
||||||
|
}
|
||||||
|
|
||||||
program test_nasm_div;
|
program test_nasm_div;
|
||||||
|
|
||||||
@ -46,6 +54,15 @@ begin
|
|||||||
Writeln('ATT result of 4/2=',z:0:2);
|
Writeln('ATT result of 4/2=',z:0:2);
|
||||||
if z <> 2.0 then
|
if z <> 2.0 then
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
asm
|
||||||
|
fldl y
|
||||||
|
fldl x
|
||||||
|
fadd
|
||||||
|
fstpl z
|
||||||
|
end;
|
||||||
|
Writeln('ATT result of 4+2=',z:0:2);
|
||||||
|
if z <> 6.0 then
|
||||||
|
Halt(1);
|
||||||
{$asmmode intel}
|
{$asmmode intel}
|
||||||
asm
|
asm
|
||||||
fld x
|
fld x
|
||||||
@ -66,5 +83,16 @@ begin
|
|||||||
Writeln('Intel result of 4/2=',z:0:2);
|
Writeln('Intel result of 4/2=',z:0:2);
|
||||||
if z <> 2.0 then
|
if z <> 2.0 then
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
asm
|
||||||
|
fld y
|
||||||
|
fld x
|
||||||
|
fadd
|
||||||
|
fstp z
|
||||||
|
end;
|
||||||
|
Writeln('Intel result of 4+2=',z:0:2);
|
||||||
|
if z <> 6.0 then
|
||||||
|
Halt(1);
|
||||||
|
|
||||||
Writeln('All tests completed successfully!');
|
Writeln('All tests completed successfully!');
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user