Bug 000238

When Created: 07/26/1998 11:44:40
Against DJGPP version: 2.01
By whom:
Abstract: Invalid "pand" opcode
The MMX instruction pand has the opcode 0x0FDB, but in DJGPP a pand results in
a 0x0FDA opcode. This results in a program crash due to SIGILL (Invalid Opcode).
I've found three workarounds:

1. Write the full opcode with .byte 0x0F,0xDB,<modR/M>

2. If the source operand is in memory, you could sometimes use .byte 0x0F plus
a floating-point instruction instead, as follows:
".byte 0x0F ; fildl (address)" can replace "pand (address),%mm0"
".byte 0x0F ; fistpl (address)" can replace "pand (address),%mm2"
".byte 0x0F ; finit" can replace "pand %mm4,%mm3"
".byte 0x0F ; fldt (address)" can replace "pand (address),%mm5"

3. Change the 0x0fda on line 831 of gnu/binutl-2.81/include/opcode/i386.h to 
0x0fdb and re-make

Note added: 07/27/1998 15:33:23
By whom:
There's no sense in reporting this bug here. It's a genuine
FSF binutils bug, so it should be reported to *them*.

(Chances are this is already fixed in a more recent binutils distribution,
like 2.9)

Closed on 04/13/1999 06:00:12: This is a problem with Binutils, not with DJGPP.
By whom:

  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010