On Wed, Nov 02, 2016 at 01:26:48PM +0000, Jiong Wang wrote:
> -/* A subroutine of dwarf2out_frame_debug, process a REG_CFA_EXPRESSION note. 
> */
> +/* A subroutine of dwarf2out_frame_debug, process a REG_CFA_EXPRESSION note. 
>  */

Too long line.

> +    /* RTL sequences inside PARALLEL are raw expression representation.
> +
> +       mem_loc_descriptor can be used to build generic DWARF expressions for
> +       DW_CFA_expression and DW_CFA_val_expression where the expression may 
> can
> +       not be represented using normal RTL sequences.  In this case, group 
> all
> +       expression operations (DW_OP_*) inside a PARALLEL.  For those DW_OP 
> which
> +       doesn't have RTL mapping, wrap it using UNSPEC.  The logic for parsing
> +       PARALLEL sequences is:
> +
> +     foreach elem inside PARALLEL
> +       if (elem is UNSPEC)
> +         dw_op =  XINT (elem, 1) (DWARF operation is kept as UNSPEC number)
> +         oprnd1 = XVECEXP (elem, 0, 0)
> +         oprnd2 = XVECEXP (elem, 0, 1)
> +       else
> +         call mem_loc_descriptor  */

Not sure if it is a good idea to document in weirdly formatted
pseudo-language what the code actually does a few lines below.  IMHO either
express it in words, or don't express it at all.

> +             exp_result =
> +               new_loc_descr ((enum dwarf_location_atom) dw_op, oprnd1,
> +                              oprnd2);

Wrong formatting, = should be on the next line.

> +           }
> +         else
> +           exp_result =
> +             mem_loc_descriptor (elem, mode, mem_mode,
> +                                 VAR_INIT_STATUS_INITIALIZED);

Likewise.

        Jakub

Reply via email to