Test suite results for test file test/tfpu5.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/tfpu5.pp" information:

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

Detailed test run results:

Record count: 50

Total = 50

OK=10 Percentage= 20.00

Skipped=40 Percentage= 80.00

Result type Cat. Count Percentage First date Last Date
Successfully run 10 20.0 2024/05/08 13:27:00 22 2024/05/08 19:48:00 175
i386 10 100.0 2024/05/08 13:27:00 22 2024/05/08 19:48:00 175
linux 2 20.0 2024/05/08 19:08:00 176 2024/05/08 19:48:00 175
win32 8 80.0 2024/05/08 13:27:00 22 2024/05/08 19:00:00 22
3.3.1 8 80.0 2024/05/08 13:27:00 22 2024/05/08 19:00:00 22
3.2.3 2 20.0 2024/05/08 19:08:00 176 2024/05/08 19:48:00 175
Skipping test because for other cpu 40 80.0 2024/05/08 12:37:00 36 2024/05/08 20:10:00 0
m68k 2 5.0 2024/05/08 19:15:00 190 2024/05/08 19:55:00 190
sparc 3 7.5 2024/05/08 13:17:00 68 2024/05/08 20:01:00 79
powerpc 2 5.0 2024/05/08 13:17:00 181 2024/05/08 19:37:00 185
arm 2 5.0 2024/05/08 19:02:00 59 2024/05/08 19:41:00 67
x86_64 4 10.0 2024/05/08 13:35:00 32 2024/05/08 20:10:00 0
powerpc64 4 10.0 2024/05/08 13:25:00 77 2024/05/08 19:51:00 71
mips 4 10.0 2024/05/08 12:44:00 239 2024/05/08 20:03:00 0
mipsel 2 5.0 2024/05/08 19:30:00 229 2024/05/08 20:10:00 0
aarch64 14 35.0 2024/05/08 16:11:00 32 2024/05/08 19:34:00 43
sparc64 2 5.0 2024/05/08 13:32:00 159 2024/05/08 14:06:00 137
loongarch64 1 2.5 2024/05/08 12:37:00 36 2024/05/08 12:37:00 36
linux 26 65.0 2024/05/08 12:37:00 36 2024/05/08 20:10:00 0
darwin 12 30.0 2024/05/08 16:11:00 32 2024/05/08 17:40:00 56
win64 2 5.0 2024/05/08 19:43:00 23 2024/05/08 20:10:00 0
3.3.1 6 15.0 2024/05/08 12:37:00 36 2024/05/08 16:39:00 49
3.2.3 34 85.0 2024/05/08 13:17:00 181 2024/05/08 20:10:00 0

Source:

{ %CPU=i386 }
{ 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/tfpu5.pp source.