From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13140 invoked by alias); 17 May 2011 08:35:42 -0000 Received: (qmail 13128 invoked by uid 22791); 17 May 2011 08:35:41 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 May 2011 08:35:27 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4H8ZOLU008136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 May 2011 04:35:24 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4H8ZMth020519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 May 2011 04:35:23 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p4H8ZMfT022558; Tue, 17 May 2011 10:35:22 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p4H8ZL56022556; Tue, 17 May 2011 10:35:21 +0200 Date: Tue, 17 May 2011 08:35:00 -0000 From: Jakub Jelinek To: Tom Tromey , Cary Coutant Cc: Ulrich Weigand , gdb-patches@sourceware.org Subject: Re: RFC: implement typed DWARF stack Message-ID: <20110517083521.GZ17079@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <201105161550.p4GFo5hk014748@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00373.txt.bz2 On Mon, May 16, 2011 at 12:09:28PM -0600, Tom Tromey wrote: > CCing Jakub. > > Ulrich> So just to clarify: in the discussion a while back, you said: > > Sorry for any confusion. I hope this email will clear it up. > > During our discussion I was convinced that DW_OP_shr should generally > use the sign of any explicit type to decide what to do (with a special > case for implicit type). However, Jakub informed me that GCC relied on > 'shr' always zero-filling, even for explicit types. So, I changed the > code back. What is now in the tree implements the same semantics that > GCC assumes. My point is that we have two right shift operations, DW_OP_shr{,a}, so it is IMHO better to just keep them as two operations even for typed stack. The type in that case is used only for the size of the shift, whether the upper bits are filled with 0s or msb is determined by the operation. DW_OP_mod or DW_OP_div are different, there is just one operation, so it has some default for untyped arguments (unsigned for mod, signed for div) and for typed operands both type's size and signedness matter. If DW_OP_shr{,a} was the same, the producer would often need to add additional DW_OP_convert ops. OT, DW_OP_mod should be documented as: "This operation operates only on integral values." and DW_OP_const_type description uses "The second operand" twice, where "The third operand" should be used in the second occurrence. Jakub