Re: [Patch,AVR]: Fix PR50063 GCC does not support FP = SP

2012-02-21 Thread Denis Chertykov
2012/2/21 Richard Henderson : > On 02/21/12 09:08, Georg-Johann Lay wrote: >>       PR rtl-optimization/50063 >>       * config/avr/avr.md (movhi_sp_r): Handle -1 (unknown IRQ state) >>       and 2 (8-bit SP) in operand 2. >>       * config/avr/avr.c (avr_prologue_setup_frame): Adjust prologue >>  

Re: [Patch,AVR]: Fix PR50063 GCC does not support FP = SP

2012-02-21 Thread Richard Henderson
On 02/21/12 09:08, Georg-Johann Lay wrote: > PR rtl-optimization/50063 > * config/avr/avr.md (movhi_sp_r): Handle -1 (unknown IRQ state) > and 2 (8-bit SP) in operand 2. > * config/avr/avr.c (avr_prologue_setup_frame): Adjust prologue > setup to use movhi_sp_r instead

Re: [Patch,AVR]: Fix PR50063 GCC does not support FP = SP

2012-02-21 Thread Georg-Johann Lay
Jakub Jelinek wrote: > On Tue, Feb 21, 2012 at 12:38:48PM +0100, Georg-Johann Lay wrote: >> However, if all insns that are involved in SP/FP manipulation get the >> RTX_FRAME_RELATED_P, almost every test case that has -g crashes with this >> dwarf-ICE. > > My suggestion actually wasn't to use unsp

Re: [Patch,AVR]: Fix PR50063 GCC does not support FP = SP

2012-02-21 Thread Jakub Jelinek
On Tue, Feb 21, 2012 at 12:38:48PM +0100, Georg-Johann Lay wrote: > However, if all insns that are involved in SP/FP manipulation get the > RTX_FRAME_RELATED_P, almost every test case that has -g crashes with this > dwarf-ICE. My suggestion actually wasn't to use unspec for reading from sp, but in

[Patch,AVR]: Fix PR50063 GCC does not support FP = SP

2012-02-21 Thread Georg-Johann Lay
This is a tentative patch to the PR. As Jakub explained, GCC does not support configurations with FP = SP and DSE optimizer generates wrong code for AVR. This patch implements Jakub's proposal to hack around by hiding the action of setting/moving between SP and SP into UNSPEC[_VOLATILE]s. All wor