From: Pitchumani Sivanupandi Date: Mon, 11 May 2015 17:16:43 +0000 (+0000) Subject: avr.c (avr_hard_regno_call_part_clobbered): Use LAST_CALLEE_SAVED_REG instead of... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e2c881f7154ae598af1d8ef7084744b77c11181;p=gcc.git avr.c (avr_hard_regno_call_part_clobbered): Use LAST_CALLEE_SAVED_REG instead of hard-coded register number. * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Use LAST_CALLEE_SAVED_REG instead of hard-coded register number. (Last callee saved reg is different for AVR_TINY architecture) From-SVN: r223009 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77aa930136d..869a881d219 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-11 Pitchumani Sivanupandi + + * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Use + LAST_CALLEE_SAVED_REG instead of hard-coded register number. + (Last callee saved reg is different for AVR_TINY architecture) + 2015-05-11 Uros Bizjak * config/i386/i386.c (ix86_loop_unroll_adjust): Use PATTERN (insn) diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 7436b59a970..8f98bf51f1f 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -11332,9 +11332,10 @@ avr_hard_regno_call_part_clobbered (unsigned regno, machine_mode mode) return 0; /* Return true if any of the following boundaries is crossed: - 17/18, 27/28 and 29/30. */ + 17/18 or 19/20 (if AVR_TINY), 27/28 and 29/30. */ - return ((regno < 18 && regno + GET_MODE_SIZE (mode) > 18) + return ((regno <= LAST_CALLEE_SAVED_REG && + regno + GET_MODE_SIZE (mode) > (LAST_CALLEE_SAVED_REG + 1)) || (regno < REG_Y && regno + GET_MODE_SIZE (mode) > REG_Y) || (regno < REG_Z && regno + GET_MODE_SIZE (mode) > REG_Z)); }