This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: shifts and rotates by 1 on ix86


On Wed, 10 May 2000, Alan Modra wrote:

> On Wed, 10 May 2000, Alexander Sokolov wrote:
> 
> > On Wed, 10 May 2000, Alan Modra wrote:
> > 
> > > You can get the smaller opcode sequence by writing "shll %eax".
> > 
> > This should be documented in manual.
> 
> True.  Along with a few of other details too.

Don't forget such directives as .weak and .previous which are widely used
for a long time but still remain undocumented.

> > > The reason gas does not do this automatically is that on certain processors,
> > > eg. 486, the D1 E0 opcode sequence is slower than C1 E0 01.
> > 
> > Then why not to add directives like .386, .486 etc or a command line
> > option to specify the target cpu type?
> 
> That's not such a bad idea, particularly if the directive also enabled 
> warnings when someone tried to use an instruction not available on the
> chosen cpu.

Good idea. This would make gas behave like masm or tasm which do not allow
the instructions unless the cpu that supports them is explicitly 
specified. I think it's easy to implement such behaviour in gas. 

-- 
Alexander Sokolov
System Administrator
Netlink Co. Ltd., Moscow
Tel/Fax: +7 095 2786139


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