From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8428 invoked by alias); 24 Oct 2003 23:31:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8421 invoked from network); 24 Oct 2003 23:31:22 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 24 Oct 2003 23:31:22 -0000 Received: by zenia.home (Postfix, from userid 5433) id E039B20766; Fri, 24 Oct 2003 18:30:55 -0500 (EST) To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [obish] More osabi comments References: <3F9948BA.4050201@redhat.com> <3F99A443.8070207@redhat.com> From: Jim Blandy Date: Fri, 24 Oct 2003 23:31:00 -0000 In-Reply-To: <3F99A443.8070207@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-10/txt/msg00758.txt.bz2 Andrew Cagney writes: > >> + /* NOTE: cagney/2003-10-23: The code for "a can_run_code_for b" > >> + is implemented using BFD's compatible method (a->compatible > >> + (b) == a -- the lowest common denominator between a and b is > >> + a). That method's definition of compatible may not be as you > >> + expect. For instance, while "amd64 can run code for i386" > >> + (or more generally "64-bit ISA can run code for the 32-bit > >> + ISA"). Fortunatly, BFD doesn't normally consider 32-bit and > >> + 64-bit "compatible" so won't get a match. */ > > (Incomplete sentence in there.) > > You missed the "fortunately". > > > This comment implies that can_run_code_for (A, B) might return zero > > when A actually can run code for B. > > That's both correct and the intent: "amd64 can run code for i386", > "ppc64 can run code or ppc", "sh64 can run code for sh", "mips64 can > run code for mips", and "ia64 can run code for ia32". They all > fortunately return zero. The bfd_mach_foo things refer to ISAs, not chips. So the 'can_run_code_for' is talking about whether one ISA is an upwards-compatible extension of another, not a question of which ISAs a chip may implement. Is the ISA / chip distinction the one the comment is trying to make?