* Error: suffix or operands invalid for `bswap' @ 1999-07-01 0:00 Alexander Sokolov 1999-07-01 0:00 ` Alan Modra 0 siblings, 1 reply; 4+ messages in thread From: Alexander Sokolov @ 1999-07-01 0:00 UTC (permalink / raw) To: binutils 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? -- Alexander Sokolov System Administrator ROSNET Komsomolsk-na-Amure Tel./Fax: +7-095-737-6260 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Error: suffix or operands invalid for `bswap' 1999-07-01 0:00 Error: suffix or operands invalid for `bswap' Alexander Sokolov @ 1999-07-01 0:00 ` Alan Modra 1999-07-01 0:00 ` Alexander Sokolov 0 siblings, 1 reply; 4+ messages in thread From: Alan Modra @ 1999-07-01 0:00 UTC (permalink / raw) To: Alexander Sokolov; +Cc: binutils 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Error: suffix or operands invalid for `bswap' 1999-07-01 0:00 ` Alan Modra @ 1999-07-01 0:00 ` Alexander Sokolov 1999-07-01 0:00 ` Alan Modra 0 siblings, 1 reply; 4+ messages in thread From: Alexander Sokolov @ 1999-07-01 0:00 UTC (permalink / raw) To: Alan Modra; +Cc: binutils On Tue, 22 Jun 1999, Alan Modra wrote: > 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. At least openssl and international kernel patch use bswapl. Rejecting this syntax causes compiling failure. On the other hand "bswapl %eax" is no less legal than "pushl %eax" or "addl %eax,%ebx" allowed in 2.9.4 and if you disallow l suffix for bswap you should also do it for all the instructions with 32-bit regs. -- Alexander Sokolov System Administrator ROSNET Komsomolsk-na-Amure Tel./Fax: +7-095-737-6260 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Error: suffix or operands invalid for `bswap' 1999-07-01 0:00 ` Alexander Sokolov @ 1999-07-01 0:00 ` Alan Modra 0 siblings, 0 replies; 4+ messages in thread From: Alan Modra @ 1999-07-01 0:00 UTC (permalink / raw) To: Alexander Sokolov; +Cc: binutils On Wed, 23 Jun 1999, Alexander Sokolov wrote: > At least openssl and international kernel patch use bswapl. Rejecting > this syntax causes compiling failure. On the other hand "bswapl %eax" > is no less legal than "pushl %eax" or "addl %eax,%ebx" allowed in 2.9.4 > and if you disallow l suffix for bswap you should also do it for all the > instructions with 32-bit regs. The difference is that there are "pushw", "addw", and "addb" instructions, but no "bswapw". In saying this, I'm not arguing against restoring bswapl to legal status, just pointing out that "bswap" is somewhat special. I'll check a patch in tonight to fix bswap, unless anyone reading this list has a violent objection. I'm also curious to know whether Unixware or other AT&T format x86 assemblers accept "bswapl". Would someone with access to such an assembler please try it out? ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-07-01 0:00 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1999-07-01 0:00 Error: suffix or operands invalid for `bswap' Alexander Sokolov 1999-07-01 0:00 ` Alan Modra 1999-07-01 0:00 ` Alexander Sokolov 1999-07-01 0:00 ` Alan Modra
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).