libgcc2.c (__divdi3, __moddi3): Use unary minus operator instead of __negdi2 directly.
authorHartmut Schirmer <hartmut.schirmer@arcor.de>
Mon, 22 Jul 2002 00:15:49 +0000 (00:15 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 22 Jul 2002 00:15:49 +0000 (17:15 -0700)
        * libgcc2.c (__divdi3, __moddi3): Use unary minus operator
        instead of __negdi2 directly.

From-SVN: r55632

gcc/ChangeLog
gcc/libgcc2.c

index 90096f63ddf0aba303ef5267344fb9b82d652836..c9d4cbb1d885a92fff3d3696eb7971e88a942674 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-21  Hartmut Schirmer  <hartmut.schirmer@arcor.de>
+
+       * libgcc2.c (__divdi3, __moddi3): Use unary minus operator
+       instead of __negdi2 directly.
+
 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
 
        * gengenrtl.c (gencode): Don't define obstack_alloc_rtx.
index 4b1e187bcf4978a4eeb43d531f780a25af383c78..f91aadbe7281ddedc78f49fdbfad37c2a7f936f1 100644 (file)
@@ -43,10 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "libgcc2.h"
 \f
-#if defined (L_negdi2) || defined (L_divdi3) || defined (L_moddi3)
-#if defined (L_divdi3) || defined (L_moddi3)
-static inline
-#endif
+#if defined (L_negdi2)
 DWtype
 __negdi2 (DWtype u)
 {
@@ -732,14 +729,14 @@ __divdi3 (DWtype u, DWtype v)
 
   if (uu.s.high < 0)
     c = ~c,
-    uu.ll = __negdi2 (uu.ll);
+    uu.ll = -uu.ll;
   if (vv.s.high < 0)
     c = ~c,
-    vv.ll = __negdi2 (vv.ll);
+    vv.ll = -vv.ll;
 
   w = __udivmoddi4 (uu.ll, vv.ll, (UDWtype *) 0);
   if (c)
-    w = __negdi2 (w);
+    w = -w;
 
   return w;
 }
@@ -758,13 +755,13 @@ __moddi3 (DWtype u, DWtype v)
 
   if (uu.s.high < 0)
     c = ~c,
-    uu.ll = __negdi2 (uu.ll);
+    uu.ll = -uu.ll;
   if (vv.s.high < 0)
-    vv.ll = __negdi2 (vv.ll);
+    vv.ll = -vv.ll;
 
   (void) __udivmoddi4 (uu.ll, vv.ll, &w);
   if (c)
-    w = __negdi2 (w);
+    w = -w;
 
   return w;
 }