From 83fb2565edb751478c6dbb9afce95e51214517d6 Mon Sep 17 00:00:00 2001
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
Date: Mon, 7 Aug 2006 13:21:33 +0200
Subject: [PATCH] Fix bug in AVR32-optimized memmove

When going backwards, we need to copy (src & 31) bytes to get src
aligned, not 32 - (src & 31) as we would when copying forwards.
---
 libc/string/avr32/memmove.S |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/libc/string/avr32/memmove.S b/libc/string/avr32/memmove.S
index 2574409..0e03413 100644
--- a/libc/string/avr32/memmove.S
+++ b/libc/string/avr32/memmove.S
@@ -84,7 +84,6 @@ __memmove:
 
 .Lunaligned_src:
 	/* Make src cacheline-aligned. r8 = (src & 31) */
-	rsub	r8, r8, 32
 	sub	len, r8
 1:	ld.ub	r0, --src
 	st.b	--dst, r0
-- 
1.4.0

