summaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/patches-0.9.33.2/999-lexra.patch
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2012-09-13 00:34:00 +0300
committerRoman Yeryomin <roman@advem.lv>2013-05-26 00:44:45 +0300
commitac210405b832f1e2aee936b98281d550d4d48e13 (patch)
tree0e3357d5dc9852a0fec4095b7f1223f494ff804b /toolchain/uClibc/patches-0.9.33.2/999-lexra.patch
parent5c9bbf6a206d25a1fd3c5af9e5fb6a0c1377a2c4 (diff)
Add uClibc patches for lexra/rlx
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'toolchain/uClibc/patches-0.9.33.2/999-lexra.patch')
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/999-lexra.patch76
1 files changed, 76 insertions, 0 deletions
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?