[PATCH] Fix -mno-accumulate-outgoing-args -fasynchronous-unwind-tables (PR rtl-optimization/36419, take 2)
Jakub Jelinek
jakub@redhat.com
Mon Jul 28 20:01:00 GMT 2008
On Mon, Jul 28, 2008 at 10:46:48AM -0700, H.J. Lu wrote:
> is after saving ebx, esi and edi onto stack, our testcase doesn't fail.
> We could factor out
>
>
> if (offset != 0)
> {
> if (cfa.reg == STACK_POINTER_REGNUM)
> cfa.offset += offset;
>
> if (cfa_store.reg == STACK_POINTER_REGNUM)
> cfa_store.offset += offset;
>
> #ifndef STACK_GROWS_DOWNWARD
> offset = -offset;
> #endif
>
> args_size += offset;
> if (args_size < 0)
> args_size = 0;
>
> def_cfa_1 (label, &cfa);
> if (flag_asynchronous_unwind_tables)
> dwarf2out_args_size (label, args_size);
> }
>
> into a function and call it from dwarf2out_frame_debug_expr
> and dwarf2out_stack_adjust.
Good idea, can you take care of that?
Just note that label if created in the latter, but just used
in the former case, so you probably want to pass both
offset and label to that factored out function, in the latter
case e.g. pass NULL and if it is NULL, call dwarf2out_cfi_label ()
when you need the label. Or only factor out the body of
if (offset != 0) and pass dwarf2out_cfi_label () in the latter
case.
Jakub
More information about the Gcc-patches
mailing list