From ea697ec9ea1cd82f8eb21c2a70bccc9e760bcc7a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 30 Jun 2009 21:16:56 +0000 Subject: Fix Thumb-2 memcpy. When an IT block was changed from having two instructions to having one, the IT instruction at the start of the block was not updated, causing memcpy to fail to assemble for Thumb-2; this patch makes the obvious fix. Signed-off-by: Joseph Myers --- libc/string/arm/_memcpy.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/string/arm/_memcpy.S') diff --git a/libc/string/arm/_memcpy.S b/libc/string/arm/_memcpy.S index 103580a0c..1dc0887a4 100644 --- a/libc/string/arm/_memcpy.S +++ b/libc/string/arm/_memcpy.S @@ -108,7 +108,7 @@ _memcpy: cmp r1, r0 bcc .Lmemcpy_backwards - IT(tt, eq) /* Quick abort for src=dst */ + IT(t, eq) /* Quick abort for src=dst */ #if defined(__USE_BX__) bxeq lr #else -- cgit v1.2.3 From 801626b26745a1bd24cbf56c3d8720204a1db95d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 1 Jul 2009 14:37:15 +0000 Subject: Correct ARM memcpy comments. The comments on register usage in ARM memcpy had dest and src the wrong way round; this patch (originally from Mark Shinwell) corrects this and adds a note on the return value. Signed-off-by: Joseph Myers --- libc/string/arm/_memcpy.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/string/arm/_memcpy.S') diff --git a/libc/string/arm/_memcpy.S b/libc/string/arm/_memcpy.S index 1dc0887a4..b26080d02 100644 --- a/libc/string/arm/_memcpy.S +++ b/libc/string/arm/_memcpy.S @@ -67,8 +67,9 @@ * a time where possible. * * Note: r12 (aka ip) can be trashed during the function along with - * r0-r3 although r0-r2 have defined uses i.e. src, dest, len through out. + * r0-r3 although r0-r2 have defined uses i.e. dest, src, len throughout. * Additional registers are preserved prior to use i.e. r4, r5 & lr + * The return value in r0 must be the destination address. * * Apologies for the state of the comments ;-) */ -- cgit v1.2.3