This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs 1.0.1 miscompiles Linux 2.0.33

> > 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]