2012/1/13 Georg-Johann Lay <a...@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.

Reply via email to