This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, VAX] Correct ffs instruction constraint
- From: Jeff Law <law at redhat dot com>
- To: Felix Deichmann <m4j0rd0m0 at gmail dot com>
- Cc: coypu at sdf dot org, gcc-patches at gcc dot gnu dot org, matt at 3am-software dot com
- Date: Thu, 6 Jul 2017 12:53:09 -0600
- Subject: Re: [PATCH, VAX] Correct ffs instruction constraint
- Authentication-results: sourceware.org; auth=none
- 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 at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AC0EE61BAC
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AC0EE61BAC
- References: <20170620200542.GA17979@SDF.ORG> <20170629154705.GC19263@SDF.ORG> <41726b53-19a7-8e01-49f1-09a887b69c5a@redhat.com> <e7044c58-1bc9-1848-f53d-9216ee089a5f@gmail.com>
On 07/06/2017 10:59 AM, Felix Deichmann wrote:
> Jeff,
>
> Am 29.06.2017 schrieb Jeff Law <law@redhat.com>:
>> 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