Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67591
b: refs/heads/master
c: 9b4b8fe
h: refs/heads/master
i:
  67589: 6eb53f0
  67587: 40f5e47
  67583: 7d723b3
v: v3
  • Loading branch information
David Gibson authored and Paul Mackerras committed Oct 12, 2007
1 parent dcba498 commit 6150f09
Show file tree
Hide file tree
Showing 3 changed files with 15 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: d0c3d534a4388a465101b634a95f2ec586415254
refs/heads/master: 9b4b8feb962f4b3e74768b7205f1f8f6cce87238
13 changes: 13 additions & 0 deletions trunk/arch/powerpc/boot/string.S
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,19 @@ backwards_memcpy:
mtctr r7
b 1b

.globl memchr
memchr:
cmpwi 0,r5,0
blelr
mtctr r5
addi r3,r3,-1
1: lbzu r0,1(r3)
cmpw r0,r4
beqlr
bdnz 1b
li r3,0
blr

.globl memcmp
memcmp:
cmpwi 0,r5,0
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/boot/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern size_t strnlen(const char *s, size_t count);
extern void *memset(void *s, int c, size_t n);
extern void *memmove(void *dest, const void *src, unsigned long n);
extern void *memcpy(void *dest, const void *src, unsigned long n);
extern void *memchr(const void *s, int c, size_t n);
extern int memcmp(const void *s1, const void *s2, size_t n);

#endif /* _PPC_BOOT_STRING_H_ */

0 comments on commit 6150f09

Please sign in to comment.