Commit b68daef4 by Hartmut Schirmer Committed by Richard Henderson

libgcc2.c (__divdi3, __moddi3): Use unary minus operator instead of __negdi2 directly.

        * libgcc2.c (__divdi3, __moddi3): Use unary minus operator
        instead of __negdi2 directly.

From-SVN: r55632
parent 060a58c5
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> 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
* gengenrtl.c (gencode): Don't define obstack_alloc_rtx. * gengenrtl.c (gencode): Don't define obstack_alloc_rtx.
......
...@@ -43,10 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -43,10 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "libgcc2.h" #include "libgcc2.h"
#if defined (L_negdi2) || defined (L_divdi3) || defined (L_moddi3) #if defined (L_negdi2)
#if defined (L_divdi3) || defined (L_moddi3)
static inline
#endif
DWtype DWtype
__negdi2 (DWtype u) __negdi2 (DWtype u)
{ {
...@@ -732,14 +729,14 @@ __divdi3 (DWtype u, DWtype v) ...@@ -732,14 +729,14 @@ __divdi3 (DWtype u, DWtype v)
if (uu.s.high < 0) if (uu.s.high < 0)
c = ~c, c = ~c,
uu.ll = __negdi2 (uu.ll); uu.ll = -uu.ll;
if (vv.s.high < 0) if (vv.s.high < 0)
c = ~c, c = ~c,
vv.ll = __negdi2 (vv.ll); vv.ll = -vv.ll;
w = __udivmoddi4 (uu.ll, vv.ll, (UDWtype *) 0); w = __udivmoddi4 (uu.ll, vv.ll, (UDWtype *) 0);
if (c) if (c)
w = __negdi2 (w); w = -w;
return w; return w;
} }
...@@ -758,13 +755,13 @@ __moddi3 (DWtype u, DWtype v) ...@@ -758,13 +755,13 @@ __moddi3 (DWtype u, DWtype v)
if (uu.s.high < 0) if (uu.s.high < 0)
c = ~c, c = ~c,
uu.ll = __negdi2 (uu.ll); uu.ll = -uu.ll;
if (vv.s.high < 0) if (vv.s.high < 0)
vv.ll = __negdi2 (vv.ll); vv.ll = -vv.ll;
(void) __udivmoddi4 (uu.ll, vv.ll, &w); (void) __udivmoddi4 (uu.ll, vv.ll, &w);
if (c) if (c)
w = __negdi2 (w); w = -w;
return w; return w;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment