This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Error: suffix or operands invalid for `bswap'
- To: Alexander Sokolov <robocop@amur.rosnet.ru>
- Subject: Re: Error: suffix or operands invalid for `bswap'
- From: Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
- Date: Tue, 22 Jun 1999 16:45:13 +0930 (CST)
- cc: binutils@sourceware.cygnus.com
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.