diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-24 17:53:56 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-24 17:53:56 +0000 |
commit | 4b9cb9b5b4419207aca40040bd57a60d6e3734e1 (patch) | |
tree | eb7a90d9a2cba8c162a55479756d4b93a763491a | |
parent | 0185ee7e4c67fe4e9de8c609dfbcb4d5ae12353b (diff) | |
download | rockbox-4b9cb9b5b4419207aca40040bd57a60d6e3734e1.tar.gz rockbox-4b9cb9b5b4419207aca40040bd57a60d6e3734e1.zip |
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
-rw-r--r-- | firmware/crt0.S | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index 088ea0aff4..e33faa66e5 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S | |||
@@ -116,6 +116,9 @@ copy_l: | |||
116 | mov.l datacopy_k,r0 | 116 | mov.l datacopy_k,r0 |
117 | mov.l data_k,r1 | 117 | mov.l data_k,r1 |
118 | mov.l dataend_k,r2 | 118 | mov.l dataend_k,r2 |
119 | /* Don't copy if src and dest are equal */ | ||
120 | cmp/eq r0,r1 | ||
121 | bt nodatacopy | ||
119 | copy_l2: | 122 | copy_l2: |
120 | mov.l @r0,r3 | 123 | mov.l @r0,r3 |
121 | mov.l r3,@r1 | 124 | mov.l r3,@r1 |
@@ -124,7 +127,7 @@ copy_l2: | |||
124 | cmp/ge r2,r1 | 127 | cmp/ge r2,r1 |
125 | bf copy_l2 | 128 | bf copy_l2 |
126 | nop | 129 | nop |
127 | 130 | nodatacopy: | |
128 | /* Munge the main thread stack */ | 131 | /* Munge the main thread stack */ |
129 | mov.l stack_k,r2 | 132 | mov.l stack_k,r2 |
130 | mov.l deadbeef_k,r0 | 133 | mov.l deadbeef_k,r0 |