Wed Jun 2 00:21:54 1999 Robert Lipe <robertlipe@usa.net>
* std/bastring.h (class basic_string:Rep): Encode xlock opcode
as .bytes instead of mnemonics.
From-SVN: r27295
+Wed Jun 2 00:21:54 1999 Robert Lipe <robertlipe@usa.net>
+
+ * std/bastring.h (class basic_string:Rep): Encode xlock opcode
+ as .bytes instead of mnemonics.
+
1999-05-20 Angela Marie Thomas <angela@cygnus.com>
* configure.in: Test for ${compiler_name}.exe as well.
void release ()
{
size_t __val;
- asm ("lock; xaddl %0, %2"
- : "=r" (__val) : "0" (-1), "m" (ref) : "memory");
+ // This opcode exists as a .byte instead of as a mnemonic for the
+ // benefit of SCO OpenServer 5. The system assembler (which is
+ // essentially required on this target) can't assemble xaddl in
+ //COFF mode.
+ asm (".byte 0xf0, 0x0f, 0xc1, 0x02" // lock; xaddl %eax, (%edx)
+ : "=a" (__val)
+ : "0" (-1), "m" (ref), "d" (&ref)
+ : "memory");
+
if (__val == 1)
delete this;
}