diff options
author | Marek Michalkiewicz <marekm@amelek.gda.pl> | 2002-02-28 16:23:54 +0100 |
---|---|---|
committer | Marek Michalkiewicz <marekm@gcc.gnu.org> | 2002-02-28 15:23:54 +0000 |
commit | b96c434c39312a059e6a062b29993ec7d0a7da57 (patch) | |
tree | 7612b4a19ed635c60b4578757807b5910ad2005c /gcc/config | |
parent | 9b420a6a58ea7c42ad045a2ab3d8c036c9a2375a (diff) | |
download | gcc-b96c434c39312a059e6a062b29993ec7d0a7da57.zip gcc-b96c434c39312a059e6a062b29993ec7d0a7da57.tar.gz gcc-b96c434c39312a059e6a062b29993ec7d0a7da57.tar.bz2 |
avr.c (avr_hard_regno_mode_ok): Do not allow r29 which may overwrite the high byte of the frame pointer.
* config/avr/avr.c (avr_hard_regno_mode_ok): Do not allow r29
which may overwrite the high byte of the frame pointer.
From-SVN: r50138
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/avr/avr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 1457519..8e64bcb 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -5210,6 +5210,13 @@ avr_hard_regno_mode_ok (regno, mode) int regno; enum machine_mode mode; { + /* Bug workaround: recog.c (peep2_find_free_register) and probably + a few other places assume that the frame pointer is a single hard + register, so r29 may be allocated and overwrite the high byte of + the frame pointer. Do not allow any value to start in r29. */ + if (regno == REG_Y + 1) + return 0; + if (mode == QImode) return 1; /* if (regno < 24 && !AVR_ENHANCED) |