| * String handling functions for PowerPC. |
| * Copyright (C) 1996 Paul Mackerras. |
| * This program is free software; you can redistribute it and/or |
| * modify it under the terms of the GNU General Public License |
| * as published by the Free Software Foundation; either version |
| * 2 of the License, or (at your option) any later version. |
| /* This clears out any unused part of the destination buffer, |
| just as the libc version does. -- paulus */ |
| .balign IFETCH_ALIGN_BYTES |
| bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ |
| bnelr /* if we didn't hit a null char, we're done */ |
| PPC_LCMPI 0,r5,0 /* any space left in destination buffer? */ |
| beqlr /* we know r0 == 0 here */ |
| 2: stbu r0,1(r6) /* clear it out if so */ |
| .balign IFETCH_ALIGN_BYTES |
| .balign IFETCH_ALIGN_BYTES |