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=9 Percentage= 18.00

Skipped=41 Percentage= 82.00

Result type Cat. Count Percentage First date Last Date
Successfully run 9 18.0 2024/05/08 06:01:00 28 2024/05/08 08:54:00 78
i386 9 100.0 2024/05/08 06:01:00 28 2024/05/08 08:54:00 78
linux 1 11.1 2024/05/08 08:18:00 43 2024/05/08 08:18:00 43
win32 5 55.6 2024/05/08 06:01:00 28 2024/05/08 08:47:00 26
go32v2 3 33.3 2024/05/08 07:26:00 72 2024/05/08 08:54:00 78
3.3.1 4 44.4 2024/05/08 07:26:00 72 2024/05/08 08:54:00 78
3.2.3 5 55.6 2024/05/08 06:01:00 28 2024/05/08 08:47:00 26
Skipping test because for other cpu 41 82.0 2024/05/08 02:37:00 35 2024/05/08 09:30:00 55
m68k 1 2.4 2024/05/08 08:32:00 54 2024/05/08 08:32:00 54
sparc 3 7.3 2024/05/08 06:22:00 51 2024/05/08 07:48:00 57
powerpc 5 12.2 2024/05/08 07:48:00 62 2024/05/08 08:55:00 62
arm 1 2.4 2024/05/08 08:11:00 34 2024/05/08 08:11:00 34
x86_64 16 39.0 2024/05/08 02:37:00 35 2024/05/08 09:30:00 27
powerpc64 4 9.8 2024/05/08 08:59:00 57 2024/05/08 09:30:00 55
mips 2 4.9 2024/05/08 08:17:00 51 2024/05/08 08:39:00 43
mipsel 1 2.4 2024/05/08 08:47:00 41 2024/05/08 08:47:00 41
aarch64 7 17.1 2024/05/08 05:55:00 30 2024/05/08 09:30:00 37
loongarch64 1 2.4 2024/05/08 08:26:00 36 2024/05/08 08:26:00 36
linux 32 78.0 2024/05/08 02:37:00 35 2024/05/08 09:30:00 55
solaris 3 7.3 2024/05/08 06:22:00 51 2024/05/08 07:48:00 57
darwin 2 4.9 2024/05/08 05:55:00 30 2024/05/08 07:02:00 28
aix 4 9.8 2024/05/08 07:48:00 62 2024/05/08 08:55:00 62
3.3.1 19 46.3 2024/05/08 03:11:00 23 2024/05/08 09:04:00 61
3.2.3 22 53.7 2024/05/08 02:37:00 35 2024/05/08 09:30:00 55

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.