From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35844 invoked by alias); 6 Jul 2017 18:53:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35832 invoked by uid 89); 6 Jul 2017 18:53:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1800 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Jul 2017 18:53:13 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC0EE61BAC; Thu, 6 Jul 2017 18:53:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AC0EE61BAC Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AC0EE61BAC Received: from localhost.localdomain (ovpn-117-103.phx2.redhat.com [10.3.117.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44CE518105; Thu, 6 Jul 2017 18:53:09 +0000 (UTC) Subject: Re: [PATCH, VAX] Correct ffs instruction constraint To: Felix Deichmann Cc: coypu@sdf.org, gcc-patches@gcc.gnu.org, matt@3am-software.com References: <20170620200542.GA17979@SDF.ORG> <20170629154705.GC19263@SDF.ORG> <41726b53-19a7-8e01-49f1-09a887b69c5a@redhat.com> From: Jeff Law Message-ID: <7a34e939-0097-1eee-8258-691000bd95e1@redhat.com> Date: Thu, 06 Jul 2017 18:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00343.txt.bz2 On 07/06/2017 10:59 AM, Felix Deichmann wrote: > Jeff, > > Am 29.06.2017 schrieb Jeff Law : >> Ideally we'd like to have a testcase for this in the regression suite. >> >> If you could provide the .i file and options used which generated the >> incorrect ffs instruction I can use the reduction tools with a cross >> compiler to produce a nice simple test for the testsuite. > > I put the corresponding .i file at: > http://www.netbsd.org/~flxd/scsipi_base.i.gz > > See line 7638: > bit = __builtin_ffs(periph->periph_freetags[word]); > > Command/Options used which generated the incorrect ffs instruction: > > /nb8/obj/tooldir.NetBSD-7.0-amd64/bin/vax--netbsdelf-gcc -fno-pic > -ffreestanding -fno-zero-initialized-in-bss -Os -fno-strict-aliasing > -fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length > -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes > -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings > -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes > -Wno-sign-compare --sysroot=/nb8/obj/destdir.vax -D_VAX_INLINE_ -I. > -I/nb8/src/sys/../common/lib/libx86emu -I/nb8/src/sys/../common/include > -I/nb8/src/sys/arch -I/nb8/src/sys -nostdinc -D_KERNEL -D_KERNEL_OPT > -std=gnu99 -I/nb8/src/sys/lib/libkern/../../../common/lib/libc/quad > -I/nb8/src/sys/lib/libkern/../../../common/lib/libc/string > -I/nb8/src/sys/lib/libkern/../../../common/lib/libc/arch/vax/string -c > /nb8/src/sys/dev/scsipi/scsipi_base.c -o scsipi_base.o Hmm, unfortunately I consistently get a call to into libgcc for the __builtin_ffs code rather than an ffs instruction. That's with a gcc-4.8.3 as well as with trunk compiler. Can you include "-v" output from compiling scsipi_base? Thanks. jeff