diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 14:17:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 14:17:05 -0400 |
commit | 79c4581262e225a7c96d88b632b05ab3b5e9a52c (patch) | |
tree | 8ef030c74ab7e0d0df27cf86195f915efd2832f7 /arch/powerpc/lib/string.S | |
parent | 59534f7298c5e28aaa64e6ed550e247f64ee72ae (diff) | |
parent | 99ec28f183daa450faa7bdad6f932364ae325648 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (92 commits)
powerpc: Remove unused 'protect4gb' boot parameter
powerpc: Build-in e1000e for pseries & ppc64_defconfig
powerpc/pseries: Make request_ras_irqs() available to other pseries code
powerpc/numa: Use ibm,architecture-vec-5 to detect form 1 affinity
powerpc/numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
powerpc: Use smt_snooze_delay=-1 to always busy loop
powerpc: Remove check of ibm,smt-snooze-delay OF property
powerpc/kdump: Fix race in kdump shutdown
powerpc/kexec: Fix race in kexec shutdown
powerpc/kexec: Speedup kexec hash PTE tear down
powerpc/pseries: Add hcall to read 4 ptes at a time in real mode
powerpc: Use more accurate limit for first segment memory allocations
powerpc/kdump: Use chip->shutdown to disable IRQs
powerpc/kdump: CPUs assume the context of the oopsing CPU
powerpc/crashdump: Do not fail on NULL pointer dereferencing
powerpc/eeh: Fix oops when probing in early boot
powerpc/pci: Check devices status property when scanning OF tree
powerpc/vio: Switch VIO Bus PM to use generic helpers
powerpc: Avoid bad relocations in iSeries code
powerpc: Use common cpu_die (fixes SMP+SUSPEND build)
...
Diffstat (limited to 'arch/powerpc/lib/string.S')
-rw-r--r-- | arch/powerpc/lib/string.S | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index 64e2e499e32a..455881a5563f 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S | |||
@@ -28,7 +28,7 @@ _GLOBAL(strcpy) | |||
28 | /* This clears out any unused part of the destination buffer, | 28 | /* This clears out any unused part of the destination buffer, |
29 | just as the libc version does. -- paulus */ | 29 | just as the libc version does. -- paulus */ |
30 | _GLOBAL(strncpy) | 30 | _GLOBAL(strncpy) |
31 | cmpwi 0,r5,0 | 31 | PPC_LCMPI 0,r5,0 |
32 | beqlr | 32 | beqlr |
33 | mtctr r5 | 33 | mtctr r5 |
34 | addi r6,r3,-1 | 34 | addi r6,r3,-1 |
@@ -39,7 +39,7 @@ _GLOBAL(strncpy) | |||
39 | bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ | 39 | bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ |
40 | bnelr /* if we didn't hit a null char, we're done */ | 40 | bnelr /* if we didn't hit a null char, we're done */ |
41 | mfctr r5 | 41 | mfctr r5 |
42 | cmpwi 0,r5,0 /* any space left in destination buffer? */ | 42 | PPC_LCMPI 0,r5,0 /* any space left in destination buffer? */ |
43 | beqlr /* we know r0 == 0 here */ | 43 | beqlr /* we know r0 == 0 here */ |
44 | 2: stbu r0,1(r6) /* clear it out if so */ | 44 | 2: stbu r0,1(r6) /* clear it out if so */ |
45 | bdnz 2b | 45 | bdnz 2b |
@@ -70,8 +70,8 @@ _GLOBAL(strcmp) | |||
70 | blr | 70 | blr |
71 | 71 | ||
72 | _GLOBAL(strncmp) | 72 | _GLOBAL(strncmp) |
73 | PPC_LCMPI r5,0 | 73 | PPC_LCMPI 0,r5,0 |
74 | beqlr | 74 | beq- 2f |
75 | mtctr r5 | 75 | mtctr r5 |
76 | addi r5,r3,-1 | 76 | addi r5,r3,-1 |
77 | addi r4,r4,-1 | 77 | addi r4,r4,-1 |
@@ -82,6 +82,8 @@ _GLOBAL(strncmp) | |||
82 | beqlr 1 | 82 | beqlr 1 |
83 | bdnzt eq,1b | 83 | bdnzt eq,1b |
84 | blr | 84 | blr |
85 | 2: li r3,0 | ||
86 | blr | ||
85 | 87 | ||
86 | _GLOBAL(strlen) | 88 | _GLOBAL(strlen) |
87 | addi r4,r3,-1 | 89 | addi r4,r3,-1 |
@@ -92,8 +94,8 @@ _GLOBAL(strlen) | |||
92 | blr | 94 | blr |
93 | 95 | ||
94 | _GLOBAL(memcmp) | 96 | _GLOBAL(memcmp) |
95 | cmpwi 0,r5,0 | 97 | PPC_LCMPI 0,r5,0 |
96 | ble- 2f | 98 | beq- 2f |
97 | mtctr r5 | 99 | mtctr r5 |
98 | addi r6,r3,-1 | 100 | addi r6,r3,-1 |
99 | addi r4,r4,-1 | 101 | addi r4,r4,-1 |
@@ -106,8 +108,8 @@ _GLOBAL(memcmp) | |||
106 | blr | 108 | blr |
107 | 109 | ||
108 | _GLOBAL(memchr) | 110 | _GLOBAL(memchr) |
109 | cmpwi 0,r5,0 | 111 | PPC_LCMPI 0,r5,0 |
110 | ble- 2f | 112 | beq- 2f |
111 | mtctr r5 | 113 | mtctr r5 |
112 | addi r3,r3,-1 | 114 | addi r3,r3,-1 |
113 | 1: lbzu r0,1(r3) | 115 | 1: lbzu r0,1(r3) |