1
0
Fork 0
forked from len0rd/rockbox

Don't copy the data section if src and dest are the same

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4935 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-07-24 17:53:56 +00:00
parent 0185ee7e4c
commit 4b9cb9b5b4

View file

@ -116,6 +116,9 @@ copy_l:
mov.l datacopy_k,r0
mov.l data_k,r1
mov.l dataend_k,r2
/* Don't copy if src and dest are equal */
cmp/eq r0,r1
bt nodatacopy
copy_l2:
mov.l @r0,r3
mov.l r3,@r1
@ -124,7 +127,7 @@ copy_l2:
cmp/ge r2,r1
bf copy_l2
nop
nodatacopy:
/* Munge the main thread stack */
mov.l stack_k,r2
mov.l deadbeef_k,r0