summaryrefslogtreecommitdiff
path: root/libgcc/longlong.h
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-01 17:12:59 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-01 17:12:59 +0000
commit8eaaaea3894fc865c9eec6c23657b81a3ed53255 (patch)
tree745cdc23ed871e1941b32ac6573395fd7abe0b8a /libgcc/longlong.h
parent09cb6a17e71bd40d2fbfaf82a1502fc210e33c87 (diff)
downloadgcc-8eaaaea3894fc865c9eec6c23657b81a3ed53255.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203073 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/longlong.h')
-rw-r--r--libgcc/longlong.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/libgcc/longlong.h b/libgcc/longlong.h
index c4b1b97be0a..4fbfbaeca41 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__)) \