Subversion Repositories shark

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
.globl	_wordpointer
2
.type	_wordpointer,@object
3
.size	_wordpointer,4
4
 
5
.globl	_bitindex
6
.type	_bitindex,@object
7
.size	_bitindex,4
8
 
9
.globl	_getbits
10
	.type    _getbits,@function
11
_getbits:
12
	cmpl	$0,4(%esp)
13
	jne	.L1
14
	xorl	%eax,%eax
15
	ret
16
 
17
.L1:
18
	movl	_wordpointer,%ecx
19
	movzbl	(%ecx),%eax
20
	shll	$16,%eax
21
	movb	1(%ecx),%ah
22
	movb	2(%ecx),%al
23
	movl	_bitindex,%ecx
24
	shll	$8,%eax
25
	shll	%cl,%eax
26
	movl 	4(%esp),%ecx
27
	addl	%ecx,_bitindex
28
	negl	%ecx
29
	addl	$32,%ecx
30
	shrl	%cl,%eax
31
	movl	_bitindex,%ecx
32
	sarl	$3,%ecx
33
	addl	%ecx,_wordpointer
34
	andl	$7,_bitindex
35
	ret
36
 
37
 
38
 
39
.globl	_getbits_fast
40
	.type    _getbits_fast,@function
41
_getbits_fast:
42
	movl	_wordpointer,%ecx
43
	movzbl	1(%ecx),%eax
44
	movb	(%ecx),%ah
45
	movl	_bitindex,%ecx
46
	shlw	%cl,%ax
47
	movl 	4(%esp),%ecx
48
	addl	%ecx,_bitindex
49
	negl	%ecx
50
	addl	$16,%ecx
51
	shrl	%cl,%eax
52
	movl	_bitindex,%ecx
53
	sarl	$3,%ecx
54
	addl	%ecx,_wordpointer
55
	andl	$7,_bitindex
56
	ret
57
 
58
 
59
 
60
.globl	_get1bit
61
	.type    _get1bit,@function
62
_get1bit:
63
	movl	_wordpointer,%ecx
64
	movzbl	(%ecx),%eax
65
	movl	_bitindex,%ecx
66
	incl	%ecx
67
	rolb	%cl,%al
68
	andb	$1,%al
69
	movl	%ecx,_bitindex
70
	andl	$7,_bitindex
71
	sarl	$3,%ecx
72
	addl	%ecx,_wordpointer
73
	ret