This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Fix missing ARM clobbers in longlong.h
- From: Daniel Jacobowitz <drow at false dot org>
- To: libc-ports at sourceware dot org
- Date: Mon, 10 Oct 2005 17:04:20 -0400
- Subject: Fix missing ARM clobbers in longlong.h
Mark found an ARM-specific bug in longlong.h, which was only latent in GCC
but turned out broke printing of long longs in glibc. The condition codes
weren't marked as clobbered.
I've submitted this to GCC, and will commit it there when the HEAD branch is
open for non-regression fixes again. Roland, could you commit this for
glibc? TIA!
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-10-10 Mark Mitchell <mark@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* stdlib/longlong.h (add_ssaaaa): Clobber condition code register
in ARM version.
(sub_ddmmss): Likewise.
(umul_ppmm): Likewise.
Index: longlong.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/longlong.h,v
retrieving revision 1.39.4.2
diff -u -p -r1.39.4.2 longlong.h
--- longlong.h 16 Aug 2004 17:13:09 -0000 1.39.4.2
+++ longlong.h 10 Oct 2005 20:24:09 -0000
@@ -194,7 +194,7 @@ UDItype __umulsidi3 (USItype, USItype);
: "%r" ((USItype) (ah)), \
"rI" ((USItype) (bh)), \
"%r" ((USItype) (al)), \
- "rI" ((USItype) (bl)))
+ "rI" ((USItype) (bl)) __CLOBBER_CC)
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subs %1, %4, %5\n\tsbc %0, %2, %3" \
: "=r" ((USItype) (sh)), \
@@ -202,7 +202,7 @@ UDItype __umulsidi3 (USItype, USItype);
: "r" ((USItype) (ah)), \
"rI" ((USItype) (bh)), \
"r" ((USItype) (al)), \
- "rI" ((USItype) (bl)))
+ "rI" ((USItype) (bl)) __CLOBBER_CC)
#define umul_ppmm(xh, xl, a, b) \
{register USItype __t0, __t1, __t2; \
__asm__ ("%@ Inlined umul_ppmm\n" \
@@ -222,7 +222,7 @@ UDItype __umulsidi3 (USItype, USItype);
"=r" ((USItype) (xl)), \
"=&r" (__t0), "=&r" (__t1), "=r" (__t2) \
: "r" ((USItype) (a)), \
- "r" ((USItype) (b)));}
+ "r" ((USItype) (b)) __CLOBBER_CC );}
#define UMUL_TIME 20
#define UDIV_TIME 100
#endif /* __arm__ */