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

t_id 40
t_cpu i386
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0
t_note Note: this test requires that nasm assembler is installed

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 12:17:00 25 2024/05/08 15:10:00 25
i386 9 100.0 2024/05/08 12:17:00 25 2024/05/08 15:10:00 25
linux 2 22.2 2024/05/08 12:32:00 236 2024/05/08 12:44:00 172
win32 7 77.8 2024/05/08 12:17:00 25 2024/05/08 15:10:00 25
3.3.1 7 77.8 2024/05/08 12:32:00 236 2024/05/08 15:10:00 25
3.2.3 2 22.2 2024/05/08 12:17:00 25 2024/05/08 12:44:00 172
Skipping test because for other cpu 41 82.0 2024/05/08 11:24:00 238 2024/05/08 14:13:00 40
m68k 2 4.9 2024/05/08 12:40:00 244 2024/05/08 12:52:00 58
sparc 5 12.2 2024/05/08 11:58:00 56 2024/05/08 13:43:00 62
powerpc 3 7.3 2024/05/08 11:24:00 238 2024/05/08 13:17:00 181
arm 2 4.9 2024/05/08 12:28:00 33 2024/05/08 12:36:00 210
x86_64 6 14.6 2024/05/08 12:06:00 41 2024/05/08 14:13:00 40
powerpc64 6 14.6 2024/05/08 11:36:00 242 2024/05/08 13:33:00 60
mips 2 4.9 2024/05/08 12:44:00 239 2024/05/08 13:01:00 154
mipsel 2 4.9 2024/05/08 12:48:00 183 2024/05/08 13:10:00 228
aarch64 4 9.8 2024/05/08 11:57:00 41 2024/05/08 12:29:00 32
sparc64 6 14.6 2024/05/08 11:58:00 155 2024/05/08 14:06:00 137
riscv64 2 4.9 2024/05/08 11:57:00 31 2024/05/08 12:10:00 36
loongarch64 1 2.4 2024/05/08 12:37:00 36 2024/05/08 12:37:00 36
linux 41 100.0 2024/05/08 11:24:00 238 2024/05/08 14:13:00 40
3.3.1 26 63.4 2024/05/08 11:24:00 238 2024/05/08 13:35:00 32
3.2.3 15 36.6 2024/05/08 11:57:00 41 2024/05/08 14:13:00 40

Source:

{ %CPU=i386 }
{ %NOTE= this test requires that nasm assembler is installed }
{ testfdiv variant with NASM output forced }
{$ifdef go32v2}
{$output_format nasmcoff}
{$endif}
{$ifdef win32}
{$output_format nasmwin32}
{$endif}
{$ifdef Unix}
{$output_format nasmelf}
{$endif}
{ 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/tfpu3.pp source.