summaryrefslogtreecommitdiff
path: root/gcc/fixed-value.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 19:37:40 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 19:37:40 +0000
commit10ada81fea4490f94ba2eb5923bf5baa367a38bd (patch)
tree437dca120093cc7b1f6debf6f6b31779526c7192 /gcc/fixed-value.c
parent95a236de8aa10bf009e9368dfd28f95a980e5570 (diff)
parent3bd7a983695352a99f7dd597725eb5b839d4b4cf (diff)
downloadgcc-ifunc.tar.gz
Merged with trunk at revision 162480.ifunc
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ifunc@162483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixed-value.c')
-rw-r--r--gcc/fixed-value.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/fixed-value.c b/gcc/fixed-value.c
index 9af431cc8b7..8378b9a289d 100644
--- a/gcc/fixed-value.c
+++ b/gcc/fixed-value.c
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
+#include "diagnostic-core.h"
#include "toplev.h"
/* Compare two fixed objects for bitwise identity. */
@@ -361,7 +362,7 @@ do_fixed_add (FIXED_VALUE_TYPE *f, const FIXED_VALUE_TYPE *a,
double_int one;
one.low = 1;
one.high = 0;
- f->data = double_int_add (f->data, double_int_neg (one));
+ f->data = double_int_sub (f->data, one);
}
}
else
@@ -443,12 +444,12 @@ do_fixed_multiply (FIXED_VALUE_TYPE *f, const FIXED_VALUE_TYPE *a,
temp1.high = 0;
r = double_int_add (r, temp1);
- /* We need to add neg(b) to r, if a < 0. */
+ /* We need to subtract b from r, if a < 0. */
if (!unsigned_p && a->data.high < 0)
- r = double_int_add (r, double_int_neg (b->data));
- /* We need to add neg(a) to r, if b < 0. */
+ r = double_int_sub (r, b->data);
+ /* We need to subtract a from r, if b < 0. */
if (!unsigned_p && b->data.high < 0)
- r = double_int_add (r, double_int_neg (a->data));
+ r = double_int_sub (r, a->data);
/* Shift right the result by FBIT. */
if (GET_MODE_FBIT (f->mode) == 2 * HOST_BITS_PER_WIDE_INT)
@@ -588,7 +589,7 @@ do_fixed_divide (FIXED_VALUE_TYPE *f, const FIXED_VALUE_TYPE *a,
&quo_s.low, &quo_s.high, 0);
/* Try to calculate (mod - pos_b). */
- temp = double_int_add (mod, double_int_neg (pos_b));
+ temp = double_int_sub (mod, pos_b);
if (leftmost_mod == 1 || double_int_cmp (mod, pos_b, 1) != -1)
{