This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

Re: Bug in gcc-20011231


I'm pulling this out of my ***, but here's an idea:

The 3.0.1 code emits

        leal    0(,%eax,8), %edx
        leal    (%edx,%eax), %edx
        addl    %edx, %edx
        addl    %edx, %eax
        leal    (%eax,%eax,8), %eax

instead of the imul $-85


I'm more comfortable with Intel format but that looks to me like a
replacement multiply for 171, which is correct for $-85 mod 256.

The remaining shifts and such are the same - but this works because
after the shrl $8 the %eax register is ZERO whereas with the 3.1 code
it's 0xFFFFFFFF


I've seen in passing some patches from Jan Hubicka adding precise timing
information for pentium processors beyond the pentium pro -- suppose
that in the experimental version the time for multiply (in i386.md) is
now small enough that the RTL emits the multiply instead of the
alternate sequence above.

But there has to be something else - because in the 3.0.1 sequence we
get a QImode multiplier, but 3.1 is using 32 bits.


I guess the quick test is to build with -march=pentiumpro or -march=i486
or some such and see what happens???



-- 
Tom Crispin
Centaur Technology
512-493-8625
crispin@centtech.com


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