]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR other/54701 (double_int conversion breaks avr build)
authorGeorg-Johann Lay <avr@gjlay.de>
Tue, 25 Sep 2012 16:19:43 +0000 (16:19 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Tue, 25 Sep 2012 16:19:43 +0000 (16:19 +0000)
PR other/54701
* config/avr/avr-log.c (avr_double_int_pop_digit): Reerite using
double_int::udivmod.

From-SVN: r191716

gcc/ChangeLog
gcc/config/avr/avr-log.c

index 174828378b08359b94c4fb5817fff3512a49231a..d6365a88bacbe90f5a7c15cd3de1735e4966eae7 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-25  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR other/54701
+       * config/avr/avr-log.c (avr_double_int_pop_digit): Reerite using
+       double_int::udivmod.
+
 2012-09-25  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr.c (avr_set_current_function): Check cfun->machine
index f86165d4c8e26ae819dfc40086ecd7d770394d74..edb1cbda1ec01fff9501aae810f65a9911ad4514 100644 (file)
@@ -144,15 +144,12 @@ avr_log_set_caller_f (const char *caller)
 static unsigned
 avr_double_int_pop_digit (double_int *cst, unsigned base)
 {
-  unsigned HOST_WIDE_INT resl, reml;
-  HOST_WIDE_INT resh, remh;
+  double_int drem;
 
-  div_and_round_double (FLOOR_DIV_EXPR, true, cst->low, cst->high, base, 0,
-                       &resl, &resh, &reml, &remh);
-  cst->high = resh;
-  cst->low = resl;
+  *cst = cst->udivmod (double_int::from_uhwi (base), (int) FLOOR_DIV_EXPR,
+                       &drem);
 
-  return reml;
+  return (unsigned) drem.to_uhwi();
 }