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]

Re: Using shifts by 1 on K6,K7 and i386



----- Original Message ----- 
From: "Richard Henderson" <rth@cygnus.com>
To: "Martin Erhardsen" <MartinErhardsen@mail.tele.dk>
Cc: <gcc@gcc.gnu.org>
Sent: Friday, July 07, 2000 2:24 AM
Subject: Re: Using shifts by 1 on K6,K7 and i386


> On Sat, Jul 01, 2000 at 11:30:56AM +0200, Martin Erhardsen wrote:
> > I propose that the current predicate for using shifts 
> > and rotates by 1
> > 
> > (TARGET_PENTIUM || TARGET_PENTIUMPRO)
> > 
> > be replaced by this
> > 
> > (!TARGET_I486 || optimize_size)
> 
> Actaully, if any change is made, it should be of the form
> `TARGET_USE_SHIFT1', much like the existing TARGET_USE_LEAVE
> and friends.
> 

I have looked at the 486 manual, and it is not that simple. Shifts by one are 
slower only when using register operands on the 486. This means that the 
ideally the predicate should be something like this

(!(TARGET_I486 && register_operand(operands[0],SImode)) || optimize_size)

I'm not sure what the second operand to memory_operand does and if it is 
necessary, but I would need at least one operand to a TARGET_USE_SHIFT1
macro.



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