public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] [arm] Fix strcpy for unified syntax on ARMv4t thumb.
@ 2017-07-21 10:23 Richard Earnshaw
  0 siblings, 0 replies; only message in thread
From: Richard Earnshaw @ 2017-07-21 10:23 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d6cac3e1da1a117f8a93b91371f3f0a5c071219f

commit d6cac3e1da1a117f8a93b91371f3f0a5c071219f
Author: Richard Earnshaw <Richard.Earnshaw@arm.com>
Date:   Fri Jul 21 11:22:25 2017 +0100

    [arm] Fix strcpy for unified syntax on ARMv4t thumb.
    
    ARMv4t does not support mov between two low registers.  Now we use
    unified syntax mov instructions need converting to movs.

Diff:
---
 newlib/libc/machine/arm/strcpy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/machine/arm/strcpy.c b/newlib/libc/machine/arm/strcpy.c
index 1544511..111528e 100644
--- a/newlib/libc/machine/arm/strcpy.c
+++ b/newlib/libc/machine/arm/strcpy.c
@@ -160,7 +160,7 @@ strcpy (char* dst, const char* src)
        "bne	1b\n\t"
        "bx	lr\n\t"
 #else
-       "mov	r3, r0\n\t"
+       "movs	r3, r0\n\t"
   "1:\n\t"
        "ldrb	r2, [r1]\n\t"
        "adds	r1, #1\n\t"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-21 10:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-21 10:23 [newlib-cygwin] [arm] Fix strcpy for unified syntax on ARMv4t thumb Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).