Message ID | 4D6F8E78.50209@gjlay.de |
---|---|
State | New |
Headers | show |
>> Denis. > > This are backports to 4.3, 4.4, 4.5 branch, respectively > (branches/gcc-4_*-branch/) Why you want to backport so deep ? IMHO trunk and 4.5 is enough. Applied to 4.5 Denis.
Denis Chertykov schrieb: >>>Denis. >> >>This are backports to 4.3, 4.4, 4.5 branch, respectively >>(branches/gcc-4_*-branch/) > > > Why you want to backport so deep ? > IMHO trunk and 4.5 is enough. > Applied to 4.5 > > Denis. I don't know what the policy concerning the depth of backporting bugfixes actually is. At least the check-in rule is "documentation and bug fixes only" so I though (backport of) bugfix is all right. My intention was to go deep enough to have PR42240 resolved/fixed, i.e. in all versions that are still supported. Or what backports must be done in order to have it resolved/fixed? Johann
> -----Original Message----- > From: Georg-Johann Lay [mailto:avr@gjlay.de] > Sent: Thursday, March 03, 2011 11:01 AM > To: Denis Chertykov > Cc: gcc-patches@gcc.gnu.org; Anatoly Sokolov; Weddington, Eric > Subject: Re: [Patch, AVR]: PR42240 - Fix epilogue of naked functions > > > Denis. > > I don't know what the policy concerning the depth of backporting > bugfixes actually is. At least the check-in rule is "documentation and > bug fixes only" so I though (backport of) bugfix is all right. > > My intention was to go deep enough to have PR42240 resolved/fixed, i.e. > in all versions that are still supported. > > Or what backports must be done in order to have it resolved/fixed? Most public distributions of avr-gcc have the 4.4 series. I think fixing this to 4.5 should be fine.
Weddington, Eric schrieb: > >> -----Original Message----- From: Georg-Johann Lay >> [mailto:avr@gjlay.de] Sent: Thursday, March 03, 2011 11:01 AM To: >> Denis Chertykov Cc: gcc-patches@gcc.gnu.org; Anatoly Sokolov; >> Weddington, Eric Subject: Re: [Patch, AVR]: PR42240 - Fix >> epilogue of naked functions >> >>> Denis. >> I don't know what the policy concerning the depth of backporting >> bugfixes actually is. At least the check-in rule is >> "documentation and bug fixes only" so I though (backport of) >> bugfix is all right. >> >> My intention was to go deep enough to have PR42240 >> resolved/fixed, i.e. in all versions that are still supported. >> >> Or what backports must be done in order to have it >> resolved/fixed? > > Most public distributions of avr-gcc have the 4.4 series. I think > fixing this to 4.5 should be fine. > So gcc 4.4/4.3 users are not interested in bugs being fixed? Astonished, Johann
Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 170651) +++ config/avr/avr.c (working copy) @@ -73,6 +73,7 @@ static void avr_file_end (void); static bool avr_legitimate_address_p (enum machine_mode, rtx, bool); static void avr_asm_function_end_prologue (FILE *); static void avr_asm_function_begin_epilogue (FILE *); +static bool avr_cannot_modify_jumps_p (void); static rtx avr_function_value (const_tree, const_tree, bool); static void avr_insert_attributes (tree, tree *); static void avr_asm_init_sections (void); @@ -196,6 +197,9 @@ static const struct attribute_spec avr_a #undef TARGET_HELP #define TARGET_HELP avr_help +#undef TARGET_CANNOT_MODIFY_JUMPS_P +#define TARGET_CANNOT_MODIFY_JUMPS_P avr_cannot_modify_jumps_p + struct gcc_target targetm = TARGET_INITIALIZER; void @@ -991,6 +995,27 @@ avr_asm_function_begin_epilogue (FILE *f fprintf (file, "/* epilogue start */\n"); } + +/* Implement TARGET_CANNOT_MODITY_JUMPS_P */ + +static bool +avr_cannot_modify_jumps_p (void) +{ + + /* Naked Functions must not have any instructions after + their epilogue, see PR42240 */ + + if (reload_completed + && cfun->machine + && cfun->machine->is_naked) + { + return true; + } + + return false; +} + + /* Return nonzero if X (an RTX) is a legitimate memory address on the target machine for a memory operand of mode MODE. */