Skip to content

Commit

Permalink
Add support for pl3_memcpy of size 0
Browse files Browse the repository at this point in the history
  • Loading branch information
kakaroto committed Oct 6, 2010
1 parent 97412de commit 1d5a9fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pl3_memcpy.h.S
Expand Up @@ -15,11 +15,13 @@

.align 4
pl3_memcpy:
cmpldi %r5, 0 // if %r5 reaches 0, end it
beq l_pl3_memcpy_done
subi %r5, %r5, 1 // set %r5 to read the previous byte
lbzx %r6, %r3, %r5 // Copy byte content of %r3[%r5] to %r6
stbx %r6, %r4, %r5 // Store byte %r6 to %r4[%r5]
cmpldi %r5, 0 // if %r5 reaches 0, end it
bne pl3_memcpy
b pl3_mempcy
l_pl3_memcpy_done:
blr

#endif /* __PL3_MEMCPY_H_S__ */
Expand Down

0 comments on commit 1d5a9fc

Please sign in to comment.