diff options
author | Pitchumani Sivanupandi <pitchumani.s@atmel.com> | 2015-05-11 17:16:43 +0000 |
---|---|---|
committer | Denis Chertykov <denisc@gcc.gnu.org> | 2015-05-11 20:16:43 +0300 |
commit | 4e2c881f7154ae598af1d8ef7084744b77c11181 (patch) | |
tree | 6e17a10f6c15d0f8e5929efd7ae672fd56ee22c9 /gcc | |
parent | bdfdc7da5c5221f0c06a9ea69057389a2d623318 (diff) | |
download | gcc-4e2c881f7154ae598af1d8ef7084744b77c11181.zip gcc-4e2c881f7154ae598af1d8ef7084744b77c11181.tar.gz gcc-4e2c881f7154ae598af1d8ef7084744b77c11181.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77aa930..869a881 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-11 Pitchumani Sivanupandi <pitchumani.s@atmel.com> + + * 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 <ubizjak@gmail.com> * 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 7436b59..8f98bf5 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)); } |