public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
To: Alexander Sokolov <robocop@amur.rosnet.ru>
Cc: binutils@sourceware.cygnus.com
Subject: Re: Error: suffix or operands invalid for `bswap'
Date: Thu, 01 Jul 1999 00:00:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.9906221555130.30966-100000@mullet.itr.unisa.edu.au> (raw)
In-Reply-To: <Pine.LNX.4.10.9906221622150.2593-100000@ns.amur.rosnet.ru>

On Tue, 22 Jun 1999, Alexander Sokolov wrote:

> I can't compile openssl with the latest (2.9.4.0.x) binutils because
> assembler produces an error message for bswapl instruction.
> Why l suffix is no longer allowed for bswap?

ix86 binutils 2.9.4 does a lot more syntax checking than previous
binutils, rejecting such combinations as:

	pushb	%al
	setae	%eax
	ldsb	0,%eax
	setnew	0
	div	%cx,%al
	fstb	%st,0
	xlatw
	stil
	jaw	bone

I guess you could argue that "bswapl" should be allowed as bswap indeed
does work on 32 bit regs.  The patch to allow this is simple.

--- binutils-current/include/opcode/i386.h~	Fri May 14 14:04:03 1999
+++ binutils-current/include/opcode/i386.h	Tue Jun 22 16:16:45 1999
@@ -766,7 +766,7 @@
 
 /* 486 extensions */
 
-{"bswap",   1, 0x0fc8, X, NoSuf|ShortForm,	{ Reg32,0,0 } },
+{"bswap",   1, 0x0fc8, X, l_Suf|ShortForm,	{ Reg32,0,0 } },
 {"xadd",    2, 0x0fc0, X, bwl_Suf|W|Modrm,	{ Reg, Reg|AnyMem, 0 } },
 {"cmpxchg", 2, 0x0fb0, X, bwl_Suf|W|Modrm,	{ Reg, Reg|AnyMem, 0 } },
 {"invd",    0, 0x0f08, X, NoSuf,		{ 0, 0, 0} },


If we allow "bswapl" though, what about the following?
aaab, aadw, aamw, aasb, daab, dasb, lahfb, sahfb
They all have as much claim to legitimacy as "bswapl".

Also, what about these?
arplw, lldtw, lmsww, ltrw, strw, verrw, verww, invlpgb, invlpgw, invlpgl

Comments anyone?  I'm inclined to allow them all.

  reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Alexander Sokolov
1999-07-01  0:00 ` Alan Modra [this message]
1999-07-01  0:00   ` Alexander Sokolov
1999-07-01  0:00     ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.9906221555130.30966-100000@mullet.itr.unisa.edu.au \
    --to=alan@spri.levels.unisa.edu.au \
    --cc=binutils@sourceware.cygnus.com \
    --cc=robocop@amur.rosnet.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).