This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: shifts and rotates by 1 on ix86
- To: Alexander Sokolov <robocop at netlink dot ru>
- Subject: Re: shifts and rotates by 1 on ix86
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Date: Wed, 10 May 2000 18:29:14 +0200 (MET DST)
- cc: Alan Modra <alan at linuxcare dot com dot au>, binutils <binutils at sourceware dot cygnus dot com>
- Organization: Technical University of Gdansk
- Reply-To: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
On Wed, 10 May 2000, Alexander Sokolov wrote:
> > 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?
Please note that both kinds of opcodes are available since 80186, so
unless assembling in the 16-bit mode this is a non-issue. Well, unless
you implement .8086 as well.
However, implicit 1-bit shifts and rotates do set flags differently than
the explicit forms. So I don't think it's actually a good idea to choose
either opcode automatically -- let a compiler or a programmer make the
decision which behaviour suits their needs.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +