This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using shifts by 1 on K6,K7 and i386
- To: <law at cygnus dot com>
- Subject: Re: Using shifts by 1 on K6,K7 and i386
- From: "Martin Erhardsen" <MartinErhardsen at mail dot tele dot dk>
- Date: Thu, 6 Jul 2000 11:19:14 +0200
- Cc: <gcc at gcc dot gnu dot org>
- References: <8596.962845607@upchuck>
----- Original Message -----
From: "Jeffrey A Law" <law@cygnus.com>
To: "Martin Erhardsen" <MartinErhardsen@mail.tele.dk>
Cc: <gcc@gcc.gnu.org>
Sent: Thursday, July 06, 2000 3:06 AM
Subject: Re: Using shifts by 1 on K6,K7 and i386
>
> In message <000701bfe33f$1e751e60$b495f9c3@mincomputer>you write:
> > Why doesn't gcc use logical shifts, arithmetric shifts and rotates by 1
> > instead of immediate operands on the K6,K7 and i386.
> Because nobody's told us what is best for this case on the K6, K7 and
> i386.
>
> > It saves a byte and has the same latency (except on i486,
> > where it uses an extra cycle). I have measured this on
> > my K6-2 and looked it up for K7 and i386
> OK.
>
> > I propose that the current predicate for using shifts
> > and rotates by 1
> So, submit a patch which changes i386.md appropriately.
Okay, I'll check the documentation for the intel processors
to make sure that this is the right thing to do for those processors
too, and then I'll start writing my patch.