Turn the assembly optimized memcpy (simple rep movsd) back on for x86. Had to hack around the make system a bit, and the result is pretty nasty, specifically due to the amount of places in the system where various targets poke their fingers into the libroot directory.
The solution is less than optimal, but should work for now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20722 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c07371587f
commit
831486a2d3
@ -22,6 +22,7 @@ local librootFunctions =
|
||||
strchr.o
|
||||
strrchr.o
|
||||
strtol.o
|
||||
arch_string.o
|
||||
;
|
||||
|
||||
local platformObjects = ;
|
||||
|
@ -101,6 +101,7 @@ KernelLd kernel.so :
|
||||
kernel_os_main.o
|
||||
kernel_os_arch_$(TARGET_ARCH).o
|
||||
kernel_posix.o
|
||||
kernel_posix_arch_$(TARGET_ARCH).o
|
||||
|
||||
$(HAIKU_STATIC_LIBSUPC++)
|
||||
|
||||
|
@ -104,7 +104,7 @@ KernelMergeObject kernel_posix.o :
|
||||
strspn.c
|
||||
strstr.c
|
||||
strtok.c
|
||||
|
||||
|
||||
: $(TARGET_KERNEL_PIC_CCFLAGS)
|
||||
;
|
||||
|
||||
@ -120,12 +120,14 @@ KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o :
|
||||
;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(posixSources) arch $(TARGET_ARCH) ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(posixSources) string arch $(TARGET_ARCH) ] ;
|
||||
|
||||
KernelMergeObject kernel_posix_arch_$(TARGET_ARCH).o :
|
||||
setjmp.S
|
||||
siglongjmp.S
|
||||
sigsetjmp.S
|
||||
kernel_setjmp_save_sigs.c
|
||||
arch_string.S
|
||||
|
||||
: $(TARGET_KERNEL_PIC_CCFLAGS)
|
||||
;
|
||||
|
@ -32,6 +32,7 @@ local librootObjects =
|
||||
posix_gnu_wctype.o
|
||||
posix_stdlib.o
|
||||
posix_string.o
|
||||
posix_string_arch_$(TARGET_ARCH).o
|
||||
posix_sys.o
|
||||
posix_time.o
|
||||
posix_unistd.o
|
||||
|
@ -36,3 +36,10 @@ MergeObject posix_string.o :
|
||||
strtok.c
|
||||
strxfrm.c
|
||||
;
|
||||
|
||||
SubDir HAIKU_TOP src system libroot posix string arch $(TARGET_ARCH) ;
|
||||
|
||||
MergeObject posix_string_arch_$(TARGET_ARCH).o :
|
||||
arch_string.S
|
||||
;
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
LIBC_ARCH_DIR = $(LIBC_DIR)/arch/$(ARCH)
|
||||
LIBC_ARCH_OBJ_DIR = $(LIBC_ARCH_DIR)/$(OBJ_DIR)
|
||||
|
||||
LIBC_OBJS +=
|
||||
|
||||
# build prototypes
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.o: $(LIBC_ARCH_DIR)/%.c
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
$(CC) -c $< $(GLOBAL_CFLAGS) -Iinclude -o $@
|
||||
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.d: $(LIBC_ARCH_DIR)/%.c
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
@echo "making deps for $<..."
|
||||
@($(ECHO) -n $(dir $@); $(CC) $(GLOBAL_CFLAGS) -Iinclude -M -MG $<) > $@
|
||||
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.d: $(LIBC_ARCH_DIR)/%.S
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
@echo "making deps for $<..."
|
||||
@($(ECHO) -n $(dir $@);$(CC) $(GLOBAL_CFLAGS) -Iinclude -M -MG $<) > $@
|
||||
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.o: $(LIBC_ARCH_DIR)/%.S
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
$(CC) -c $< $(GLOBAL_CFLAGS) -Iinclude -o $@
|
||||
|
@ -1,24 +0,0 @@
|
||||
LIBC_ARCH_DIR = $(LIBC_DIR)/arch/$(ARCH)
|
||||
LIBC_ARCH_OBJ_DIR = $(LIBC_ARCH_DIR)/$(OBJ_DIR)
|
||||
|
||||
LIBC_OBJS +=
|
||||
|
||||
# build prototypes
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.o: $(LIBC_ARCH_DIR)/%.c
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
$(CC) -c $< $(GLOBAL_CFLAGS) -Iinclude -o $@
|
||||
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.d: $(LIBC_ARCH_DIR)/%.c
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
@echo "making deps for $<..."
|
||||
@($(ECHO) -n $(dir $@); $(CC) $(GLOBAL_CFLAGS) -Iinclude -M -MG $<) > $@
|
||||
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.d: $(LIBC_ARCH_DIR)/%.S
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
@echo "making deps for $<..."
|
||||
@($(ECHO) -n $(dir $@);$(CC) $(GLOBAL_CFLAGS) -Iinclude -M -MG $<) > $@
|
||||
|
||||
$(LIBC_ARCH_OBJ_DIR)/%.o: $(LIBC_ARCH_DIR)/%.S
|
||||
@if [ ! -d $(LIBC_ARCH_OBJ_DIR) ]; then mkdir -p $(LIBC_ARCH_OBJ_DIR); fi
|
||||
$(CC) -c $< $(GLOBAL_CFLAGS) -Iinclude -o $@
|
||||
|
@ -2,7 +2,6 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <libc/arch/string.h>
|
||||
|
||||
.globl memcpy
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#if !_ASM_MEMCPY
|
||||
/* do not build for for arches that have overridden this with an assembly version */
|
||||
#if !defined(ARCH_x86)
|
||||
|
||||
typedef int word;
|
||||
|
||||
@ -46,3 +46,4 @@ void *memcpy(void *dest, const void *src, size_t count)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -46,6 +46,7 @@ StaticLibrary libruntime_loader.a :
|
||||
<src!system!libroot!posix!string>strrchr.o
|
||||
<src!system!libroot!posix!string>strspn.o
|
||||
<src!system!libroot!posix!string>strstr.o
|
||||
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)>arch_string.o
|
||||
|
||||
[ FGristFiles kernel_vsprintf.o ]
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user