public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Felix Deichmann <m4j0rd0m0@gmail.com>
Cc: coypu@sdf.org, gcc-patches@gcc.gnu.org, matt@3am-software.com
Subject: Re: [PATCH, VAX] Correct ffs instruction constraint
Date: Thu, 06 Jul 2017 18:53:00 -0000	[thread overview]
Message-ID: <7a34e939-0097-1eee-8258-691000bd95e1@redhat.com> (raw)
In-Reply-To: <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

  reply	other threads:[~2017-07-06 18:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 20:06 coypu
2017-06-29 15:47 ` coypu
2017-06-29 19:44   ` Jeff Law
2017-07-06 17:00     ` Felix Deichmann
2017-07-06 18:53       ` Jeff Law [this message]
2017-07-07 14:55         ` Felix Deichmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a34e939-0097-1eee-8258-691000bd95e1@redhat.com \
    --to=law@redhat.com \
    --cc=coypu@sdf.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=m4j0rd0m0@gmail.com \
    --cc=matt@3am-software.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).