~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/bzip2/src/bzip2i386.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{$ASMMODE intel}
 
2
 
 
3
{$define HAVE_DETRANSFORM}
 
4
{
 
5
procedure Tbzip2_decode_stream.detransform;
 
6
 
 
7
var a:cardinal;
 
8
    p,q,r:Pcardinal;
 
9
 
 
10
begin
 
11
  a:=0;
 
12
  p:=@tt^[0];
 
13
  q:=p+tt_count;
 
14
  while p<>q do
 
15
    begin
 
16
      r:=@tt^[cftab[p^ and $ff]];
 
17
      inc(cftab[p^ and $ff]);
 
18
      r^:=r^ or a;
 
19
      inc(a,256);
 
20
      inc(p);
 
21
    end;
 
22
end;
 
23
}
 
24
 
 
25
{const c:cardinal=0;
 
26
 
 
27
procedure mcount;external name 'mcount';}
 
28
 
 
29
 
 
30
procedure Tbzip2_decode_stream.detransform;assembler;
 
31
 
 
32
asm
 
33
{  mov edx,offset c
 
34
  call mcount}
 
35
  xor edx,edx
 
36
  lea ebx,[esi+Tbzip2_decode_stream.cftab]
 
37
  mov ecx,[esi+Tbzip2_decode_stream.tt_count]
 
38
  push esi
 
39
  push ebp
 
40
  mov esi,[esi+Tbzip2_decode_stream.tt]
 
41
  mov edi,esi
 
42
  lea ebp,[4*ecx+esi]
 
43
  jmp @a2
 
44
@a1:
 
45
  movzx eax,byte [esi]
 
46
  mov ecx,[ebx+4*eax]
 
47
  inc dword [ebx+4*eax]
 
48
  or [edi+4*ecx],edx
 
49
  add edx,$100
 
50
  add esi,4
 
51
@a2:
 
52
  cmp esi,ebp
 
53
  jne @a1
 
54
  pop ebp
 
55
  pop esi
 
56
end ['eax','ebx','ecx','edx','edi'];