This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, AVR] Fix PR target/50925, use hard_frame_pointer_rtx


2012/1/13 Georg-Johann Lay <avr@gjlay.de>:
> Denis Chertykov wrote:
>
>> Committed
>>
>> Denis
>
>
> Consider code prom PR51374
>
> void __vector_18 (void)
> {
> Â Âextern char slot;
> Â Âunsigned char status = (*(volatile unsigned char*) 0x2B);
> Â Âunsigned char data = (*(volatile unsigned char*) 0x2C);
>
> Â Âif (status & 0x10)
> Â Â Â Âslot = 0;
> }
>
> the code with -Os -S -dp sets up a frame pointer which is not needed and should
> not be there:
>
> __vector_18:
> Â Â Â Âpush r28 Â Â Â Â ; Â28 Âpushqi1/1 Â Â Â [length = 1]
> Â Â Â Âpush r29 Â Â Â Â ; Â29 Âpushqi1/1 Â Â Â [length = 1]
> Â Â Â Âin r28,__SP_L__ Â; Â30 Â*movhi/8 Â Â Â Â[length = 2]
> Â Â Â Âin r29,__SP_H__
> /* prologue: function */
> /* frame size = 0 */
> /* stack size = 2 */
> .L__stack_usage = 2
>    Âin r24,0xc    ; Â8  movqi_insn/4  Â[length = 1]
>    Âsbis 0xb,4    ; Â11 Â*sbix_branch  Â[length = 2]
> Â Â Â Ârjmp .L1
> Â Â Â Âsts slot,__zero_reg__ Â Â; Â13 Âmovqi_insn/3 Â Â[length = 2]
> .L1:
> /* epilogue start */
>    Âpop r29 Â; Â33 Âpopqi  [length = 1]
>    Âpop r28 Â; Â34 Âpopqi  [length = 1]
>    Âret   Â; Â35 Âreturn_from_epilogue  Â[length = 1]
>
> This happens even for empty function.

Oops.
Something wrong happened, probably I committed a wrong untested patch.
It must be reverted.

Denis.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]