diff options
| -rw-r--r-- | arch/powerpc/lib/string.S | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index 3ac0cd3a5373..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 | ble- 2f | 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 |
| @@ -94,8 +94,8 @@ _GLOBAL(strlen) | |||
| 94 | blr | 94 | blr |
| 95 | 95 | ||
| 96 | _GLOBAL(memcmp) | 96 | _GLOBAL(memcmp) |
| 97 | cmpwi 0,r5,0 | 97 | PPC_LCMPI 0,r5,0 |
| 98 | ble- 2f | 98 | beq- 2f |
| 99 | mtctr r5 | 99 | mtctr r5 |
| 100 | addi r6,r3,-1 | 100 | addi r6,r3,-1 |
| 101 | addi r4,r4,-1 | 101 | addi r4,r4,-1 |
| @@ -108,8 +108,8 @@ _GLOBAL(memcmp) | |||
| 108 | blr | 108 | blr |
| 109 | 109 | ||
| 110 | _GLOBAL(memchr) | 110 | _GLOBAL(memchr) |
| 111 | cmpwi 0,r5,0 | 111 | PPC_LCMPI 0,r5,0 |
| 112 | ble- 2f | 112 | beq- 2f |
| 113 | mtctr r5 | 113 | mtctr r5 |
| 114 | addi r3,r3,-1 | 114 | addi r3,r3,-1 |
| 115 | 1: lbzu r0,1(r3) | 115 | 1: lbzu r0,1(r3) |
