PATCH: Add missing clobber in xscale's strchr routine
Nick Clifton
nickc@cambridge.redhat.com
Wed Feb 20 06:48:00 GMT 2002
Hi Guys,
The hand crafted strchr() routine for the XScale is missing a
clobber, which can, under some circumstances, cause gcc to generate
bad code. Fixed as obvious by the patch below.
Cheers
Nick
2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
* libc/machine/xscale/strchr.c (strchr): Add 'r1' to the list of
clobbered registers.
Index: newlib/libc/machine/xscale/strchr.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/xscale/strchr.c,v
retrieving revision 1.1
diff -c -3 -p -w -r1.1 strchr.c
*** strchr.c 2000/11/30 01:57:27 1.1
--- strchr.c 2002/02/20 14:35:42
*************** strchr (const char *s, int c)
*** 60,66 ****
1:"
: "=&r" (s)
: "r" (c2), "0" (s)
! : "r2", "r3", "r5", "r6", "cc");
#endif
while (*s && *s != c)
--- 60,66 ----
1:"
: "=&r" (s)
: "r" (c2), "0" (s)
! : "r1", "r2", "r3", "r5", "r6", "cc");
#endif
while (*s && *s != c)
More information about the Newlib
mailing list