diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2013-10-01 17:12:59 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2013-10-01 18:12:59 +0100 |
commit | d38a64b4e0b3b1a27afc2d660144032e68f41135 (patch) | |
tree | 745cdc23ed871e1941b32ac6573395fd7abe0b8a /libgcc/longlong.h | |
parent | 526b7aee8fce16aa10a57e35d143b2e4ecb6b72e (diff) | |
download | gcc-d38a64b4e0b3b1a27afc2d660144032e68f41135.zip gcc-d38a64b4e0b3b1a27afc2d660144032e68f41135.tar.gz gcc-d38a64b4e0b3b1a27afc2d660144032e68f41135.tar.bz2 |
config.host (arc*-*-elf*, [...]): New configurations.
2013-10-01 Joern Rennecke <joern.rennecke@embecosm.com>
Brendan Kehoe <brendan@zen.org>
Simon Cook <simon.cook@embecosm.com>
* 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 <brendan@zen.org>
Co-Authored-By: Simon Cook <simon.cook@embecosm.com>
From-SVN: r203073
Diffstat (limited to 'libgcc/longlong.h')
-rw-r--r-- | libgcc/longlong.h | 24 |
1 files changed, 14 insertions, 10 deletions
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__)) \ |