From: Robert Lipe Date: Tue, 1 Jun 1999 23:27:14 +0000 (+0000) Subject: bastring.h (class basic_string:Rep): Encode xlock opcode as .bytes instead of mnemonics. X-Git-Tag: releases/libgcj-2.95.0~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73f3aa96d2782855508a6cc397871e9363c7c387;p=thirdparty%2Fgcc.git bastring.h (class basic_string:Rep): Encode xlock opcode as .bytes instead of mnemonics. Wed Jun 2 00:21:54 1999 Robert Lipe * std/bastring.h (class basic_string:Rep): Encode xlock opcode as .bytes instead of mnemonics. From-SVN: r27295 --- diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog index 8dd6c35bfd47..b3d8a3224721 100644 --- a/libstdc++/ChangeLog +++ b/libstdc++/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 2 00:21:54 1999 Robert Lipe + + * std/bastring.h (class basic_string:Rep): Encode xlock opcode + as .bytes instead of mnemonics. + 1999-05-20 Angela Marie Thomas * configure.in: Test for ${compiler_name}.exe as well. diff --git a/libstdc++/std/bastring.h b/libstdc++/std/bastring.h index 6206713b6c9c..70891262e965 100644 --- a/libstdc++/std/bastring.h +++ b/libstdc++/std/bastring.h @@ -77,8 +77,15 @@ private: 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; }