From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 5D16F3858422 for ; Mon, 28 Nov 2022 17:12:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5D16F3858422 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8FFA21FDCA; Mon, 28 Nov 2022 17:12:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669655539; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGoZkyflDlzxBxmJM/N+y5BpUrR0EucxVuVKIU8Qrno=; b=UaAnC16GxpiGiu5YcViQXQf7EPVTT8/T8x4FroXiLfETQnwj++yRT2iJiI7acwMYVVdXtx v79gPGrCqDMr5yNP+05qr/cjrmTtvR7qZydo0jxONucvOq+h29JIfsgK/VYg9cz3VR9ilD MAp3Lawl71eawUkvl0eTU469rSMSvyI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669655539; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGoZkyflDlzxBxmJM/N+y5BpUrR0EucxVuVKIU8Qrno=; b=rORiKtiewcbE+gDgArrYh3DQJ9iV+Y+xJ9rzJUb5zcAY+/HXc9a55/SMSKtDk8Wlm2kEIX kCWeWr42e8sLTXBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 711E11326E; Mon, 28 Nov 2022 17:12:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CIEKGvPrhGNIfQAAMHmgww (envelope-from ); Mon, 28 Nov 2022 17:12:19 +0000 Message-ID: <54c6616d-fa2f-1104-c3b2-a54966abd084@suse.de> Date: Mon, 28 Nov 2022 18:12:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [pushed] [gdb/testsuite] Fix gdb.arch/altivec-regs.exp with gcc 4.8.5 Content-Language: en-US To: Carl Love , gdb-patches@sourceware.org Cc: Ulrich Weigand References: <20221128125751.1712-1-tdevries@suse.de> <69ca80b6a0fd18f3fda900b8907588e30bb07eff.camel@us.ibm.com> From: Tom de Vries In-Reply-To: <69ca80b6a0fd18f3fda900b8907588e30bb07eff.camel@us.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/28/22 18:02, Carl Love wrote: > Tom: > > On Mon, 2022-11-28 at 13:57 +0100, Tom de Vries wrote: >> On powerpc64le-linux, using gcc 4.8.5, I run into: >> ... >> (gdb) PASS: gdb.arch/altivec-regs.exp: next (1) >> next^M >> 11 c = vec_add (a, b);^M >> (gdb) PASS: gdb.arch/altivec-regs.exp: next (2) >> print/x a^M >> $67 = {0xfefefefe, 0xfefefefe, 0xfefefefe, 0xfefefefe}^M >> (gdb) FAIL: gdb.arch/altivec-regs.exp: print vector parameter a >> ... >> >> Looking at the disassembly and the debug info, it's clear why there's >> a FAIL. >> >> The debug info says that the variable can be found at some stack >> location, but >> the instructions don't seem to be writing there. >> >> We can work around this by marking variable a volatile. Likewise for >> b. >> >> Note that marking the variables as volatile doesn't change the >> location >> information. >> >> Tested on power64le-linux. >> --- >> gdb/testsuite/gdb.arch/altivec-regs.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gdb/testsuite/gdb.arch/altivec-regs.c >> b/gdb/testsuite/gdb.arch/altivec-regs.c >> index 4d4fe3f5dbb..8f3b729fe3f 100644 >> --- a/gdb/testsuite/gdb.arch/altivec-regs.c >> +++ b/gdb/testsuite/gdb.arch/altivec-regs.c >> @@ -2,7 +2,7 @@ >> #include >> >> vector unsigned int >> -vector_fun (vector unsigned int a, vector unsigned int b) >> +vector_fun (volatile vector unsigned int a, volatile vector unsigned >> int b) >> { >> vector unsigned int c; >> a = ((vector unsigned int) vec_splat_u8(2)); >> >> base-commit: 2650ea9730e31fc5c9111afc1a689dbca76707f5 > > I ran this test case before and after your commit on my Power 10 and my > Power 9 box. I did not see a failure before or after the commit on > either machine. The fix looks fine to me as it doesn't change the > behavior on Power 9 or Power 10 that I can see. Hi Carl, thanks for confirming, good to know. - Tom