diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-09-21 13:54:38 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-09-26 12:14:20 +0300 |
commit | db60d828137c4f3682ca4ca2a54fe3d96d3db5f9 (patch) | |
tree | 16fb7ac48e4f55cca2d2ffbc59253ba6c470034d /mpi/longlong.h | |
parent | 1c6660debdbf1e4c3e80074c846a3e3097f214bb (diff) | |
download | libgcrypt-db60d828137c4f3682ca4ca2a54fe3d96d3db5f9.tar.gz |
Make libgcrypt build with Clang on i386
* cipher/longlong.h [__i386__] (add_ssaaaa, sub_ddmmss)
(umul_ppmm, udiv_qrnnd): Do not cast asm output to USItype.
--
Clang defines __GNUC__ even when it's not GCC compatible. As result Clang
enables GCC-only assembly code in mpi/longlong.h and fails to build.
However, since changes to make libgcrypt build with Clang are smallish, and
changes do not cause problems with GCC, patch just does them.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'mpi/longlong.h')
-rw-r--r-- | mpi/longlong.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mpi/longlong.h b/mpi/longlong.h index 773d1c78..4e315dfd 100644 --- a/mpi/longlong.h +++ b/mpi/longlong.h @@ -468,8 +468,8 @@ extern USItype __udiv_qrnnd (); #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addl %5,%1\n" \ "adcl %3,%0" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" ((sh)), \ + "=&r" ((sl)) \ : "%0" ((USItype)(ah)), \ "g" ((USItype)(bh)), \ "%1" ((USItype)(al)), \ @@ -478,8 +478,8 @@ extern USItype __udiv_qrnnd (); #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ ("subl %5,%1\n" \ "sbbl %3,%0" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" ((sh)), \ + "=&r" ((sl)) \ : "0" ((USItype)(ah)), \ "g" ((USItype)(bh)), \ "1" ((USItype)(al)), \ @@ -487,15 +487,15 @@ extern USItype __udiv_qrnnd (); __CLOBBER_CC) #define umul_ppmm(w1, w0, u, v) \ __asm__ ("mull %3" \ - : "=a" ((USItype)(w0)), \ - "=d" ((USItype)(w1)) \ + : "=a" ((w0)), \ + "=d" ((w1)) \ : "%0" ((USItype)(u)), \ "rm" ((USItype)(v)) \ __CLOBBER_CC) #define udiv_qrnnd(q, r, n1, n0, d) \ __asm__ ("divl %4" \ - : "=a" ((USItype)(q)), \ - "=d" ((USItype)(r)) \ + : "=a" ((q)), \ + "=d" ((r)) \ : "0" ((USItype)(n0)), \ "1" ((USItype)(n1)), \ "rm" ((USItype)(d)) \ |