Skip to content

Commit c01531e

Browse files
ZERICO2005mateoconlechuga
authored andcommitted
made toolchain memcpy/memmove the default
1 parent 8efd2ca commit c01531e

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

src/libc/memcpy.src

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
.global _memcpy
66
.type _memcpy, @function
77

8-
.ifdef PREFER_OS_LIBC
9-
10-
.set _memcpy, 0x0000A4
11-
12-
.else
8+
; Note: TiOS memcpy works fine, but our implementation is faster
9+
; .set _memcpy, 0x0000A4
1310

1411
_memcpy:
1512
; size > 0 : 25F + 15R + 1 + LDIR
16-
; size >= 65536 : 32F + 16R + 3 + LDIR
13+
; size >= 65536 : 32F + 16R + 3 + LDIR (only when the low 16 bits are zero)
1714
; size == 0 : 26F + 13R + 2
18-
; size >= 65536 + 7F + 1R + 2 (only when the low 16 bits are zero)
1915

2016
ld iy, 0
2117
add iy, sp
@@ -37,5 +33,3 @@ _memcpy:
3733
; size == 0
3834
ex de, hl
3935
ret
40-
41-
.endif

src/libc/memmove.src

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
.global _memmove
66
.type _memmove, @function
77

8-
.ifdef PREFER_OS_LIBC
9-
10-
.set _memmove, 0x0000A8
11-
12-
.else
8+
; Note: TiOS memmove works fine, but our implementation is faster
9+
; .set _memmove, 0x0000A8
1310

1411
.if 1
1512

@@ -113,5 +110,3 @@ _memmove:
113110
ret
114111

115112
.endif
116-
117-
.endif

0 commit comments

Comments
 (0)