From c4192ad7027a3e991134b5d6d5f2d7451d058f48 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Mon, 27 Mar 2017 12:56:35 +0200 Subject: [PATCH] [ARC] Fix divdf3 emulation for arcem. libgcc/ 2017-02-27 Claudiu Zissulescu * config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__. From-SVN: r246498 --- libgcc/ChangeLog | 4 ++++ libgcc/config/arc/ieee-754/divdf3.S | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 4bae69f3961..ada1365e4e6 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2017-03-27 Claudiu Zissulescu + + * config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__. + 2017-03-10 John Marino * config/aarch64/freebsd-unwind.h: New file. diff --git a/libgcc/config/arc/ieee-754/divdf3.S b/libgcc/config/arc/ieee-754/divdf3.S index 4d6aae282e0..b8085a625cf 100644 --- a/libgcc/config/arc/ieee-754/divdf3.S +++ b/libgcc/config/arc/ieee-754/divdf3.S @@ -189,13 +189,13 @@ __divdf3: asl r8,DBL1H,12 lsr r12,DBL1L,20 lsr r4,r8,26 -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) add3 r10,pcl,60 ; (.Ldivtab-.) >> 3 #else add3 r10,pcl,59 ; (.Ldivtab-.) >> 3 #endif ld.as r4,[r10,r4] -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) ld.as r9,[pcl,182]; [pcl,(-((.-.L7ff00000) >> 2))] ; 0x7ff00000 #else ld.as r9,[pcl,180]; [pcl,(-((.-.L7ff00000) >> 2))] ; 0x7ff00000 @@ -299,14 +299,14 @@ __divdf3: rsub r7,r6,5 asr r10,r12,28 bmsk r4,r12,27 -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) min r7, r7, 31 asr DBL0L, r4, r7 #else asrs DBL0L,r4,r7 #endif add DBL1H,r11,r10 -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) abs.f r10, r4 sub.mi r10, r10, 1 #endif -- 2.30.2