------- Comment #10 from xuepeng dot guo at intel dot com  2008-08-12 02:07 
-------
(In reply to comment #7)
> Sorry, I can't reproduce the first issue with a x86_64-linux -> i?86-darwin
> cross on the provided preprocessed testcase, tried many different
> -march=/-mtune=
> options as well as -f{,no-}asynchronous-unwind-tables.  What tuning do you 
> use?
>  What preferred stack size?
> The later C testcase I can reproduce, but here the testcase has a frame 
> pointer
> (insn/f 38 37 39 pr37022.c:4 (set (reg/f:SI 6 bp)
>         (reg/f:SI 7 sp)) 47 {*movsi_1} (nil))
> so I must say I don't understand at all why we generate any
> DW_CFA_GNU_args_size
> directives.  

I am not clear of you but this rtl is necessary for our stack realign proposal.
During we designed and implemented the stack realign proposal we didn't intend
to affect the existing way that DW_CFA_GNU_args_szie works. 

>I believe the unwinder won't use them anyway, as in
> uw_install_context_1
> if (!_Unwind_GetGRPtr (current, __builtin_dwarf_sp_column ()))
> the condition is false (sp is saved in bp).  For the -fno-a-u-t we check
> cfa.reg:
The unwinder will restore sp by DW_CFA_def_cfa_expression as shown below:
080483a8 <foo>:
 80483a8:       8d 4c 24 04             lea    0x4(%esp),%ecx
 80483ac:       83 e4 f0                and    $0xfffffff0,%esp
 80483af:       ff 71 fc                pushl  -0x4(%ecx)
 80483b2:       55                      push   %ebp
 80483b3:       89 e5                   mov    %esp,%ebp
 80483b5:       51                      push   %ecx
 80483b6:       83 ec 04                sub    $0x4,%esp

00000018 00000024 0000001c FDE cie=00000000 pc=080483a8..080483d8
  DW_CFA_advance_loc: 4 to 080483ac
  DW_CFA_def_cfa: r1 (ecx) ofs 0
  DW_CFA_advance_loc: 9 to 080483b5
  DW_CFA_expression: r5 (ebp) (DW_OP_breg5: 0)
  DW_CFA_advance_loc: 1 to 080483b6
  DW_CFA_def_cfa_expression (DW_OP_breg5: -4; DW_OP_deref) <<< restore sp
  DW_CFA_advance_loc: 12 to 080483c2
  DW_CFA_GNU_args_size: 32
  DW_CFA_advance_loc: 22 to 080483d8
  DW_CFA_GNU_args_size: 0
  DW_CFA_nop


> if (!flag_asynchronous_unwind_tables && cfa.reg != STACK_POINTER_REGNUM)
> but not so for the -fa-u-t case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37022

Reply via email to