This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs 1.0.1 miscompiles Linux 2.0.33
- To: geoffk at discus dot anu dot edu dot au (Geoffrey KEATING)
- Subject: Re: egcs 1.0.1 miscompiles Linux 2.0.33
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Tue, 3 Mar 1998 14:54:47 +0000 (GMT)
- Cc: egcs at cygnus dot com
>
> > I think this is beyond the limits of what can or should be done with gcc's
> > inline assembly. strstr is a volatile asm which needs 18 instructions, 5
> > registers, and takes a long time to run. I've seen cases like this where
> > the separate function is faster than the inlined version because of reduced
> > register pressure in the caller.
>
> This may be unreasonable on x86, but '18 instructions and 5
> registers' is not particularly large on other machines.
>
> On PPC, I want to inline a 5-word by 1-word multiply, and can't
> (reliably) because:
>
> * A single inline asm will have 6 inputs and 5 outputs, and the limit
> is 10;
of course it's an awkward workaround, but you could do it by using
read-write operands - or DImode ones.
> * The asm uses the carry flag, and gcc can modify the carry flag on
> its own.
Another - simpler - workaround: safe it.
> I can guarantee that a separate function would be much slower, because
> it would have to return its results in memory.
You could write the call as an asm.