From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31694 invoked by alias); 3 Jul 2013 15:05:44 -0000 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 Received: (qmail 31684 invoked by uid 89); 3 Jul 2013 15:05:44 -0000 X-Spam-SWARE-Status: No, score=-7.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 03 Jul 2013 15:05:40 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r63F5YoF026469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Jul 2013 11:05:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r63F5V26000348; Wed, 3 Jul 2013 11:05:32 -0400 Message-ID: <51D43DBB.5090803@redhat.com> Date: Wed, 03 Jul 2013 15:05:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: lgustavo@codesourcery.com CC: Tom Tromey , Stan Shebs , GDB Patches , Ulrich Weigand Subject: Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64. References: <51D1AD43.3060904@codesourcery.com> <8761wsgb8i.fsf@fleche.redhat.com> <51D3050C.4070309@codesourcery.com> <51D30BB0.3050906@earthlink.net> <87wqp8estz.fsf@fleche.redhat.com> <51D32100.4000901@codesourcery.com> In-Reply-To: <51D32100.4000901@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00143.txt.bz2 On 07/02/2013 07:50 PM, Luis Machado wrote: > - > -if {[istarget "spu*-*-*"]} then { > - # The internal address format used for the combined Cell/B.E. > - # debugger requires 64-bit. > - set is64bitonly "yes" > -} > - I'm not sure this equates to sizeof pointer == 64-bit. This bit may need to be retained. [Adding Ulrich]. > + > + set sizeof_function_ptr [get_sizeof "void (*)(void)" 8] > + set sizeof_data_ptr [get_sizeof "void *" 8] > + if {${sizeof_function_ptr} != 4 && ${sizeof_data_ptr} != 4} then { > + set is64bitonly "yes" > + } > +} > + srec (etc.) is most used in small embedded targets (e.g., those that include dsrec.o in the configure.tgt), consequently that's where the test is most useful. Such targets are the most likely to have 16-bit pointers (< 4 bytes). E.g., h8300, etc. Looks like this ends up causing the tests to be skipped there too. IOW, a better check would be: if {${sizeof_function_ptr} > 4 || ${sizeof_data_ptr} > 4} then { But, this change also means we have reduced routine-checking, as most people test on x86_64. I think we can do better. The test works fine on e.g., x86_64, because programs get linked to low (< 32-bit) addresses by default. That's the point of: if [istarget "alpha*-*-*"] then { # SREC etc cannot handle 64-bit addresses. Force the test # program into the low 31 bits of the address space. lappend options "additional_flags=-Wl,-taso" } (For MIPS N64, if you wanted, I guess you could do similarly to Alpha, and rebuild with: lappend options "ldflags=-Wl,-Tdata=0x600000" to force use of low addresses.) IOW, instead of checking for ABI pointer sizes, I think it'd be better to test for the actual address size of one the variables dumped. That is, check that &intarray is < 32-bit. -- Pedro Alves