Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109865
b: refs/heads/master
c: e37925e
h: refs/heads/master
i:
  109863: 690e508
v: v3
  • Loading branch information
Hans-Christian Egtvedt authored and Haavard Skinnemoen committed Sep 19, 2008
1 parent 8008e44 commit 1666b17
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b771c12b56fdea6c0596a69c63b097b62ce9f41
refs/heads/master: e37925ebdb9738fc7968119198c6997e79093c02
1 change: 1 addition & 0 deletions trunk/arch/avr32/kernel/avr32_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ EXPORT_SYMBOL(find_first_zero_bit);
EXPORT_SYMBOL(find_next_zero_bit);
EXPORT_SYMBOL(find_first_bit);
EXPORT_SYMBOL(find_next_bit);
EXPORT_SYMBOL(generic_find_next_le_bit);
EXPORT_SYMBOL(generic_find_next_zero_le_bit);

/* I/O primitives (lib/io-*.S) */
Expand Down
30 changes: 30 additions & 0 deletions trunk/arch/avr32/lib/findbit.S
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,36 @@ ENTRY(find_next_bit)
brgt 1b
retal r11

ENTRY(generic_find_next_le_bit)
lsr r8, r10, 5
sub r9, r11, r10
retle r11

lsl r8, 2
add r12, r8
andl r10, 31, COH
breq 1f

/* offset is not word-aligned. Handle the first (32 - r10) bits */
ldswp.w r8, r12[0]
sub r12, -4
lsr r8, r8, r10
brne .L_found

/* r9 = r9 - (32 - r10) = r9 + r10 - 32 */
add r9, r10
sub r9, 32
retle r11

/* Main loop. offset must be word-aligned */
1: ldswp.w r8, r12[0]
cp.w r8, 0
brne .L_found
sub r12, -4
sub r9, 32
brgt 1b
retal r11

ENTRY(generic_find_next_zero_le_bit)
lsr r8, r10, 5
sub r9, r11, r10
Expand Down

0 comments on commit 1666b17

Please sign in to comment.