From 28be8b2ba9617bf9d1f2b85ea0f497f737ed7726 Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Sat, 21 Aug 2010 10:31:26 +0000 Subject: [PATCH] Revert part of r211505. Some of the removed casts are actually safe so put them back in again. Also, clang only complained about the lvalue cast. Submitted by: Dimitry Andric Pointed out: bde --- contrib/gcc/longlong.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/contrib/gcc/longlong.h b/contrib/gcc/longlong.h index 8805d91b2c41..a789d1673f7b 100644 --- a/contrib/gcc/longlong.h +++ b/contrib/gcc/longlong.h @@ -314,38 +314,38 @@ UDItype __umulsidi3 (USItype, USItype); #if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addl %5,%1\n\tadcl %3,%0" \ - : "=r" (sh), \ - "=&r" (sl) \ - : "%0" (ah), \ - "g" (bh), \ - "%1" (al), \ - "g" (bl)) + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%0" ((USItype) (ah)), \ + "g" ((USItype) (bh)), \ + "%1" ((USItype) (al)), \ + "g" ((USItype) (bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ ("subl %5,%1\n\tsbbl %3,%0" \ : "=r" (sh), \ "=&r" (sl) \ - : "0" (ah), \ - "g" (bh), \ - "1" (al), \ - "g" (bl)) + : "0" ((USItype) (ah)), \ + "g" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "g" ((USItype) (bl))) #define umul_ppmm(w1, w0, u, v) \ __asm__ ("mull %3" \ : "=a" (w0), \ "=d" (w1) \ - : "%0" (u), \ - "rm" (v)) + : "%0" ((USItype) (u)), \ + "rm" ((USItype) (v))) #define udiv_qrnnd(q, r, n1, n0, dv) \ __asm__ ("divl %4" \ : "=a" (q), \ "=d" (r) \ - : "0" (n0), \ - "1" (n1), \ - "rm" (dv)) + : "0" ((USItype) (n0)), \ + "1" ((USItype) (n1)), \ + "rm" ((USItype) (dv))) #define count_leading_zeros(count, x) \ do { \ USItype __cbtmp; \ __asm__ ("bsrl %1,%0" \ - : "=r" (__cbtmp) : "rm" (x)); \ + : "=r" (__cbtmp) : "rm" ((USItype) (x))); \ (count) = __cbtmp ^ 31; \ } while (0) #define count_trailing_zeros(count, x) \