From b8db7f86fd47dcae8e559b990816243f27ade021 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Tue, 4 Sep 2012 09:37:08 +0000 Subject: [PATCH] re PR target/54476 ([avr] __builtin_avr_delay_cycles (-1ul) causes memory usage to explode on x86_64 host) PR target/54476 * config/avr/avr.c (avr_expand_delay_cycles): Mask operand with SImode. From-SVN: r190920 --- gcc/ChangeLog | 6 ++++++ gcc/config/avr/avr.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ba70bf6b60..3709a6357f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-09-04 Georg-Johann Lay + + PR target/54476 + * config/avr/avr.c (avr_expand_delay_cycles): Mask operand with + SImode. + 2012-09-04 Richard Guenther PR tree-optimization/54458 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index bab13a48795..95892ade448 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -10449,7 +10449,7 @@ avr_mem_clobber (void) static void avr_expand_delay_cycles (rtx operands0) { - unsigned HOST_WIDE_INT cycles = UINTVAL (operands0); + unsigned HOST_WIDE_INT cycles = UINTVAL (operands0) & GET_MODE_MASK (SImode); unsigned HOST_WIDE_INT cycles_used; unsigned HOST_WIDE_INT loop_count; -- 2.30.2