summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-10-26 05:40:24 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-10-26 05:40:24 +0000
commitba809183a82a0c477c67be8cfc93b231948a82de (patch)
treefaaf9e4b637f81e6da2df5e22bef79b9eb89581f /firmware
parent51a54cff20284eca07c45c946b8480f8bb911f1c (diff)
downloadrockbox-ba809183a82a0c477c67be8cfc93b231948a82de.tar.gz
rockbox-ba809183a82a0c477c67be8cfc93b231948a82de.zip
Ported to Coldfire
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5347 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/memcpy.S25
-rw-r--r--firmware/common/memset.S24
-rw-r--r--firmware/export/lcd.h2
3 files changed, 50 insertions, 1 deletions
diff --git a/firmware/common/memcpy.S b/firmware/common/memcpy.S
index 2fb9f6a5a7..e129b99442 100644
--- a/firmware/common/memcpy.S
+++ b/firmware/common/memcpy.S
@@ -16,9 +16,11 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "config.h"
19 20
20 .section .icode,"ax",@progbits 21 .section .icode,"ax",@progbits
21 22
23#if CONFIG_CPU == SH7034
22 .align 2 24 .align 2
23 .global _memcpy 25 .global _memcpy
24 .type _memcpy,@function 26 .type _memcpy,@function
@@ -168,4 +170,27 @@ _memcpy:
168 mov r7,r0 /* return dest start address */ 170 mov r7,r0 /* return dest start address */
169.end: 171.end:
170 .size _memcpy,.end-_memcpy 172 .size _memcpy,.end-_memcpy
173#elif CONFIG_CPU == MCF5249
174 .align 2
175 .global memcpy
176 .type memcpy,@function
171 177
178/* Copies <length> bytes of data in memory from <source> to <dest>
179 * This version is not optimized at all
180 */
181memcpy:
182 move.l (4,%sp),%a1 /* Destination */
183 move.l (8,%sp),%a0 /* Source */
184 move.l (12,%sp),%d1 /* Length */
185
186 cmp.l #0,%d1
187 bra.b .byteloopend
188
189.byteloop:
190 move.b (%a0)+,(%a1)+
191 subq.l #1,%d1
192.byteloopend:
193 bne.b .byteloop
194
195 rts
196#endif
diff --git a/firmware/common/memset.S b/firmware/common/memset.S
index 038915c475..bce8936089 100644
--- a/firmware/common/memset.S
+++ b/firmware/common/memset.S
@@ -16,10 +16,12 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "config.h"
19 20
20 .section .icode,"ax",@progbits 21 .section .icode,"ax",@progbits
21 22
22 .align 2 23 .align 2
24#if CONFIG_CPU == SH7034
23 .global _memset 25 .global _memset
24 .type _memset,@function 26 .type _memset,@function
25 27
@@ -105,4 +107,26 @@ _memset:
105 107
106.end: 108.end:
107 .size _memset,.end-_memset 109 .size _memset,.end-_memset
110#elif CONFIG_CPU == MCF5249
111 .global memset
112 .type memset,@function
108 113
114/* Fills a memory region with specified byte value
115 * This version is not optimized at all
116 */
117memset:
118 move.l (4,%sp),%a0 /* Start address */
119 move.l (8,%sp),%d0 /* Value */
120 move.l (12,%sp),%d1 /* Length */
121 lea.l (%d1,%a0),%a1 /* a1 = a0+d1 */
122
123 bra.b .byteloopend
124
125.byteloop:
126 move.b %d0,(%a0)+
127.byteloopend:
128 cmp.l %a0,%a1
129 bne.b .byteloop
130
131 rts
132#endif
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 306e525b99..b78474719a 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -21,7 +21,7 @@
21#define __LCD_H__ 21#define __LCD_H__
22 22
23#include <stdbool.h> 23#include <stdbool.h>
24#include "sh7034.h" 24#include "cpu.h"
25#include "config.h" 25#include "config.h"
26 26
27#define STYLE_DEFAULT 0 27#define STYLE_DEFAULT 0