From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14434 invoked by alias); 3 May 2011 13:34:17 -0000 Received: (qmail 14399 invoked by uid 22791); 3 May 2011 13:34:16 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 May 2011 13:33:59 +0000 Received: by qwh5 with SMTP id 5so43582qwh.20 for ; Tue, 03 May 2011 06:33:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.50.193 with SMTP id a1mr7117142qcg.177.1304429638797; Tue, 03 May 2011 06:33:58 -0700 (PDT) Received: by 10.229.229.196 with HTTP; Tue, 3 May 2011 06:33:58 -0700 (PDT) In-Reply-To: <20110416081117.GV17079@tyan-ft48-01.lab.bos.redhat.com> References: <20110325113237.GY18914@tyan-ft48-01.lab.bos.redhat.com> <20110416081117.GV17079@tyan-ft48-01.lab.bos.redhat.com> Date: Tue, 03 May 2011 13:34:00 -0000 Message-ID: Subject: Re: [PATCH] Typed DWARF stack From: "H.J. Lu" To: Jakub Jelinek Cc: Richard Henderson , Jason Merrill , Cary Coutant , gcc-patches@gcc.gnu.org, Roland McGrath , Jan Kratochvil , Tom Tromey , Mark Wielaard Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00170.txt.bz2 On Sat, Apr 16, 2011 at 1:11 AM, Jakub Jelinek wrote: > On Fri, Mar 25, 2011 at 12:32:37PM +0100, Jakub Jelinek wrote: >> As I said in my GCC Summit talk, currently we just give up on >> any floating point/_Decimal*/__int128 and for 32-bit targets even >> long long expressions, as those can't be represented in DWARF4, >> while var-tracking has all that often available. > > ... > > This is an updated patch for the typed DWARF stack support, > against current trunk. =A0I've changed DW_OP_GNU_reinterpret > from 0xf8 to 0xf9, because 0xf8 is taken by PGI and e.g. binutils prefers= no > clashes between extension opcodes, otherwise readers would need to switch > based on producer. =A0When we are close to running out of extension opcod= es, > we may reconsider (especially as the HP block is quite large). > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2011-04-16 =A0Jakub Jelinek =A0 > > =A0 =A0 =A0 =A0* dwarf2.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type, > =A0 =A0 =A0 =A0DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinter= pret): New. > > =A0 =A0 =A0 =A0* dwarf2out.c (get_address_mode): New inline. > =A0 =A0 =A0 =A0(mem_loc_descriptor): Add MEM_MODE parameter, adjust recur= sive calls, > =A0 =A0 =A0 =A0if not dwarf_strict emit > =A0 =A0 =A0 =A0DW_OP_GNU_{{const,regval,deref}_type,convert,reinterpret} = when > =A0 =A0 =A0 =A0desirable. =A0Handle FLOAT_EXTEND, FLOAT_TRUNCATE, FLOAT, > =A0 =A0 =A0 =A0UNSIGNED_FLOAT, FIX and UNSIGNED_FIX. =A0Just return NULL = for > =A0 =A0 =A0 =A0FMA, STRICT_LOW_PART, CONST_VECTOR and CONST_FIXED. > =A0 =A0 =A0 =A0(dwarf2out_frame_debug_cfa_expression, reg_loc_descriptor, > =A0 =A0 =A0 =A0dw_loc_list_1, cst_pool_loc_descr, loc_list_from_tree): Ad= just > =A0 =A0 =A0 =A0mem_loc_descriptor callers. > =A0 =A0 =A0 =A0(dwarf_stack_op_name, size_of_loc_descr, output_loc_operan= ds, > =A0 =A0 =A0 =A0output_loc_operands_raw, hash_loc_operands, compare_loc_op= erands): > =A0 =A0 =A0 =A0Handle DW_OP_GNU_const_type, DW_OP_GNU_regval_type, > =A0 =A0 =A0 =A0DW_OP_GNU_deref_type, DW_OP_GNU_convert and DW_OP_GNU_rein= terpret. > =A0 =A0 =A0 =A0(base_types): New variable. > =A0 =A0 =A0 =A0(get_base_type_offset, calc_base_type_die_sizes, > =A0 =A0 =A0 =A0base_type_for_mode, mark_base_types, base_type_cmp, > =A0 =A0 =A0 =A0move_marked_base_types): New functions. > =A0 =A0 =A0 =A0(calc_die_sizes): Assert that die_offset is 0 or equal to > =A0 =A0 =A0 =A0next_die_offset. > =A0 =A0 =A0 =A0(loc_descriptor): Only handle here lowpart SUBREGs of REG,= for > =A0 =A0 =A0 =A0others defer to mem_loc_descriptor. =A0Adjust mem_loc_desc= riptor > =A0 =A0 =A0 =A0callers. =A0If not dwarf_strict, call mem_loc_descriptor e= ven for > =A0 =A0 =A0 =A0non-MODE_INT modes or MODE_INT modes larger than DWARF2_AD= DR_SIZE. > =A0 =A0 =A0 =A0(gen_subprogram_die): Don't give up on call site parameters > =A0 =A0 =A0 =A0with non-integral or large integral modes. =A0Adjust > =A0 =A0 =A0 =A0mem_loc_descriptor callers. > =A0 =A0 =A0 =A0(prune_unused_types): Call prune_unused_types_mark on base= _types > =A0 =A0 =A0 =A0vector entries. > =A0 =A0 =A0 =A0(resolve_addr): Call mark_base_types. > =A0 =A0 =A0 =A0(dwarf2out_finish): Call move_marked_base_types. This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48853 H.J.