Test suite results for test file test/tfpu4.pp

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all tests

Test file "test/tfpu4.pp" information:

t_id 41
t_cpu i386
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=7 Percentage= 14.00

Skipped=43 Percentage= 86.00

Result type Cat. Count Percentage First date Last Date
Successfully run 7 14.0 2024/06/02 01:36:00 47 2024/06/02 05:03:00 0
i386 7 100.0 2024/06/02 01:36:00 47 2024/06/02 05:03:00 0
linux 4 57.1 2024/06/02 01:36:00 47 2024/06/02 03:48:00 234
go32v2 3 42.9 2024/06/02 03:45:00 54 2024/06/02 05:03:00 0
3.3.1 2 28.6 2024/06/02 02:32:00 27 2024/06/02 03:48:00 234
3.2.3 5 71.4 2024/06/02 01:36:00 47 2024/06/02 05:03:00 0
Skipping test because for other cpu 43 86.0 2024/06/02 01:46:00 39 2024/06/02 06:03:00 0
m68k 1 2.3 2024/06/02 03:55:00 53 2024/06/02 03:55:00 53
sparc 5 11.6 2024/06/02 03:07:00 41 2024/06/02 04:45:00 56
powerpc 1 2.3 2024/06/02 04:10:00 238 2024/06/02 04:10:00 238
x86_64 24 55.8 2024/06/02 01:57:00 22 2024/06/02 06:03:00 0
powerpc64 4 9.3 2024/06/02 04:15:00 53 2024/06/02 04:32:00 57
mips 1 2.3 2024/06/02 04:00:00 47 2024/06/02 04:00:00 47
mipsel 1 2.3 2024/06/02 04:06:00 185 2024/06/02 04:06:00 185
aarch64 4 9.3 2024/06/02 01:46:00 39 2024/06/02 04:26:00 35
sparc64 1 2.3 2024/06/02 05:03:00 0 2024/06/02 05:03:00 0
riscv64 1 2.3 2024/06/02 04:39:00 31 2024/06/02 04:39:00 31
linux 36 83.7 2024/06/02 01:46:00 39 2024/06/02 05:03:00 0
solaris 7 16.3 2024/06/02 03:07:00 41 2024/06/02 06:03:00 0
3.3.1 26 60.5 2024/06/02 01:46:00 39 2024/06/02 06:03:00 0
3.2.3 17 39.5 2024/06/02 02:06:00 35 2024/06/02 04:56:00 0

Source:

{ %CPU=i386 }
{ testfdiv variant with GNU AS output forced }
{$ifdef win32}
{$output_format asw}
{$else}
{$output_format as}
{$endif win32}
{ This test program deals with the
  the delicate problem of
  non commutative FPU instruction
  where the destination register
  is ST(1) to ST(7)

    Whereas Intel interprets
      fdiv st(1),st
    as
      st(1):=st(1) / st
    The ATT read
      fdiv %st,%st(1)
    as
      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;


var
  x,y,z : double;

begin
  x:=4;
  y:=2;
  Writeln('4/2=',x/y:0:2);
  if x/y <> 2.0 then
    Halt(1);
{$asmmode att}
  asm
    fldl y
    fldl x
    fdivp %st,%st(1)
    fstpl z
  end;
  Writeln('ATT result of 4/2=',z:0:2);
  if z <> 2.0 then
    Halt(1);
  asm
    fldl y
    fldl x
    fdiv %st(1),%st
    fstpl z
    fstp %st
  end;
  Writeln('ATT result of 4/2=',z:0:2);
  if z <> 2.0 then
    Halt(1);
  asm
    fldl y
    fldl x
    fdiv %st,%st(1)
    fstp %st
    fstpl z
  end;
  Writeln('ATT result of 4/2=',z:0:2);
  if z <> 2.0 then
    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}
  asm
    fld x
    fld y
    fdivp  st(1),st
    fstp z
  end;
  Writeln('Intel result of 4/2=',z:0:2);
  if z <> 2.0 then
    Halt(1);
  asm
    fld y
    fld x
    fdiv  st,st(1)
    fstp z
    fstp st
  end;
  Writeln('Intel result of 4/2=',z:0:2);
  if z <> 2.0 then
    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!');
end.

Link to SVN view of test/tfpu4.pp source.