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
This commit is contained in:
Hartmut Schirmer 2002-07-22 00:15:49 +00:00 committed by Richard Henderson
parent 060a58c593
commit b68daef415
2 changed files with 12 additions and 10 deletions

View 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.

View File

@ -43,10 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "libgcc2.h"
#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;
}