From e85d67f7946caba0ab69e76cc05fec24f57bdde8 Mon Sep 17 00:00:00 2001 From: jogo Date: Thu, 21 Feb 2013 11:45:07 +0000 Subject: toolchain: uclibc: fix typo in uclibc common config Based on a patch from Oliver Metz. Closes #10735. Signed-off-by: Jonas Gorski git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35709 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/uClibc/config-0.9.33.2/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/config-0.9.33.2/common b/toolchain/uClibc/config-0.9.33.2/common index 4e4da3e37..488947127 100644 --- a/toolchain/uClibc/config-0.9.33.2/common +++ b/toolchain/uClibc/config-0.9.33.2/common @@ -118,7 +118,7 @@ UCLIBC_HAS_FTW=y UCLIBC_HAS_GETPT=y UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -# UCLIB_HAS_GLIBC_DIGIT_GROUPING is not set +# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set UCLIBC_HAS_GLOB=y UCLIBC_HAS_GNU_ERROR=y UCLIBC_HAS_GNU_GETOPT=y -- cgit v1.2.3 From 844db21b95e8ae95ef4244ff8de2d4cd85450598 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 5 Apr 2013 12:36:00 +0000 Subject: toolchain/uClibc: Disable mips16 for uClibc for now For now, build uclibc without -mips16. There's no mips16 syscall support AFAIK and uclibc uses inline assembly syscalls a lot. In addition, touching errno means touching a TLS model symbol, and that's not supported in gcc 4.6. The __set_errno macro can be put back to calling errno_location(). This allows much of the library to be built in mips16 mode. I don't understand the implications to the thread library of doing this. A list of "build as -mno-mips16" C source files can be placed in the mips architecture-dependent build files. Maintaining the list would be no fun. Signed-off-by: Jay Carlson Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36199 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/uClibc/common.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index f32ed9872..e84c02a16 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -44,6 +44,8 @@ GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \ $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \ $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500)))) +TARGET_CFLAGS := $(filter-out -mips16,$(TARGET_CFLAGS)) + CPU_CFLAGS = \ -funsigned-char -fno-builtin -fno-asm \ --std=gnu99 -ffunction-sections -fdata-sections \ -- cgit v1.2.3 From ce2e12d5304bb7f80194f17496f61f4fc93c359b Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 5 Apr 2013 12:36:31 +0000 Subject: toolchain/uClibc: handle different MIPS64 ABIs Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36207 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/uClibc/common.mk | 3 ++- toolchain/uClibc/config-0.9.33.2/mips64.32 | 18 ++++++++++++++++++ toolchain/uClibc/config-0.9.33.2/mips64.64 | 18 ++++++++++++++++++ toolchain/uClibc/config-0.9.33.2/mips64.n32 | 18 ++++++++++++++++++ toolchain/uClibc/config-0.9.33.2/mips64el.32 | 18 ++++++++++++++++++ toolchain/uClibc/config-0.9.33.2/mips64el.64 | 18 ++++++++++++++++++ toolchain/uClibc/config-0.9.33.2/mips64el.n32 | 18 ++++++++++++++++++ 7 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 toolchain/uClibc/config-0.9.33.2/mips64.32 create mode 100644 toolchain/uClibc/config-0.9.33.2/mips64.64 create mode 100644 toolchain/uClibc/config-0.9.33.2/mips64.n32 create mode 100644 toolchain/uClibc/config-0.9.33.2/mips64el.32 create mode 100644 toolchain/uClibc/config-0.9.33.2/mips64el.64 create mode 100644 toolchain/uClibc/config-0.9.33.2/mips64el.n32 (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index e84c02a16..dec4a1c74 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -42,7 +42,8 @@ GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \ $(if $(CONFIG_UCLIBC_ENABLE_DEBUG),$(if $(wildcard $(CONFIG_DIR)/debug),'+' $(CONFIG_DIR)/debug)) \ $(CONFIG_DIR)/$(ARCH)$(strip \ $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \ - $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500)))) + $(if $(CONFIG_MIPS64_ABI),.$(subst ",,$(CONFIG_MIPS64_ABI)), \ + $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500))))) TARGET_CFLAGS := $(filter-out -mips16,$(TARGET_CFLAGS)) diff --git a/toolchain/uClibc/config-0.9.33.2/mips64.32 b/toolchain/uClibc/config-0.9.33.2/mips64.32 new file mode 100644 index 000000000..03f7fbaee --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/mips64.32 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain/uClibc/config-0.9.33.2/mips64.64 b/toolchain/uClibc/config-0.9.33.2/mips64.64 new file mode 100644 index 000000000..7b66c2f78 --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/mips64.64 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_N32_ABI is not set +CONFIG_MIPS_N64_ABI=y +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain/uClibc/config-0.9.33.2/mips64.n32 b/toolchain/uClibc/config-0.9.33.2/mips64.n32 new file mode 100644 index 000000000..84a5de647 --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/mips64.n32 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +CONFIG_MIPS_N32_ABI=y +# CONFIG_MIPS_N64_ABI is not set +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain/uClibc/config-0.9.33.2/mips64el.32 b/toolchain/uClibc/config-0.9.33.2/mips64el.32 new file mode 100644 index 000000000..73b1f9f1b --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/mips64el.32 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain/uClibc/config-0.9.33.2/mips64el.64 b/toolchain/uClibc/config-0.9.33.2/mips64el.64 new file mode 100644 index 000000000..790f21041 --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/mips64el.64 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_N32_ABI is not set +CONFIG_MIPS_N64_ABI=y +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain/uClibc/config-0.9.33.2/mips64el.n32 b/toolchain/uClibc/config-0.9.33.2/mips64el.n32 new file mode 100644 index 000000000..c2929bf70 --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/mips64el.n32 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +CONFIG_MIPS_N32_ABI=y +# CONFIG_MIPS_N64_ABI is not set +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y -- cgit v1.2.3 From 39247ef4b3642f011e3be82c087b393be70602c9 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 5 Apr 2013 12:36:37 +0000 Subject: toolchain/uClibc: backport a MIPS64 fix from openadk Fixes uClibc dynamic loader name requested by executables when targetting MIPS64 n64 Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36208 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../uClibc/patches-0.9.33.2/980-mips64_fixes.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch b/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch new file mode 100644 index 000000000..3f02bb4e0 --- /dev/null +++ b/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch @@ -0,0 +1,25 @@ +diff -Nur uClibc-0.9.33.2.orig/extra/Configs/Config.in uClibc-0.9.33.2/extra/Configs/Config.in +--- uClibc-0.9.33.2.orig/extra/Configs/Config.in 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2/extra/Configs/Config.in 2012-10-01 12:17:14.000000000 +0200 +@@ -235,6 +235,9 @@ + default "i486" if CONFIG_486 + default "i586" if CONFIG_586 || CONFIG_586MMX + default "i686" if TARGET_ARCH = "i386" ++ default "mips" if CONFIG_MIPS_N32_ABI ++ default "mips" if CONFIG_MIPS_O32_ABI ++ default "mips64" if CONFIG_MIPS_N64_ABI + default "" + + source "extra/Configs/Config.in.arch" +diff -Nur uClibc-0.9.33.2.orig/Rules.mak uClibc-0.9.33.2/Rules.mak +--- uClibc-0.9.33.2.orig/Rules.mak 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2/Rules.mak 2012-10-01 11:28:26.000000000 +0200 +@@ -118,7 +118,7 @@ + LIBC := libc + SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION) + UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) +-ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) ++ifneq ($(findstring $(TARGET_SUBARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) + UCLIBC_LDSO_NAME := ld64-uClibc + ARCH_NATIVE_BIT := 64 + else -- cgit v1.2.3 From ee8ea566196377068a3d7a0eeb5e4787e8a7e050 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 7 Apr 2013 10:11:38 +0000 Subject: uClibc: unbreak ld-uClibc on non-64bit platforms Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36239 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch b/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch index 3f02bb4e0..0895b8b4b 100644 --- a/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch +++ b/toolchain/uClibc/patches-0.9.33.2/980-mips64_fixes.patch @@ -19,7 +19,7 @@ diff -Nur uClibc-0.9.33.2.orig/Rules.mak uClibc-0.9.33.2/Rules.mak SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION) UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) -ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) -+ifneq ($(findstring $(TARGET_SUBARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) ++ifneq ($(strip $(findstring $(TARGET_SUBARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 )),) UCLIBC_LDSO_NAME := ld64-uClibc ARCH_NATIVE_BIT := 64 else -- cgit v1.2.3 From 643e08718bde9507f1f76c55517f41c71ce4db8a Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 18 Apr 2013 12:04:48 +0000 Subject: toolchain: get rid of uclibc version kconfig symbol overloading git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36356 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/uClibc/Config.in | 6 +++--- toolchain/uClibc/Config.version | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in index 74d15ae33..08ea00a31 100644 --- a/toolchain/uClibc/Config.in +++ b/toolchain/uClibc/Config.in @@ -3,16 +3,16 @@ choice prompt "uClibc Version" depends on TOOLCHAINOPTS && USE_UCLIBC - default UCLIBC_VERSION_0_9_33 + default UCLIBC_USE_VERSION_0_9_33 help Select the version of uClibc you wish to use. - config UCLIBC_VERSION_0_9_33 + config UCLIBC_USE_VERSION_0_9_33 + select UCLIBC_VERSION_0_9_33 bool "uClibc 0.9.33.2" endchoice - # Debug version. config UCLIBC_ENABLE_DEBUG diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version index 0d0b4a76a..dd302f256 100644 --- a/toolchain/uClibc/Config.version +++ b/toolchain/uClibc/Config.version @@ -4,10 +4,6 @@ config UCLIBC_VERSION default "0.9.33.2" if UCLIBC_VERSION_0_9_33 default "0.9.33.2" -if !TOOLCHAINOPTS - - config UCLIBC_VERSION_0_9_33 - default y if USE_UCLIBC - bool - -endif +config UCLIBC_VERSION_0_9_33 + default y if !TOOLCHAINOPTS && USE_UCLIBC + bool -- cgit v1.2.3 From ac210405b832f1e2aee936b98281d550d4d48e13 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Thu, 13 Sep 2012 00:34:00 +0300 Subject: Add uClibc patches for lexra/rlx Signed-off-by: Roman Yeryomin --- toolchain/uClibc/common.mk | 1 + toolchain/uClibc/config-0.9.33.2/lexra | 17 +++++ toolchain/uClibc/patches-0.9.33.2/999-lexra.patch | 76 +++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 toolchain/uClibc/config-0.9.33.2/lexra create mode 100644 toolchain/uClibc/patches-0.9.33.2/999-lexra.patch (limited to 'toolchain/uClibc') diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index dec4a1c74..d83f28ef0 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -33,6 +33,7 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ -e 's/sh64/sh/' \ -e 's/sh[234].*/sh/' \ -e 's/mips.*/mips/' \ + -e 's/lexra/mips/' \ -e 's/mipsel.*/mips/' \ -e 's/cris.*/cris/' \ ) diff --git a/toolchain/uClibc/config-0.9.33.2/lexra b/toolchain/uClibc/config-0.9.33.2/lexra new file mode 100644 index 000000000..e369c2628 --- /dev/null +++ b/toolchain/uClibc/config-0.9.33.2/lexra @@ -0,0 +1,17 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +CONFIG_MIPS_ISA_1=y +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +# CONFIG_MIPS_ISA_MIPS64 is not set +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +# UCLIBC_HAS_FPU is not set diff --git a/toolchain/uClibc/patches-0.9.33.2/999-lexra.patch b/toolchain/uClibc/patches-0.9.33.2/999-lexra.patch new file mode 100644 index 000000000..aff55abe6 --- /dev/null +++ b/toolchain/uClibc/patches-0.9.33.2/999-lexra.patch @@ -0,0 +1,76 @@ +Index: uClibc/libc/string/mips/memcpy.S +=================================================================== +--- uClibc.orig/libc/string/mips/memcpy.S ++++ uClibc/libc/string/mips/memcpy.S +@@ -167,10 +167,19 @@ ENTRY (memcpy) + andi t1, 0x3 # a0/a1 are aligned, but are we + beq t1, zero, L(chk8w) # starting in the middle of a word? + subu a2, t1 ++#if 0 + LWHI t0, 0(a1) # Yes we are... take care of that + addu a1, t1 + SWHI t0, 0(a0) + addu a0, t1 ++#else ++4: lbu t2, 0(a1) ++ subu t1, 1 ++ sb t2, 0(a0) ++ addiu a1, 1 ++ bnez t1, 4b ++ addiu a0, 1 ++#endif + + L(chk8w): + andi t0, a2, 0x1f # 32 or more bytes left? +@@ -225,6 +234,7 @@ L(lst8e): + jr ra # Bye, bye + nop + ++#if 0 + L(shift): + subu a3, zero, a0 # Src and Dest unaligned + andi a3, 0x3 # (unoptimized case...) +@@ -248,6 +258,23 @@ L(shfth): + sw t1, -4(a0) + b L(last8) # Handle anything which may be left + move a2, t0 ++#else ++L(shift): ++ beqz a2, L(done) ++ nop ++ ++L(copy_bytes): ++ lbu t0, 0(a1) ++ subu a2, a2, 1 ++ sb t0, 0(a0) ++ addiu a1, a1, 1 ++ bnez a2, L(copy_bytes) ++ addiu a0, a0, 1 ++ ++L(done): ++ jr ra ++ nop ++#endif + + .set reorder + END (memcpy) +Index: uClibc/libc/string/mips/memset.S +=================================================================== +--- uClibc.orig/libc/string/mips/memset.S ++++ uClibc/libc/string/mips/memset.S +@@ -118,8 +118,15 @@ L(ueven): + andi t0, 0x3 + beq t0, zero, L(chkw) + subu a2, t0 ++#if 0 + SWHI a1, 0(a0) # Yes, handle first unaligned part + addu a0, t0 # Now both a0 and a2 are updated ++#else ++ addu t1, a0, t0 ++4: addiu a0, 1 ++ bne t1, a0, 4b ++ sb a1, -1(a0) ++#endif + + L(chkw): + andi t0, a2, 0x7 # Enough left for one loop iteration? -- cgit v1.2.3