From d38a64b4e0b3b1a27afc2d660144032e68f41135 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Tue, 1 Oct 2013 17:12:59 +0000 Subject: config.host (arc*-*-elf*, [...]): New configurations. 2013-10-01 Joern Rennecke Brendan Kehoe Simon Cook * config.host (arc*-*-elf*, arc*-*-linux-uclibc*): New configurations. * config/arc: New directory. * longlong.h [__arc__] (umul_ppmm): Remove. [__arc__] (__umulsidi3): Define. [__arc__ && __ARC_NORM__] (count_leading_zeroes): Define. [__arc__ && __ARC_NORM__] (COUNT_LEADING_ZEROS_0): Likewise. Co-Authored-By: Brendan Kehoe Co-Authored-By: Simon Cook From-SVN: r203073 --- libgcc/longlong.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'libgcc/longlong.h') diff --git a/libgcc/longlong.h b/libgcc/longlong.h index c4b1b97..4fbfbae 100644 --- a/libgcc/longlong.h +++ b/libgcc/longlong.h @@ -188,16 +188,20 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); "rIJ" ((USItype) (bh)), \ "r" ((USItype) (al)), \ "rIJ" ((USItype) (bl))) -/* Call libgcc routine. */ -#define umul_ppmm(w1, w0, u, v) \ -do { \ - DWunion __w; \ - __w.ll = __umulsidi3 (u, v); \ - w1 = __w.s.high; \ - w0 = __w.s.low; \ -} while (0) -#define __umulsidi3 __umulsidi3 -UDItype __umulsidi3 (USItype, USItype); + +#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) +#ifdef __ARC_NORM__ +#define count_leading_zeros(count, x) \ + do \ + { \ + SItype c_; \ + \ + __asm__ ("norm.f\t%0,%1\n\tmov.mi\t%0,-1" : "=r" (c_) : "r" (x) : "cc");\ + (count) = c_ + 1; \ + } \ + while (0) +#define COUNT_LEADING_ZEROS_0 32 +#endif #endif #if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \ -- cgit v1.1