From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27431 invoked by alias); 26 Jun 2009 16:40:03 -0000 Received: (qmail 27398 invoked by uid 22791); 26 Jun 2009 16:40:01 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Jun 2009 16:39:22 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5QGdIrb022845; Fri, 26 Jun 2009 12:39:18 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5QGdHYb004342; Fri, 26 Jun 2009 12:39:17 -0400 Received: from opsy.redhat.com (vpn-225-10.phx2.redhat.com [10.3.225.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5QGdGri007029; Fri, 26 Jun 2009 12:39:16 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A423A508250; Fri, 26 Jun 2009 10:39:15 -0600 (MDT) To: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, drow@false.org Subject: Re: [rfc] Use LONGEST instead of value for index arithmetic References: <200906261549.n5QFn7x1026331@d12av02.megacenter.de.ibm.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Fri, 26 Jun 2009 16:40:00 -0000 In-Reply-To: <200906261549.n5QFn7x1026331@d12av02.megacenter.de.ibm.com> (Ulrich Weigand's message of "Fri\, 26 Jun 2009 17\:49\:07 +0200 \(CEST\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00733.txt.bz2 >>>>> "Ulrich" == Ulrich Weigand writes: Ulrich> this patch implements the change I mentioned recently: use Ulrich> LONGEST instead of struct value to represent array indexes Ulrich> (and similarly the integer operands to pointer arithmetic). Ulrich> This has the advantage that index computations can be Ulrich> performed in host instead of target arithmetic, and not just Ulrich> eliminates a bunch of references to global built-in types, but Ulrich> makes both implementation and users of the value_subscript and Ulrich> pointer arithmetic routines quite a bit simpler. I read this patch. I agree with your assessment: it does make things simpler. I'm in favor of it for that reason. Tom