From: Jeffrey A Law <law@cygnus.com>
To: hjl@lucon.org (H.J. Lu)
Cc: florian@suse.de (Florian La Roche), paubert@iram.es, egcs@cygnus.com
Subject: Re: egcs-problem 1.0.2
Date: Sun, 05 Apr 1998 21:29:00 -0000 [thread overview]
Message-ID: <17575.891801698@hurl.cygnus.com> (raw)
In-Reply-To: <m0yLfGJ-00058xC@ocean.lucon.org>
In message < m0yLfGJ-00058xC@ocean.lucon.org >you write:
> > On Wed, 25 Feb 1998, Jeffrey A Law wrote:
> >
> > > I think the best way to proceed is for someone to give me a hunk of
> > > code that I can feed the compiler that will show a case where a
> > > clobber is being used for input addressing. That way I can debug
> > > the compiler and see what's really happening.
> >
> > I can't keep up with the weekly updates, so my GCC currently is:
> > gcc version egcs-2.91.06 980122 (gcc-2.8.0 release)
> >
> > The following code breaks when compiled with -fno-strength-reduce, but
> > independantly of -O2/-O3, -fomit-frame-pointer, and -m[345]86:
> >
> > =========================================================================
> ======
> > #include <linux/string.h>
>
>
> Please don't use anything from <linux/> or <asm/> directly in
> the user codes unless it it is absolutely necessary.
>
> >
> > int count_substring_matches(char **haystacks, char **needles)
> > {
> > int hits=0, i, j;
> > for(i=0; haystacks[i]; i++) {
> > for(j=0; needles[j]; j++) {
> > if (strstr(haystacks[i], needles[j])) hits++;
> > }
> > }
> > return hits;
> > }
This is the "linux asm" problem that I haven't been able to look at
for the last month or so due to personal and company commitments.
Basically there's a couple problems:
* The linux x86 asm for strstr is totally bogus.
* GCC does not issue a warning/error when it encouters the bogus
asm and instead generates incorrect code.
jeff
next prev parent reply other threads:[~1998-04-05 21:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <19980331132837.33334@knorke.saar.de>
1998-04-04 20:05 ` H.J. Lu
1998-04-05 21:29 ` Jeffrey A Law [this message]
1998-04-05 21:29 ` H.J. Lu
1998-04-05 17:27 ` Jeffrey A Law
1998-04-05 17:27 ` H.J. Lu
1998-04-05 21:29 ` Jeffrey A Law
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=17575.891801698@hurl.cygnus.com \
--to=law@cygnus.com \
--cc=egcs@cygnus.com \
--cc=florian@suse.de \
--cc=hjl@lucon.org \
--cc=paubert@iram.es \
/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).