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

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

Detailed test run results:

Record count: 50

Total = 50

OK=21 Percentage= 42.00

Skipped=29 Percentage= 58.00

Result type Cat. Count Percentage First date Last Date
Successfully run 21 42.0 2024/05/08 23:26:00 32 2024/05/09 00:28:00 33
i386 21 100.0 2024/05/08 23:26:00 32 2024/05/09 00:28:00 33
linux 20 95.2 2024/05/08 23:26:00 32 2024/05/09 00:28:00 33
win32 1 4.8 2024/05/08 23:57:00 23 2024/05/08 23:57:00 23
3.3.1 4 19.0 2024/05/08 23:35:00 28 2024/05/09 00:01:00 30
3.2.3 17 81.0 2024/05/08 23:26:00 32 2024/05/09 00:28:00 33
Skipping test because for other cpu 29 58.0 2024/05/08 21:11:00 188 2024/05/09 00:27:00 46
sparc 19 65.5 2024/05/08 21:40:00 68 2024/05/08 23:52:00 41
powerpc 1 3.4 2024/05/08 21:11:00 188 2024/05/08 21:11:00 188
x86_64 4 13.8 2024/05/08 22:13:00 104 2024/05/08 23:44:00 22
powerpc64 3 10.3 2024/05/09 00:20:00 46 2024/05/09 00:27:00 46
aarch64 1 3.4 2024/05/09 00:13:00 32 2024/05/09 00:13:00 32
sparc64 1 3.4 2024/05/08 22:05:00 151 2024/05/08 22:05:00 151
linux 8 27.6 2024/05/08 21:11:00 188 2024/05/09 00:27:00 46
solaris 18 62.1 2024/05/08 23:24:00 38 2024/05/08 23:52:00 41
win64 3 10.3 2024/05/08 22:24:00 37 2024/05/08 23:44:00 22
3.3.1 16 55.2 2024/05/08 23:14:00 21 2024/05/09 00:27:00 46
3.2.3 13 44.8 2024/05/08 21:11:00 188 2024/05/08 23:52:00 41

Source:

{ %CPU=i386 }
{$ifdef FPC}
{$ASMMODE INTEL}
{$INLINE ON}
{$endif FPC}

program test;

type
   tobj = object
     x : word;
     constructor init;
     procedure test;virtual;
     procedure testx;
     end;

constructor tobj.init;
begin
  x:=1;
end;

procedure tobj.testx;
begin
  asm
    mov ax,3
    mov word ptr[x],ax
  end;
end;

procedure tobj.test;
var
  pattern: word;
  dummyval : word;

  function rotate: boolean; assembler; {$ifdef FPC}inline;{$endif FPC}
  asm
    mov al,0
    rol word ptr [pattern],1
    rcl al,1
  end;

{ this does still not work because
  it can only work as inline not as normal sub function
  because dummyval and pattern are not reachable !! PM
  function rotateb(dummy : byte) : boolean; assembler; inline;
  asm
    movzx byte ptr [dummy],ax
    mov ax,word ptr [dummyval]
    mov al,0
    rol word ptr [pattern],1
    rcl al,1
  end; }

var
  i : byte;

begin
  pattern:= $a0a0;
  for i:=1 to 16 do
   begin
     Write('obj pattern = ',
       {$ifdef FPC}
       hexstr(pattern,4),' ');
       {$else}
       pattern,' ');
       {$endif}
     if rotate then
       Writeln('bit found')
     else
       Writeln('no bit found');
   end;
end;

procedure changepattern;
var
  pattern: word;
  dummyval : word;

  function rotate: boolean; assembler; {$ifdef FPC}inline;{$endif FPC}
  asm
    mov al,0
    rol word ptr [pattern],1
    rcl al,1
  end;

{ this does still not work because
  it can only work as inline not as normal sub function
  because dummyval and pattern are not reachable !! PM
  function rotateb(dummy : byte) : boolean; assembler; inline;
  asm
    movzx byte ptr [dummy],ax
    mov ax,word ptr [dummyval]
    mov al,0
    rol word ptr [pattern],1
    rcl al,1
  end; }

var
  i : byte;

begin
  pattern:= $a0a0;
  for i:=1 to 16 do
   begin
     Write('pattern = ',
       {$ifdef FPC}
       hexstr(pattern,4),' ');
       {$else}
       pattern,' ');
       {$endif}
     if rotate then
       Writeln('bit found')
     else
       Writeln('no bit found');
   end;
end;

var

  t : tobj;
begin
  changepattern;
  t.init;
  t.test;
  t.testx;
  if t.x<>3 then
    begin
      Writeln('Unable to access object fields in assembler');
      Halt(1);
    end;
end.

Link to SVN view of webtbs/tw0736.pp source.