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: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 10 May 2000 11:15:51 -0600
- cc: binutils <binutils at sourceware dot cygnus dot com>
- Reply-To: law at cygnus dot com
In message <Pine.LNX.4.10.10005101022080.12070-100000@ns.netlink.ru>you write
:
> It seems that gas (2.9.5.0.41) always uses the form with immediate for
> encoding shifts and rotates by immediate count, even if the count is 1
> where special form of encoding could be used which is 1 byte shorter
> (e.g. shll $1,%eax could be encoded as D1 E0, but gas outputs C1 E0 01).
> I think gas should always produce the shortest possible encodings.
This was discussed recently, and what you propose might still make
sense.
However, what I think makes sense regardless of what we do with gas is to
have gcc emit the short form (no shift count when we want shift-by-1). A
patch to do this would be greatly appreciated.
jeffv