On 10/23/2017 11:10 AM, Richard Sandiford wrote:
> This patch makes the DWARF code use poly_int64 rather than
> HOST_WIDE_INT for CFA offsets.  The main changes are:
> 
> - to make reg_save use a DW_CFA_expression representation when
>   the offset isn't constant and
> 
> - to record the CFA information alongside a def_cfa_expression
>   if either offset is polynomial, since it's quite difficult
>   to reconstruct the CFA information otherwise.
> 
> 
> 2017-10-23  Richard Sandiford  <richard.sandif...@linaro.org>
>           Alan Hayward  <alan.hayw...@arm.com>
>           David Sherwood  <david.sherw...@arm.com>
> 
> gcc/
>       * gengtype.c (main): Handle poly_int64_pod.
>       * dwarf2out.h (dw_cfi_oprnd_cfa_loc): New dw_cfi_oprnd_type.
>       (dw_cfi_oprnd::dw_cfi_cfa_loc): New field.
>       (dw_cfa_location::offset, dw_cfa_location::base_offset): Change
>       from HOST_WIDE_INT to poly_int64_pod.
>       * dwarf2cfi.c (queued_reg_save::cfa_offset): Likewise.
>       (copy_cfa): New function.
>       (lookup_cfa_1): Use the cached dw_cfi_cfa_loc, if it exists.
>       (cfi_oprnd_equal_p): Handle dw_cfi_oprnd_cfa_loc.
>       (cfa_equal_p, dwarf2out_frame_debug_adjust_cfa)
>       (dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_expr)
>       (initial_return_save): Treat offsets as poly_ints.
>       (def_cfa_0): Likewise.  Cache the CFA in dw_cfi_cfa_loc if either
>       offset is nonconstant.
>       (reg_save): Take the offset as a poly_int64.  Fall back to
>       DW_CFA_expression for nonconstant offsets.
>       (queue_reg_save): Take the offset as a poly_int64.
>       * dwarf2out.c (dw_cfi_oprnd2_desc): Handle DW_CFA_def_cfa_expression.
OK.
jeff

Reply via email to