aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32/lib
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/unicore32/lib
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'arch/unicore32/lib')
-rw-r--r--arch/unicore32/lib/findbit.S14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/unicore32/lib/findbit.S b/arch/unicore32/lib/findbit.S
index c77746247d3..c360ce905d8 100644
--- a/arch/unicore32/lib/findbit.S
+++ b/arch/unicore32/lib/findbit.S
@@ -17,7 +17,7 @@
17 * Purpose : Find a 'zero' bit 17 * Purpose : Find a 'zero' bit
18 * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); 18 * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit);
19 */ 19 */
20ENTRY(find_first_zero_bit) 20__uc32_find_first_zero_bit:
21 cxor.a r1, #0 21 cxor.a r1, #0
22 beq 3f 22 beq 3f
23 mov r2, #0 23 mov r2, #0
@@ -29,14 +29,13 @@ ENTRY(find_first_zero_bit)
29 bub 1b 29 bub 1b
303: mov r0, r1 @ no free bits 303: mov r0, r1 @ no free bits
31 mov pc, lr 31 mov pc, lr
32ENDPROC(find_first_zero_bit)
33 32
34/* 33/*
35 * Purpose : Find next 'zero' bit 34 * Purpose : Find next 'zero' bit
36 * Prototype: int find_next_zero_bit 35 * Prototype: int find_next_zero_bit
37 * (void *addr, unsigned int maxbit, int offset) 36 * (void *addr, unsigned int maxbit, int offset)
38 */ 37 */
39ENTRY(find_next_zero_bit) 38ENTRY(__uc32_find_next_zero_bit)
40 cxor.a r1, #0 39 cxor.a r1, #0
41 beq 3b 40 beq 3b
42 and.a ip, r2, #7 41 and.a ip, r2, #7
@@ -48,14 +47,14 @@ ENTRY(find_next_zero_bit)
48 or r2, r2, #7 @ if zero, then no bits here 47 or r2, r2, #7 @ if zero, then no bits here
49 add r2, r2, #1 @ align bit pointer 48 add r2, r2, #1 @ align bit pointer
50 b 2b @ loop for next bit 49 b 2b @ loop for next bit
51ENDPROC(find_next_zero_bit) 50ENDPROC(__uc32_find_next_zero_bit)
52 51
53/* 52/*
54 * Purpose : Find a 'one' bit 53 * Purpose : Find a 'one' bit
55 * Prototype: int find_first_bit 54 * Prototype: int find_first_bit
56 * (const unsigned long *addr, unsigned int maxbit); 55 * (const unsigned long *addr, unsigned int maxbit);
57 */ 56 */
58ENTRY(find_first_bit) 57__uc32_find_first_bit:
59 cxor.a r1, #0 58 cxor.a r1, #0
60 beq 3f 59 beq 3f
61 mov r2, #0 60 mov r2, #0
@@ -67,14 +66,13 @@ ENTRY(find_first_bit)
67 bub 1b 66 bub 1b
683: mov r0, r1 @ no free bits 673: mov r0, r1 @ no free bits
69 mov pc, lr 68 mov pc, lr
70ENDPROC(find_first_bit)
71 69
72/* 70/*
73 * Purpose : Find next 'one' bit 71 * Purpose : Find next 'one' bit
74 * Prototype: int find_next_zero_bit 72 * Prototype: int find_next_zero_bit
75 * (void *addr, unsigned int maxbit, int offset) 73 * (void *addr, unsigned int maxbit, int offset)
76 */ 74 */
77ENTRY(find_next_bit) 75ENTRY(__uc32_find_next_bit)
78 cxor.a r1, #0 76 cxor.a r1, #0
79 beq 3b 77 beq 3b
80 and.a ip, r2, #7 78 and.a ip, r2, #7
@@ -85,7 +83,7 @@ ENTRY(find_next_bit)
85 or r2, r2, #7 @ if zero, then no bits here 83 or r2, r2, #7 @ if zero, then no bits here
86 add r2, r2, #1 @ align bit pointer 84 add r2, r2, #1 @ align bit pointer
87 b 2b @ loop for next bit 85 b 2b @ loop for next bit
88ENDPROC(find_next_bit) 86ENDPROC(__uc32_find_next_bit)
89 87
90/* 88/*
91 * One or more bits in the LSB of r3 are assumed to be set. 89 * One or more bits in the LSB of r3 are assumed to be set.