From: Marek Michalkiewicz Date: Sun, 19 May 2002 15:18:46 +0000 (+0200) Subject: avr.c (avr_hard_regno_mode_ok): Do not allow r29 which may overwrite the high byte... X-Git-Tag: releases/gcc-3.1.1~317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ba0c836c88fd193764aaec4a20557873f1af665;p=thirdparty%2Fgcc.git avr.c (avr_hard_regno_mode_ok): Do not allow r29 which may overwrite the high byte of the frame pointer. 2002-02-28 Marek Michalkiewicz * 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: r53629 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4aa495c2d98..9ee43b0f2159 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-05-19 Marek Michalkiewicz + + 2002-02-28 Marek Michalkiewicz + * config/avr/avr.c (avr_hard_regno_mode_ok): Do not allow r29 + which may overwrite the high byte of the frame pointer. + 2002-03-19 Lars Brinkhoff * emit-rtl.c (gen_int_mode): New function. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 145751993a80..8e64bcb74aae 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)