aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2012-09-25 16:19:43 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2012-09-25 16:19:43 +0000
commitb70c0a2de5809c6e959d5e9fecc7aa4a7370fb1a (patch)
tree622db31e498df1afb474a399937dbf76bbd27092 /gcc/config/avr
parentb1bdc68d43b4572a5824514c4f92ea93f73dfec2 (diff)
downloadgcc-b70c0a2de5809c6e959d5e9fecc7aa4a7370fb1a.zip
gcc-b70c0a2de5809c6e959d5e9fecc7aa4a7370fb1a.tar.gz
gcc-b70c0a2de5809c6e959d5e9fecc7aa4a7370fb1a.tar.bz2
re PR other/54701 (double_int conversion breaks avr build)
PR other/54701 * config/avr/avr-log.c (avr_double_int_pop_digit): Reerite using double_int::udivmod. From-SVN: r191716
Diffstat (limited to 'gcc/config/avr')
-rw-r--r--gcc/config/avr/avr-log.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/config/avr/avr-log.c b/gcc/config/avr/avr-log.c
index f86165d..edb1cbd 100644
--- a/gcc/config/avr/avr-log.c
+++ b/gcc/config/avr/avr-log.c
@@ -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();
}