scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit cbf1264ca6d508d413891030a5aa99261693dc07
parent a8c0229b8ae756c5fee352cd4490c788d87b30d5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 21 Jan 2020 22:28:08 +0100

libc: Move mem* functions to arch directory

Moving these functions to the architecture allows to introduce
optmized versions of these function, because at this moment
they are usable as they are implemented using commmon C funcions.

Diffstat:
Msrc/libc/arch/amd64/Makefile | 17+++++++++++++++--
Asrc/libc/arch/amd64/memchr.c | 2++
Asrc/libc/arch/amd64/memcmp.c | 2++
Asrc/libc/arch/amd64/memcpy.c | 2++
Asrc/libc/arch/amd64/memmove.c | 2++
Asrc/libc/arch/amd64/memset.c | 2++
Msrc/libc/arch/arm32/Makefile | 10+++++++++-
Asrc/libc/arch/arm32/memchr.c | 2++
Asrc/libc/arch/arm32/memcmp.c | 2++
Asrc/libc/arch/arm32/memcpy.c | 2++
Asrc/libc/arch/arm32/memmove.c | 2++
Asrc/libc/arch/arm32/memset.c | 2++
Msrc/libc/arch/arm64/Makefile | 10+++++++++-
Asrc/libc/arch/arm64/memchr.c | 2++
Asrc/libc/arch/arm64/memcmp.c | 2++
Asrc/libc/arch/arm64/memcpy.c | 2++
Asrc/libc/arch/arm64/memmove.c | 2++
Asrc/libc/arch/arm64/memset.c | 2++
Msrc/libc/arch/i386/Makefile | 10+++++++++-
Asrc/libc/arch/i386/memchr.c | 2++
Asrc/libc/arch/i386/memcmp.c | 2++
Asrc/libc/arch/i386/memcpy.c | 2++
Asrc/libc/arch/i386/memmove.c | 2++
Asrc/libc/arch/i386/memset.c | 2++
Msrc/libc/string/Makefile | 5-----
25 files changed, 82 insertions(+), 10 deletions(-)

diff --git a/src/libc/arch/amd64/Makefile b/src/libc/arch/amd64/Makefile @@ -3,8 +3,21 @@ PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk include ../../rules.mk -OBJS = longjmp.$O setjmp.$O -DIRS = netbsd openbsd dragonfly linux darwin +OBJS =\ + longjmp.$O\ + setjmp.$O\ + memchr.$O\ + memcmp.$O\ + memcpy.$O\ + memmove.$O\ + memset.$O\ + +DIRS =\ + netbsd\ + openbsd\ + dragonfly\ + linux\ + darwin\ all: $(LIBC) $(SYS) diff --git a/src/libc/arch/amd64/memchr.c b/src/libc/arch/amd64/memchr.c @@ -0,0 +1 @@ +#include "../../string/memchr.c"+ \ No newline at end of file diff --git a/src/libc/arch/amd64/memcmp.c b/src/libc/arch/amd64/memcmp.c @@ -0,0 +1 @@ +#include "../../string/memcmp.c"+ \ No newline at end of file diff --git a/src/libc/arch/amd64/memcpy.c b/src/libc/arch/amd64/memcpy.c @@ -0,0 +1 @@ +#include "../../string/memcpy.c"+ \ No newline at end of file diff --git a/src/libc/arch/amd64/memmove.c b/src/libc/arch/amd64/memmove.c @@ -0,0 +1 @@ +#include "../../string/memmove.c"+ \ No newline at end of file diff --git a/src/libc/arch/amd64/memset.c b/src/libc/arch/amd64/memset.c @@ -0,0 +1 @@ +#include "../../string/memset.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm32/Makefile b/src/libc/arch/arm32/Makefile @@ -3,7 +3,15 @@ PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk include ../../rules.mk -OBJS = longjmp.$O setjmp.$O +OBJS =\ + longjmp.$O\ + setjmp.$O\ + memchr.$O\ + memcmp.$O\ + memcpy.$O\ + memmove.$O\ + memset.$O\ + DIRS = linux all: $(LIBC) $(SYS) diff --git a/src/libc/arch/arm32/memchr.c b/src/libc/arch/arm32/memchr.c @@ -0,0 +1 @@ +#include "../../string/memchr.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm32/memcmp.c b/src/libc/arch/arm32/memcmp.c @@ -0,0 +1 @@ +#include "../../string/memcmp.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm32/memcpy.c b/src/libc/arch/arm32/memcpy.c @@ -0,0 +1 @@ +#include "../../string/memcpy.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm32/memmove.c b/src/libc/arch/arm32/memmove.c @@ -0,0 +1 @@ +#include "../../string/memmove.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm32/memset.c b/src/libc/arch/arm32/memset.c @@ -0,0 +1 @@ +#include "../../string/memset.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm64/Makefile b/src/libc/arch/arm64/Makefile @@ -3,7 +3,15 @@ PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk include ../../rules.mk -OBJS = longjmp.$O setjmp.$O +OBJS =\ + longjmp.$O\ + setjmp.$O\ + memchr.$O\ + memcmp.$O\ + memcpy.$O\ + memmove.$O\ + memset.$O\ + DIRS = linux all: $(LIBC) $(SYS) diff --git a/src/libc/arch/arm64/memchr.c b/src/libc/arch/arm64/memchr.c @@ -0,0 +1 @@ +#include "../../string/memchr.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm64/memcmp.c b/src/libc/arch/arm64/memcmp.c @@ -0,0 +1 @@ +#include "../../string/memcmp.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm64/memcpy.c b/src/libc/arch/arm64/memcpy.c @@ -0,0 +1 @@ +#include "../../string/memcpy.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm64/memmove.c b/src/libc/arch/arm64/memmove.c @@ -0,0 +1 @@ +#include "../../string/memmove.c"+ \ No newline at end of file diff --git a/src/libc/arch/arm64/memset.c b/src/libc/arch/arm64/memset.c @@ -0,0 +1 @@ +#include "../../string/memset.c"+ \ No newline at end of file diff --git a/src/libc/arch/i386/Makefile b/src/libc/arch/i386/Makefile @@ -3,7 +3,15 @@ PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk include ../../rules.mk -OBJS = longjmp.$O setjmp.$O +OBJS =\ + longjmp.$O\ + setjmp.$O\ + memchr.$O\ + memcmp.$O\ + memcpy.$O\ + memmove.$O\ + memset.$O\ + DIRS = linux all: $(LIBC) $(SYS) diff --git a/src/libc/arch/i386/memchr.c b/src/libc/arch/i386/memchr.c @@ -0,0 +1 @@ +#include "../../string/memchr.c"+ \ No newline at end of file diff --git a/src/libc/arch/i386/memcmp.c b/src/libc/arch/i386/memcmp.c @@ -0,0 +1 @@ +#include "../../string/memcmp.c"+ \ No newline at end of file diff --git a/src/libc/arch/i386/memcpy.c b/src/libc/arch/i386/memcpy.c @@ -0,0 +1 @@ +#include "../../../string/memcpy.c"+ \ No newline at end of file diff --git a/src/libc/arch/i386/memmove.c b/src/libc/arch/i386/memmove.c @@ -0,0 +1 @@ +#include "../../string/memmove.c"+ \ No newline at end of file diff --git a/src/libc/arch/i386/memset.c b/src/libc/arch/i386/memset.c @@ -0,0 +1 @@ +#include "../../string/memset.c"+ \ No newline at end of file diff --git a/src/libc/string/Makefile b/src/libc/string/Makefile @@ -4,11 +4,6 @@ include $(PROJECTDIR)/scripts/rules.mk include ../rules.mk OBJS = \ - memchr.$O\ - memcmp.$O\ - memcpy.$O\ - memmove.$O\ - memset.$O\ strcat.$O\ strchr.$O\ strcmp.$O\